Recherche avancée

Médias (91)

Autres articles (61)

  • Les formats acceptés

    28 janvier 2010, par

    Les commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
    ffmpeg -codecs ffmpeg -formats
    Les format videos acceptés en entrée
    Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
    Les formats vidéos de sortie possibles
    Dans un premier temps on (...)

  • Support de tous types de médias

    10 avril 2011

    Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)

  • Librairies et binaires spécifiques au traitement vidéo et sonore

    31 janvier 2010, par

    Les logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
    Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation ; Oggz-tools : outils d’inspection de fichiers ogg ; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores ;
    Binaires complémentaires et facultatifs flvtool2 : (...)

Sur d’autres sites (5532)

  • Precise cut of remote video file

    20 août 2014, par Nicolas Goy

    I have hours long video files living on a server, and I need to be able to cut segments in them in an accurate and fast way.

    I tried :

    ffmpeg -ss 10:00 -i http://server/input.mp4 -t 5:00 -vcodec copy -acodec copy out.mp4

    This works and is fast, but it’s not precise as ffmpeg seeks backward until it finds a keyframe. The resulting video file ends up with a negative start time which is not working nice with browsers.

    I know I can re-encode the video for accurate seeking, but this would be slow and lose quality.

    I came up with the following idea :

    For example, let’s say we have a 20 seconds video, with keyframes every 5 secs, at 0,5,10,15,20.

    If I want a segment from sec 2 to sec 17, I would re-encode from sec 2 to 5, vcopy from sec 5 to 15, re-encode from sec 15 to 17 and concat the three files.

    This is the general problem and my idea, now the requirements are :

    • Source files must be accessed over HTTP
    • There must be no or very few quality loss
    • It must be fast, cutting 10 minutes in a 2h video should take around 1-2 sec
    • It must be accurate
    • It must work for webm and mp4

    It doesn’t have to be a ffmpeg command, I’m quite sure I’ll have to write a C wrapper around libav.

    Source file can be pre-processed in any necessary way to make it work.

    UPDATE : After getting more info, it seems my "idea" of gluing re-encoded extremities parts with a stream copied middle part won’t work because of different encoding settings. But I could extract a longuer part (keyframe -> keyframe) and extract timecodes I could add in an HTTP header, like Time-Range: 0.25,15.14 which would mean "play from sec 0.25 to 15.14 and discard the rest".

  • ffmpeg record screen file formats

    3 avril 2020, par New_Dev

    Good day,
I'm currently writing a bash script which records the screen under certain conditions. The problem is that only avi works as a file extension for recording the screen. This script is going to be used on an Raspberry Pi and currently I get on a decent virtual machine only 10-20 fps (goal would be around 30 fps). I think .avi is not suited for my project. But .mpeg and .mp4 are not working for recording. I tried recording with .avi and then converting it in .mp4, but I have limited memory and .avi ist just too big in size. I use currently the following command :

    



    ffmpeg -f x11grab -y -r 30 -s 960x750 -i :0.0+0,100 -vcodec huffyuv ./Videos/out_$now.avi
//$now is the current date and time


    



    So I wanted to know if I need some special packages from ffmpeg to record with for example .mp4 or if there are other file formats available for ffmpeg screen recording.

    



    Edit :
I found that the codec libx264 for mp4 works, but the fps drop until they hit5 fps, which is definetly too low. The recorded video appeared like being a fast forward version of the recorded screen.

    



    With mpeg4 for mpeg I reached over 30 fps, but the video qualitywas very bad.

    



    It appears that even my big avi-files look like being played fast forward. Is there something I do wrong ?

    



    Is there a good middle way, where I get a decend video quality, good fps (20+) and a file which isn't too big ?

    



    Edit 2 :
I tried recording it with .avi and converting it afterwards. Just converting with ffmpeg -i test.avi -c:a aac -b:a 128k -c:v libx264 -crf 23 output.mp4 
resulted in the same framedrops as if I was recording with .mp4. But when I cut a littlebit of the beginning of the video and named the outputfile .mp4, the size became much smaller. But when I started the cutting at 0:00:00 (so tried just converting), it just changed the file format without converting it (so the size stayed the same). Any ideas ?

    


  • FFMpeg C++ How to create a filter with multiple outputs ?

    11 septembre 2020, par GoodSimon

    For example, we have one AVFrame with a size of 128x128 pixels and the task is to split the AVFrame into 4 parts (4 separate AVFrame). To do this, I fill the graph with filters using the avfilter_graph_parse2(...) function, and then call avfilter_graph_config(...).

    


    Let's start. Let's cut out the top left corner. To crop a frame, we need to use the crop filter, which means we initialize the AVFilterGraph graph with the line :

    


    buffer = width = 128: height = 128: pix_fmt = 2: time_base = 1/25, pixel_aspect = 128/64 [pad_in];
[pad_in] crop = w = 64: h = 64: x = 0: y = 0, buffersink;


    


    Everything works great ! Now let's try to make several outputs :

    


    buffer = width = 128: height = 128: pix_fmt = 2: time_base = 1/25, pixel_aspect = 128/64 [pad_in];
[pad_in] crop = w = 64: h = 64: x = 0: y = 0, buffersink;
[pad_in] crop = w = 64: h = 64: x = 64: y = 0, buffersink;
[pad_in] crop = w = 64: h = 64: x = 0: y = 64, buffersink;
[pad_in] crop = w = 64: h = 64: x = 64: y = 64, buffersink


    


    As you can see, we have one buffer for the input image, 4 crop filters for cutting each piece, and 4 buffersink filters for the output images. The call avfilter_graph_parse2(...) returns 0, which is good, but avfilter_graph_config() returns the error code -22 == AVERROR(EINVAL) and the message is output to the console : Input pad "default" with type video of the filter instance "Parsed_crop_3" of crop not connected to any source.

    


    I am asking for your help in creating a filter with multiple outputs.