[FFmpeg-trac] #5719(ffmpeg:new): Using -stream_loop is wrong duration output
FFmpeg
trac at avcodec.org
Fri Jul 22 16:02:39 EEST 2016
#5719: Using -stream_loop is wrong duration output
------------------------------------+----------------------------------
Reporter: nicol | Owner:
Type: defect | Status: new
Priority: normal | Component: ffmpeg
Version: git-master | Resolution:
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
------------------------------------+----------------------------------
Comment (by nicol):
> `-stream_loop 1` means that the input stream should be used twice in the
output stream (looped once) and this is what the documentation says:
https://ffmpeg.org/ffmpeg-all.html#Main-options
> If your input stream has 25 frames (does it?) then 50 output frames are
correct or do I misunderstand?
Yes, sample video is 25 frames, 1 second. Then use `-stream_loop 1`,
output video is 50 frames(with movie), 2 seconds.
ffmpeg -f lavfi -i testsrc2=d=1 -f lavfi -i anullsrc=r=48000:cl=stereo
-shortest -vcodec libx264 -acodec aac sample.mkv
This command output 50 frames, 2 seconds.
ffmpeg.exe -stream_loop 1 -i sample.mkv -vcodec copy sample-v-copy.mp4 -y
This command output 51 frames, 2 seconds.
ffmpeg.exe -stream_loop 1 -i sample.mkv sample-no-copy.mp4 -y
But, this command output 50 frames, '''27 seconds'''.
ffmpeg.exe -v 9 -loglevel 99 -stream_loop 1 -i sample.mkv -c copy
sample-c-copy.mp4 -y
frame= 50 fps=0.0 q=-1.0 Lsize= 74kB time=00:00:27.00 bitrate=
22.3kbits/s speed=3.41e+003x
Sorry The seconds command, I mistook to wite command.
output 50 frames, '''27 seconds'''.
ffmpeg.exe -v 9 -loglevel 99 -stream_loop 1 -i sample.mkv -vcodec copy -an
sample-v-copy-an.mp4 -y
frame= 50 fps=0.0 q=-1.0 Lsize= 71kB time=00:00:26.88 bitrate=
21.8kbits/s speed=1.12e+004x
'''output 26 secnods''' without movie.
ffmpeg.exe -v 9 -loglevel 99 -stream_loop 1 -i sample.mkv -acodec copy -vn
sample-a-copy-vn.mp4 -y
size= 2kB time=00:00:26.02 bitrate= 0.6kbits/s speed=4.38e+003x
--
Ticket URL: <https://trac.ffmpeg.org/ticket/5719#comment:2>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list