[FFmpeg-devel] [PATCH] Make ffmpeg -t X with X<=0 transcode nothing

Stefano Sabatini stefano.sabatini-lala
Fri Jul 18 00:27:33 CEST 2008

On date Thursday 2008-07-17 22:18:08 +0200, Michael Niedermayer encoded:
> On Thu, Jul 17, 2008 at 08:57:09PM +0200, Stefano Sabatini wrote:
> > But if we can avoid *at all* to transcode then I'm fine, ideally a:
> > ffmpeg -t 0 -i test.avi -sdp -f rtp -an rtp://test.mpeg > test.sdp
> > 
> > should be fine, if *no* transcoding is performed then the return code
> > tells if we wrote that SDP or not, which isn't guaranteed if we have
> > to set t > 0.
> > So can anyone explain why it is necessary to set t > 0?, attached patch
> > is a first naive attempt to fix the t>0 issue.
> what is t by default? what will you patch do in that case? ...

Yes, anyway if the user writes:
ffmpeg -t 0 -i test.avi -y test.mpeg

then I think he expects to transcode *nothing* rather than the whole
file, this also according to the docs:

@item -t @var{duration}
Restrict the transcoded/captured video sequence
to the duration specified in seconds.
@code{hh:mm:ss[.xxx]} syntax is also supported.

New patch attached, this also doesn't break the default behaviour when
-t isn't specified.

FFmpeg = Friendly Fostering Magic Prodigious Empowered Guru
-------------- next part --------------
A non-text attachment was scrubbed...
Name: allow-non-positive-time-01.patch
Type: text/x-diff
Size: 699 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080718/90330956/attachment.patch>

More information about the ffmpeg-devel mailing list