[FFmpeg-trac] #4696(ffmpeg:new): Duration with -t before -i is actually value of -t plus value of -ss
FFmpeg
trac at avcodec.org
Sat Jul 4 13:02:44 CEST 2015
#4696: Duration with -t before -i is actually value of -t plus value of -ss
---------------------------------+----------------------------------
Reporter: Piscium | Type: defect
Status: new | Priority: normal
Component: ffmpeg | Version: 2.4.10
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
---------------------------------+----------------------------------
If I run the command below I would expect the duration of the output file
to be 30 seconds, but instead it is 40.
ffmpeg -y -ss 10 -t 30 -i in.m4a -acodec copy -flags global_header
out.m4a
It seems this is a bug. It may be the same bug or related to bug #4475.
In case somebody else comes across this bug, the workaround is to subtract
the value of the -ss parameter from the value of the -t parameter, as
follows:
ffmpeg -y -ss 10 -t 20 -i in.m4a -acodec copy -flags global_header
out.m4a
With the above I get the intended duration of 30 seconds.
Note that if the duration is less than the seek point you need to enter a
negative duration for the workaround, for example the command below will
also give me the desired duration of 30 seconds.
ffmpeg -y -ss 92 -t -62 -i in.m4a -acodec copy -flags global_header
out.m4a
----------------------------------
ffmpeg -version
ffmpeg: /usr/lib64/nvidia-304xx/libOpenCL.so.1: no version information
available (required by ffmpeg)
ffmpeg: /usr/lib64/nvidia-304xx/libOpenCL.so.1: no version information
available (required by /lib64/libavfilter.so.5)
ffmpeg: /usr/lib64/nvidia-304xx/libOpenCL.so.1: no version information
available (required by /lib64/libavutil.so.54)
ffmpeg version 2.4.10 Copyright (c) 2000-2015 the FFmpeg developers
built on Jun 3 2015 08:36:36 with gcc 4.9.2 (GCC) 20150212 (Red Hat
4.9.2-6)
configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg
--incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man
--arch=x86_64 --optflags='-O2 -g -pipe -Wall -Werror=format-security
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-
buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' --enable-bzlib
--disable-crystalhd --enable-frei0r --enable-gnutls --enable-ladspa
--enable-libass --enable-libcdio --enable-libdc1394 --disable-indev=jack
--enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-openal
--enable-opencl --enable-libopencv --enable-libopenjpeg --enable-libopus
--enable-libpulse --enable-libschroedinger --enable-libsoxr --enable-
libspeex --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-
libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-x11grab
--enable-avfilter --enable-avresample --enable-postproc --enable-pthreads
--disable-static --enable-shared --enable-gpl --disable-debug --disable-
stripping --shlibdir=/usr/lib64 --enable-runtime-cpudetect
libavutil 54. 7.100 / 54. 7.100
libavcodec 56. 1.100 / 56. 1.100
libavformat 56. 4.101 / 56. 4.101
libavdevice 56. 0.100 / 56. 0.100
libavfilter 5. 1.100 / 5. 1.100
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 0.100 / 3. 0.100
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 0.100 / 53. 0.100
--
Ticket URL: <https://trac.ffmpeg.org/ticket/4696>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list