[FFmpeg-trac] #8189(ffmpeg:new): FFMPEG fails to trim beginning of clip
FFmpeg
trac at avcodec.org
Fri Sep 20 20:32:12 EEST 2019
#8189: FFMPEG fails to trim beginning of clip
-------------------------------------+-------------------------------------
Reporter: mmorin | Type: defect
Status: new | Priority: normal
Component: ffmpeg | Version:
| unspecified
Keywords: trim, input | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Summary of the bug: FFMPEG fails to trim beginning of a clip when given as
input option, but works OK as output option. For more information on the
solution, see thread at https://stackoverflow.com/questions/57450657
/ffmpeg-fails-to-trim-beginning-of-clip/57451310#57451310
How to reproduce:
I downloaded the binary from
https://ffmpeg.zeranoe.com/builds/macos64/static/ffmpeg-20190812-faa9cd3-macos64-static.zip
I ran a command to trim the first five seconds of two videos. It succeeded
with the first video, which has 16 MB, but not with the second, which has
2.0 GB.
{{{
$ ~/Downloads/ffmpeg-20190812-faa9cd3-macos64-static/bin/ffmpeg -ss 0 -to
5 -i 00117.MTS -vcodec copy -acodec copy start_00117.MTS
ffmpeg version N-94528-gfaa9cd312f Copyright (c) 2000-2019 the FFmpeg
developers
built with Apple LLVM version 10.0.1 (clang-1001.0.46.4)
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-
fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-
libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg
--enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr
--enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack
--enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2
--enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-
libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa
--enable-libspeex --enable-libxvid --enable-libaom --enable-appkit
--enable-avfoundation --enable-coreimage --enable-audiotoolbox
libavutil 56. 33.100 / 56. 33.100
libavcodec 58. 55.100 / 58. 55.100
libavformat 58. 30.100 / 58. 30.100
libavdevice 58. 9.100 / 58. 9.100
libavfilter 7. 58.100 / 7. 58.100
libswscale 5. 6.100 / 5. 6.100
libswresample 3. 6.100 / 3. 6.100
libpostproc 55. 6.100 / 55. 6.100
Input #0, mpegts, from '00117.MTS':
Duration: 00:12:36.02, start: 1.040000, bitrate: 22490 kb/s
Program 1
Stream #0:0[0x1011]: Video: h264 (High) (HDMV / 0x564D4448),
yuv420p(top first), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 50 tbr, 90k tbn,
50 tbc
Stream #0:1[0x1100]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo,
fltp, 256 kb/s
Stream #0:2[0x1200]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] /
0x0090), 1920x1080
Output #0, mpegts, to 'start_00117.MTS':
Metadata:
encoder : Lavf58.30.100
Stream #0:0: Video: h264 (High) (HDMV / 0x564D4448), yuv420p(top
first), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 25 fps, 50 tbr, 90k tbn, 90k
tbc
Stream #0:1: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp,
256 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame= 304 fps=0.0 q=-1.0 Lsize= 16601kB time=00:00:06.02
bitrate=22590.4kbits/s speed=65.8x
video:15162kB audio:189kB subtitle:0kB other streams:0kB global
headers:0kB muxing overhead: 8.143849%
$ ~/Downloads/ffmpeg-20190812-faa9cd3-macos64-static/bin/ffmpeg -ss 0 -to
5 -i 00118.MTS -vcodec copy -acodec copy start_00118.MTS
ffmpeg version N-94528-gfaa9cd312f Copyright (c) 2000-2019 the FFmpeg
developers
built with Apple LLVM version 10.0.1 (clang-1001.0.46.4)
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-
fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-
libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg
--enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr
--enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack
--enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2
--enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-
libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa
--enable-libspeex --enable-libxvid --enable-libaom --enable-appkit
--enable-avfoundation --enable-coreimage --enable-audiotoolbox
libavutil 56. 33.100 / 56. 33.100
libavcodec 58. 55.100 / 58. 55.100
libavformat 58. 30.100 / 58. 30.100
libavdevice 58. 9.100 / 58. 9.100
libavfilter 7. 58.100 / 7. 58.100
libswscale 5. 6.100 / 5. 6.100
libswresample 3. 6.100 / 3. 6.100
libpostproc 55. 6.100 / 55. 6.100
Input #0, mpegts, from '00118.MTS':
Duration: 00:12:36.59, start: 756.592000, bitrate: 22471 kb/s
Program 1
Stream #0:0[0x1011]: Video: h264 (High) (HDMV / 0x564D4448),
yuv420p(top first), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 50 tbr, 90k tbn,
50 tbc
Stream #0:1[0x1100]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo,
fltp, 256 kb/s
Stream #0:2[0x1200]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] /
0x0090), 1920x1080
Output #0, mpegts, to 'start_00118.MTS':
Metadata:
encoder : Lavf58.30.100
Stream #0:0: Video: h264 (High) (HDMV / 0x564D4448), yuv420p(top
first), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 25 fps, 50 tbr, 90k tbn, 90k
tbc
Stream #0:1: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp,
256 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame=37804 fps=783 q=-1.0 Lsize= 2130467kB time=00:12:36.54
bitrate=23069.0kbits/s speed=15.7x
video:1946718kB audio:23627kB subtitle:0kB other streams:0kB global
headers:0kB muxing overhead: 8.126621%
$ ls -laht start_*
-rw-r--r--@ 1 mmorin staff 2.0G 15 Sep 11:26 start_00118.MTS
-rw-r--r--@ 1 mmorin staff 16M 15 Sep 11:25 start_00117.MTS
}}}
--
Ticket URL: <https://trac.ffmpeg.org/ticket/8189>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list