Opened 10 years ago

Closed 10 years ago

#4696 closed defect (duplicate)

Duration with -t before -i is actually value of -t plus value of -ss using -codec copy

Reported by: Piscium Owned by:
Priority: normal Component: ffmpeg
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

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

Change History (7)

comment:1 by Piscium, 10 years ago

The bug seems to be in the copy codec, it does not manifest in the command below that does not use it:

ffmpeg -y -ss 10 -t 30 -i in.m4a -flags global_header -af afade=t=in:st=0:d=5,afade=t=out:st=25:d=5 out.mp3

comment:2 by Carl Eugen Hoyos, 10 years ago

Please test current FFmpeg git head and provide the command line that allows to reproduce the issue together with the complete, uncut console output to make this a valid ticket.

comment:3 by Piscium, 10 years ago

Below is the full console output for ffmpeg version 2.4.10 currently installed on my PC. This command line has my workaround whereby I ask for a duration of 20 seconds to get what I want which is 30 seconds.

I will see if I find time to test the git head - no promises.


$ ffmpeg -y -ss 10 -t 20 -i in.m4a -acodec copy -flags global_header out.m4affmpeg: /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

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'in.m4a':

Metadata:

major_brand : dash
minor_version : 0
compatible_brands: iso6mp41
creation_time : 2014-01-25 16:58:44

Duration: 00:02:40.08, start: 0.000000, bitrate: 255 kb/s

Stream #0:0(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 253 kb/s (default)
Metadata:

creation_time : 2014-01-25 16:58:44
handler_name : SoundHandler

Output #0, ipod, to 'out.m4a':

Metadata:

major_brand : dash
minor_version : 0
compatible_brands: iso6mp41
encoder : Lavf56.4.101
Stream #0:0(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, 253 kb/s (default)
Metadata:

creation_time : 2014-01-25 16:58:44
handler_name : SoundHandler

Stream mapping:

Stream #0:0 -> #0:0 (copy)

Press [q] to stop, ? for help
size= 935kB time=00:00:30.00 bitrate= 255.3kbits/s
video:0kB audio:929kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.620911%

comment:4 by Piscium, 10 years ago

OK, I managed to build the git head of ffmpeg. It was easy. I used build configuration options as close as I possible to the version where I found the bug.

How do I run the git version that I built without installing it. Is there a way?

Anyway, I just called ffmpeg from the directory where I built the git head and got the same results, i. e., the bug is still there. However I am not sure I picked up the freshly built libraries, I may have picked up the old libraries that are installed in /usr/lib64.


$ ./ffmpeg -y -ss 10 -t 20 -i in.m4a -acodec copy -flags global_header out.m4a
./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 N-73411-g5233f25 Copyright (c) 2000-2015 the FFmpeg developers

built 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-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
WARNING: library configuration mismatch
avutil 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
avcodec 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
avformat 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
avdevice 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
avfilter 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
avresample 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
swscale 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
swresample 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
postproc 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. 28.100 / 54. 7.100
libavcodec 56. 46.101 / 56. 1.100
libavformat 56. 40.100 / 56. 4.101
libavdevice 56. 4.100 / 56. 0.100
libavfilter 5. 20.100 / 5. 1.100
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 0.100
libswresample 1. 2.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 0.100

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'in.m4a':

Metadata:

major_brand : dash
minor_version : 0
compatible_brands: iso6mp41
creation_time : 2014-01-25 16:58:44

Duration: 00:02:40.08, start: 0.000000, bitrate: 255 kb/s

Stream #0:0(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 253 kb/s (default)
Metadata:

creation_time : 2014-01-25 16:58:44
handler_name : SoundHandler

Output #0, ipod, to 'out.m4a':

Metadata:

major_brand : dash
minor_version : 0
compatible_brands: iso6mp41
encoder : Lavf56.4.101
Stream #0:0(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, 253 kb/s (default)
Metadata:

creation_time : 2014-01-25 16:58:44
handler_name : SoundHandler

Stream mapping:

Stream #0:0 -> #0:0 (copy)

Press [q] to stop, ? for help
size= 935kB time=00:00:30.00 bitrate= 255.3kbits/s
video:0kB audio:929kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.620911%

Last edited 10 years ago by Piscium (previous) (diff)

comment:5 by Piscium, 10 years ago

