Recherche avancée

Médias (0)

Mot : - Tags -/clipboard

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (46)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

  • Submit bugs and patches

    13 avril 2011

    Unfortunately a software is never perfect.
    If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
    If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
    You may also (...)

Sur d’autres sites (7097)

  • 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

    


  • Converting variable bitrate on the fly with ffmpeg

    4 septembre 2016, par Łukasz Bezwerchny

    i do cut some video files with either avidemux or virtualdub using directstream copy, some of the files comes with variable bitrate, the problem is that after such cutting my default video cataloging software shows those files lenght as 0:0, i managed to fix this problem with ffmpeg using "-vcodec copy -acodec copy". The output seem to be fine now but i have another problem, these new files have sound problem, on pot player everything is working fine but on mpc and my cataloging software which also plays media sound gets cut off at the half of the movie, for example 2h movie has only 30min of sound. I did look at the using mediainfo software and it shows me something like : video lenght 1:55, audio lenght 32min. I think the problem is the vbr, i did manage to solve this problem by extracting mp3 file from the troublesome video and convert it to 128kb constant bitrate and again merge the video and new audio file and it seems fine. Video and audio match at the whole video lenght. It’s just a bit of tedious to get things done for a big amount of files to fix, is there a parameter that i could use in one command line to do the job in one process, i mean like :
    ffmpeg -i test.avi -vcodec copy -"convert vbr to 128kb" "save to test2.avi" ?

  • bash variable changes in loop with ffmpeg

    17 septembre 2018, par Mike

    I wrote a skript to quickly create short preview clips from vides I recorded on timestamps that I found worth checking out later for cutting.
    My file with the timestamps is written like this

    FILE_NAME1#MM:SS MM:SS
    FILE_NAME2#MM:SS MM:SS MM:SS MM:SS

    example :

    MAH01728#02:47 03:34 03:44 05:00 06:08 06:55

    The script looks like this :

    #!/bin/bash
    while read f
    do

    file=$(echo $f | cut -d"#" -f1)
    filename=${file}".MP4"
    timestamps=$(echo $f | cut -d"#" -f2)

    for time in $timestamps
    do
     ffmpeg -ss 00:${time}.0 -i "orig/${filename}" -c copy -t 10 "preview/${file}_${time}.MP4"
    done
    done < $1

    The script gets half of the previews that I want and on the other the filename is messed up and ffmpeg complains that the file is not found :

    orig/714.MP4: No such file or directory
    orig/00:58 01:25.MP4: No such file or directory

    So I modified the script for trouble shooting and just put an echo in front of the ffmpeg command - now all file names are correct. What am I missing ?

    ffmpeg -ss 00:01:47.0 -i orig/MAH01714.MP4 -c copy -t 10 preview/MAH01714_01:47.MP4
    ffmpeg -ss 00:02:00.0 -i orig/MAH01713.MP4 -c copy -t 10 preview/MAH01713_02:00.MP4
    ffmpeg -ss 00:00:58.0 -i orig/MAH01712.MP4 -c copy -t 10 preview/MAH01712_00:58.MP4
    ffmpeg -ss 00:01:25.0 -i orig/MAH01712.MP4 -c copy -t 10 preview/MAH01712_01:25.MP4