[FFmpeg-devel] [PATCH] '-longest' command-line argument realization

David DeHaven dave
Fri Feb 6 21:18:59 CET 2009


On Feb 6, 2009, at 12:06 PM, Baptiste Coudurier wrote:
> On 2/6/2009 10:20 AM, Michael Niedermayer wrote:
>> On Fri, Feb 06, 2009 at 10:13:51AM -0800, David DeHaven wrote:
>>> On Feb 6, 2009, at 10:03 AM, Michael Niedermayer wrote:
>>>> On Tue, Feb 03, 2009 at 03:01:58PM +0300, Michael N. Pritula wrote:
>>>>> Hello.
>>>>> I suggest patch to realize '-longest' key with following  
>>>>> semantics:
>>>>> All video and audio streams with needed encoding in output file
>>>>> will be
>>>>> same time length and this length will be equal to longest stream  
>>>>> in
>>>>> output
>>>>> file. For every shorter audio stream it will be continued with
>>>>> silence, and
>>>>> for every shorter video stream it will be continued with last
>>>>> picture,
>>>>> encoded to this stream.
>>>>> Waiting for your comments.
>>>> for what is it good to lengthen streams to a common point?
>>> Some players (<cough>QuickTime</cough>) show white video when audio
>>> runs longer or preceeds video. It's quite annoying, especially in
>>> fullscreen mode. QT's solution is to tell users (and developers) to
>>> trim the file so the tracks are equal length.
>>>
>>> I can't think of any other arguments...
>>
>> either way it should be enough to inject a single audio/video frame
>> for each stream with the last timestamp, ffmpeg should generate the
>> stuff in between when needed ...
>
> I confirm, if you set last video packet duration correctly, duration
> will be correct and quicktime will display it.

Starting frame duration too :) (BTDT)

-DrD-





More information about the ffmpeg-devel mailing list