I rebuilt ffmpeg with the default ./configure options and the bug is still there.

It seems that the ffmpeg libraries are built statically in ffmpeg, so my concern about picking up old libraries was likely incorrect.


$ ldd ./ffmpeg

linux-vdso.so.1 => (0x00007ffff516a000)
libXv.so.1 => /lib64/libXv.so.1 (0x00007f2cb1bfd000)
libX11.so.6 => /lib64/libX11.so.6 (0x00007f2cb18ba000)
libXext.so.6 => /lib64/libXext.so.6 (0x00007f2cb16a8000)
libva.so.1 => /lib64/libva.so.1 (0x00007f2cb1492000)
libxcb.so.1 => /lib64/libxcb.so.1 (0x00007f2cb1270000)
libxcb-shm.so.0 => /lib64/libxcb-shm.so.0 (0x00007f2cb106c000)
libxcb-xfixes.so.0 => /lib64/libxcb-xfixes.so.0 (0x00007f2cb0e64000)
libxcb-shape.so.0 => /lib64/libxcb-shape.so.0 (0x00007f2cb0c60000)
libjack.so.0 => /lib64/libjack.so.0 (0x00007f2cb0a05000)
libasound.so.2 => /lib64/libasound.so.2 (0x00007f2cb071c000)
libSDL-1.2.so.0 => /lib64/libSDL-1.2.so.0 (0x00007f2cb047f000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f2cb0263000)
libm.so.6 => /lib64/libm.so.6 (0x00007f2caff5b000)
liblzma.so.5 => /lib64/liblzma.so.5 (0x00007f2cafd36000)
libbz2.so.1 => /lib64/libbz2.so.1 (0x00007f2cafb26000)
libz.so.1 => /lib64/libz.so.1 (0x00007f2caf910000)
libvdpau.so.1 => /lib64/libvdpau.so.1 (0x00007f2caf70c000)
libc.so.6 => /lib64/libc.so.6 (0x00007f2caf34f000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f2caf14b000)
libXau.so.6 => /lib64/libXau.so.6 (0x00007f2caef47000)
libopus.so.0 => /lib64/libopus.so.0 (0x00007f2caecfb000)
librt.so.1 => /lib64/librt.so.1 (0x00007f2caeaf3000)
libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f2cae7e4000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f2cae5cd000)
/lib64/ld-linux-x86-64.so.2 (0x00007f2cb1e02000)

comment:6 by Piscium, 10 years ago

Built with default options.


$ ./ffmpeg -y -ss 10 -t 20 -i in.m4a -acodec copy -flags global_header out.m4a
ffmpeg version N-73411-g5233f25 Copyright (c) 2000-2015 the FFmpeg developers

built with gcc 4.9.2 (GCC) 20150212 (Red Hat 4.9.2-6)
configuration:
libavutil 54. 28.100 / 54. 28.100
libavcodec 56. 46.101 / 56. 46.101
libavformat 56. 40.100 / 56. 40.100
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 20.100 / 5. 20.100
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 2.100 / 1. 2.100

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'in.m4a':

Metadata:

major_brand : dash
minor_version : 0
compatible_brands: iso6mp41
creation_time : 2014-01-25 16:58:44

Duration: 00:02:40.08, start: 0.000000, bitrate: 255 kb/s

Stream #0:0(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 253 kb/s (default)
Metadata:

creation_time : 2014-01-25 16:58:44
handler_name : SoundHandler

Output #0, ipod, to 'out.m4a':

Metadata:

major_brand : dash
minor_version : 0
compatible_brands: iso6mp41
encoder : Lavf56.40.100
Stream #0:0(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, 253 kb/s (default)
Metadata:

creation_time : 2014-01-25 16:58:44
handler_name : SoundHandler

Stream mapping:

Stream #0:0 -> #0:0 (copy)

Press [q] to stop, ? for help
size= 935kB time=00:00:30.00 bitrate= 255.3kbits/s
video:0kB audio:929kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.621016%

comment:7 by Carl Eugen Hoyos, 10 years ago

Resolution: duplicate
Status: newclosed
Summary: Duration with -t before -i is actually value of -t plus value of -ssDuration with -t before -i is actually value of -t plus value of -ss using -codec copy
Version: 2.4.10git-master

Duplicate of ticket #4475.

Note: See TracTickets for help on using tickets.