Recherche avancée

Médias (91)

Autres articles (28)

  • D’autres logiciels intéressants

    12 avril 2011, par

    On ne revendique pas d’être les seuls à faire ce que l’on fait ... et on ne revendique surtout pas d’être les meilleurs non plus ... Ce que l’on fait, on essaie juste de le faire bien, et de mieux en mieux...
    La liste suivante correspond à des logiciels qui tendent peu ou prou à faire comme MediaSPIP ou que MediaSPIP tente peu ou prou à faire pareil, peu importe ...
    On ne les connais pas, on ne les a pas essayé, mais vous pouvez peut être y jeter un coup d’oeil.
    Videopress
    Site Internet : (...)

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

  • De l’upload à la vidéo finale [version standalone]

    31 janvier 2010, par

    Le chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
    Upload et récupération d’informations de la vidéo source
    Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
    Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)

Sur d’autres sites (4726)

  • pyav / ffmpeg / libav select number of P-frames and B-frames

    27 mai 2021, par user1315621

    I am streaming from an rtsp source. It looks like half of the frames received are key frames. Is there a way to reduce this percentage and have an higher number of P-frames and B-frames ? If possible, I would like to increase the number of P-frames (not the one of B-frames).
I am using pyav which is a Python wrapper for libav (ffmpeg)

    


    Code :

    


    container = av.open(
    url, 'r',
    options={
        'rtsp_transport': 'tcp',
        'stimeout': '5000000',
        'max_delay': '5000000',
    }
)
stream = container.streams.video[0]
codec_context = stream.codec_context
codec_context.export_mvs = True
codec_context.gop_size = 25  

for packet in self.container.demux(video=0):
    for video_frame in packet.decode():
        print(video_frame.is_key_frame)


    


    Output :

    


    True
False
True
False
...


    


    Note 1 : I can't edit the source. I can just edit the code used to stream the video.

    


    Note 2 : same solution should apply to pyav, libavi and ffmpeg.

    


    Edit : it seems that B-frames are disabled : codec_context.has_b_frames is False

    


  • FFMPEG scaling video disable viewing it while process is not ended, for video transcoding on the fly

    5 juillet 2022, par Lucas F

    Good day all,

    


    I'm working on a video player with 1080p original video files, and I would like to change their resolution on the fly :

    


    Actually I host all my original video files under a web mp4 1080p format, and I would like to be able to offer 720p, 480p, etc ... qualities.

    


    So I started to look for tutorials about video transcoding on the fly and I found the FFMPEG tool.

    


    I'm actually using the following command to scale videos - to 720p for e.g. :

    


    ffmpeg -i input.mp4 -vf scale=-1:720 output.mp4


    


    The problem is, once FFMPEG starts scaling it, I have to wait the end of the process before being able to play the video. Do you know if there is any parameter for this command to allow playing the video while it's under scaling ?

    


    Or any workaround that can help me doing this ?

    


    Thank you in advance for your help !

    


    EDIT

    


    Now I found how to access readable content while transcoding (by transcoding to fragmented MP4) :

    


    ffmpeg -i input.mp4 -vf scale=-2:720 -movflags +frag_keyframe+separate_moof+omit_tfhd_offset+empty_moov output.mp4


    


    But my problem is when opening the video it comes as an "ended" video of the current transcoded data.

    


    So if video lasts 1min and is half transcoded, I'll see only 30s, it will not load more data, once the rest is transcoded.

    


  • How to acurately trim audio and video with ffmpeg ? [closed]

    6 janvier 2024, par ws90

    I'm trying to automate the trimming and concatenation of video clips that also contain audio using ffmpeg.
The following commands are being used to trim clips and then concatenate the trimmed clips.

    


    .\ffmpeg -ss $startInSeconds -i $inputFile -t $partDurationInSeconds $outputFile


    


    This is done once per input file, the values of $startInSeconds and $partDurationInSeconds are different for different clips.

    


    .\ffmpeg -f concat -safe 0 -i .\list.txt -c copy $concatOutputFile


    


    list.txt is a list of $outputFile from the first trim command.

    


    The audio of the concat video file gradually de-syncs over time (slowing down compared to the trimmed clips), which is the problem I'm looking to fix.
It seems to slow down by about half a frame at each concat join.

    


    Why is the concat command causing this de-sync and what can I do about it ?

    


    I thought this was due to a mismatch in duration between the audio and video tracks of a trimmed clip (the audio would often be shorter than the video after trimming). I then tried padding the audio to match the video before concatenating but the problem persists.
I also found an example where the tracks were identical in length and the problem persists, so I think the concat command is the culprit, not the trim command.