[FFmpeg-user] Possible feature additions for concatenating video files

dg1727 at hushmail.com dg1727 at hushmail.com
Thu Jan 12 21:12:35 CET 2012


On Fri, 06 Jan 2012 06:04:18 -0500 Stefano Sabatini 
<stefasab at gmail.com> wrote:
>On date Wednesday 2012-01-04 15:58:01 -0500, dg1727 at hushmail.com 
>encoded: 
>> I then thought of the following proposed feature:  
>[...]
>> B.  A feature (maybe in ffprobe?) which reports the total number 
>> of I-frames, P-frames, and B-frames in a given video stream (any 
>> format, not just H.264).  This way, if the file has no B-frames, 
>> I can happily use tools on it that warn me that B-frames may 
>> cause problems.  
>
>Patch posted on ffmpeg-devel, feature was existing in the 
>unmaintained SourceForge ffprobe version since its inception.

Thanks; it seems you are referring to [6], which was your patch for 
"Add -show_frames option to ffprobe".  

>And you can find a field named "has_b_frames" in the video stream
>output which may help.

Indeed, with my existing version of FFmpeg (prior to the above 
patch), 

ffprobe -show_streams 1.flv | grep b_frame

  reports:  

has_b_frames=0

Thank you very much for telling me about this.  

>> Do proposed features A and B already exist?  If not, should I 
>> make tickets in Trac to request that these features be added 
>> to FFmpeg?  
>This is usually a good idea.

Suggestion A was canceled in [7], and I don't need B since I know 
about has_b_frames.  My remaining suggestion is:  

C.  Is it possible to have the version [in the startup banner of 
ffmpeg and the other command-line tools] listed as something like 
0.9.0.gitmaster20120101_140000.001 to be more precise [than the 
existing "0.9.0.git"]?  

Comments about this are welcome; if I don't get any comments on the 
mailing list in the next couple of days, I can file the suggestion 
in Trac.  

Let me merge into this message another reply that was sent to the 
mailing list:  

On Thu, 05 Jan 2012 21:21:58 -0500 "Geek.Song" <ffmpeg at gmail.com> 
wrote:
>Forget FPS, MP4 supports variable FPS, you just need recalculate
>timestamp(PTS/DTS) carefully.

I would rather be able to just specify one FPS value for the whole 
output file, instead of having to calculate timestamps for (in this 
case) over 140k frames.  

Here is the procedure that ended up working for me:  

1.  Use "ffprobe -show_streams" to verify that the files have no B-
frames.  
2.  Open the first input file in Avidemux.  When prompted whether 
to use a "safe mode" that works more reliably with B-frames but 
loses frame accuracy, choose "Cancel" since there are no B-frames.  
(Avidemux version 2.5.6 gave me this prompt; maybe the prompt will 
be removed in future versions.)  
3.  Leave the video and audio codecs at "Copy" and set the 
container format to MP4.  
4.  Use "Video > Frame Rate" to set the frame rate which will be 
applied to the whole output file.  
5.  Append the other input files (File > Append...).  
6.  Save the resulting output file (Save > Save Video...).  

[6] http://ffmpeg.org/pipermail/ffmpeg-devel/2012-
January/118637.html
[7] http://ffmpeg.org/pipermail/ffmpeg-user/2012-
January/004141.html



More information about the ffmpeg-user mailing list