[FFmpeg-user] [N-46469-gc995644] "Invalid duration specification for t: 00:60:00"?

Liam Condron-Farnos 23liam at googlemail.com
Mon Jan 14 23:54:21 CET 2013


>Assuming your question is why the output file is not
>shorter than the input file:
>If you put -ss time after -i, it means "decode the input until
>(exactly) time, then start encoding", since -codec copy does
>not do any encoding, the parameter is ignored.
>
>If you put -ss time in front of -i, it means "seek
>(approximately) to time" before doing anything else,
>this (at least to a certain degree) also works with
>-codec copy.

This is incorrect; I've just tested to be sure, and -ss as an output option
is perfectly compatible with -codec copy (albeit with the obvious I-frame
limitations).

Using -ss as an input option is faster, but not as accurate, than using it
as an output option. As an input option, it seeks to the nearest keyframe
before the specified time. As an output option, it seeks to the actual
time, but decodes the entire input file. According to
this<https://ffmpeg.org/trac/ffmpeg/wiki/Seeking%20with%20FFmpeg#Fastandaccurateseeking>page
on the ffmpeg wiki, you can use a hybrid of the two to get the best of
both (so `ffmpeg -ss 00:02:30 -i input -ss 00:00:30 ... output` to seek
three minutes into the input), but I can't speak for how well that works,
having never tried it myself.

On 14 January 2013 16:12, Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:

> Gilles <codecomplete <at> free.fr> writes:
>
> > No, the problem I have with the second file is that
> > there's no sound when it's played in VLC, while the
> > first file plays fine.
>
> Do you get the same problem with the following command?
> $ ffmpeg -i input.mp4 -vcodec copy -acodec copy FL.1.mp4
>
> Does the output file play with ffplay or MPlayer?
> Can you test WMP?
>
> Carl Eugen
>
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>


More information about the ffmpeg-user mailing list