Recherche avancée

Médias (91)

Autres articles (40)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Mise à disposition des fichiers

    14 avril 2011, par

    Par défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
    Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
    Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

Sur d’autres sites (4883)

  • How to apply dynamic watermarking for users watching video in real-time ? [closed]

    3 janvier, par Barun Bhattacharjee

    I am working on a video streaming project where I need to apply a dynamic watermarking (e.g., username and email) in real-time for security purposes. The video is being streamed in DASH format, and the segment files are in .m4s format generated via FFmpeg.

    


    Challenges :
Is it possible to directly apply dynamic watermarking to .m4s segment files ?

    


    Video segments are generated using FFmpeg with the following command :

    


    ffmpeg
    .input(video_path)
    .output(mpd_path,
            format='dash',
            map='0',
            video_bitrate='2400k',
            video_size='1920x1080',
            vcodec='libx264',
            seg_duration='4',  # Sets segment duration to 4 seconds
            acodec='copy')
    .run()



    


    What I tried :
I attempted to use FFmpeg to apply a watermark dynamically to the .m4s files using the drawtext filter, but .m4s files are not always recognized as valid input for FFmpeg operations.

    


    # FFmpeg command to add watermark to m4s file
try:
    # FFmpeg processing
    out, err = (
        ffmpeg
        .input(m4s_file_path)  # Input the segment file
        .filter(
            "drawtext",
            text=user_info,
            fontfile="font/dejavu-sans/DejaVuSans-Bold.ttf",
            fontsize=24,
            fontcolor="white",
            x=10,
            y=10
        )
        .output(
            "pipe:",  # Stream output as a byte stream
            format="mp4",  # Output format as MP4 (compatible with MPEG-DASH)
            vcodec="libx264",
            acodec="copy",
            movflags="frag_keyframe+empty_moov"
        )
        .run(capture_stdout=True, capture_stderr=True)
    )

    logger.info(f"FFmpeg process completed. stdout length: {len(out)}, stderr: {err.decode('utf-8')}")
    logger.error(f"FFmpeg stderr: {err.decode('utf-8')}")
    return out  # Return the processed video stream data


except ffmpeg.Error as e:
    stderr_output = e.stderr.decode('utf-8') if e.stderr else "No stderr available"
    logger.error(f"FFmpeg error: {stderr_output}")

    raise RuntimeError(f"Error processing video: {stderr_output}")



    


    Error I faced :

    


    video-streaming-backend  | [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f1bf99cc640] Could not find codec parameters for stream 0 (Video: h264 (avc1 / 0x31637661), none(tv, bt709), 1920x1012): unspecified pixel format
video-streaming-backend  | Consider increasing the value for the 'analyzeduration' (10000000) and 'probesize' (5000000) options
video-streaming-backend  | Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'http://web:8000/media/stream_video/chunks/ec1db006-b488-47ad-8220-79a05bcaae39/segments/init-stream0.m4s':
video-streaming-backend  |   Metadata:
video-streaming-backend  |     major_brand     : iso5
video-streaming-backend  |     minor_version   : 512
video-streaming-backend  |     compatible_brands: iso5iso6mp41
video-streaming-backend  |     encoder         : Lavf60.16.100
video-streaming-backend  |   Duration: N/A, bitrate: N/A
video-streaming-backend  |   Stream #0:0[0x1](und): Video: h264 (avc1 / 0x31637661), none(tv, bt709), 1920x1012, SAR 1:1 DAR 480:253, 12288 tbr, 12288 tbn (default)
video-streaming-backend  |     Metadata:
video-streaming-backend  |       handler_name    : VideoHandler
video-streaming-backend  |       vendor_id       : [0][0][0][0]
video-streaming-backend  | Stream mapping:
video-streaming-backend  |   Stream #0:0 (h264) -> drawtext:default
video-streaming-backend  |   drawtext:default -> Stream #0:0 (libx264)
video-streaming-backend  | Press [q] to stop, [?] for help
video-streaming-backend  | Cannot determine format of input stream 0:0 after EOF
video-streaming-backend  | Error marking filters as finished
video-streaming-backend  | Error while filtering: Invalid data found when processing input
video-streaming-backend  | [out#0/mp4 @ 0x7f1bf8e73100] Nothing was written into output file, because at least one of its streams received no packets.
video-streaming-backend  | frame=    0 fps=0.0 q=0.0 Lsize=       0kB time=N/A bitrate=N/A speed=N/A    
video-streaming-backend  | Conversion failed!



    


    These errors have left me wondering if .m4s is a viable format for dynamic watermarking. If it's not, what would be the correct approach ?

    


  • convert a heif file to png/jpg using ffmpeg

    28 mars, par Ajitesh Singh

    The use case is very straight forward. Imagemagick is able to do the conversion but I want to do it with ffmpeg. Here is the all commands I have tried and all of them gives moov atom not found error.

    


    ffmpeg -i /Users/ajitesh/Downloads/sample1.heif -c:v png -pix_fmt rgb48 /Users/ajitesh/Downloads/sample.png


    


    Output

    


    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f85aa813200] moov atom not found
/Users/ajitesh/Downloads/sample1.heif: Invalid data found when processing input


    


    it seems like moov atom is actually not present by trying to extract the location of moov atom using the following command

    


    ffmpeg -v trace -i /Users/ajitesh/Downloads/sample1.heif 2>&1 | grep -e type:\'mdat\' -e type:\'moov\'


    


    Output

    


    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f824c00f000] type:'mdat' parent:'root' sz: 2503083 420 2503495
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f824c00f000] type:'mdat' parent:'root' sz: 2503083 420 2503495


    


  • is that possible to use ffmpeg convert .mp4 to .ts when get a http request

    6 mars 2019, par koner

    I search some article that tell me should convert the mp4 first,then wait the request and send the ts and m3u8.

    But i looking for a way , that is when the request comes , then i will start to convert the video , and send the m3u8 immediately when the Conversion is not finish.

    If the request come , but the ts file not ready ,then wait still the file ready and send it immediately .

    Is that possible to do something like this ? or can use another way to have the same effect ?