[FFmpeg-user] Unable to trim certain MTS files unless I start from 0:00:00
Simon Daniels
simondaniels23 at gmail.com
Thu Apr 19 00:28:55 CEST 2012
(apologies if this was sent multiple times. I think I'm having issues with
ffmpeg-user list)
Hi guys,
I have a set of .MTS files that I'm trying to trim. If I start at 0:00:00,
the output video works fine. But if I start trimmingany time after 0:00:00,
the output video is empty. I've used the exact same command line with other
.MTS files and had no problem. It seems like something specific to this
Panasonic Lumix camera. MP4 and MOV files work fine too.
This repros in FFmpeg HEAD-8dfb13e, 0.10.2, and 0.8.3.
Any ideas? Thanks!
Users-MacBook-Pro:ffmpeg-0.10.2 user$ *./ffmpeg -ss 00:00:01 -t 00:00:25 -i
00004.MTS -threads 3 -acodec copy -vcodec copy "output.MTS"*
ffmpeg version 0.10.2 Copyright (c) 2000-2012 the FFmpeg developers
built on Apr 15 2012 23:02:27 with llvm_gcc 4.2.1 (Based on Apple Inc.
build 5658) (LLVM build 2336.1.00)
configuration: --enable-static --disable-shared --disable-outdev=sdl
--enable-runtime-cpudetect --disable-bzlib --disable-libfreetype
--disable-libopenjpeg --enable-zlib --arch=x86_64
--sysroot=/Developer/SDKs/MacOSX10.7.sdk --extra-cflags='-isysroot
/Developer/SDKs/MacOSX10.7.sdk'
libavutil 51. 35.100 / 51. 35.100
libavcodec 53. 61.100 / 53. 61.100
libavformat 53. 32.100 / 53. 32.100
libavdevice 53. 4.100 / 53. 4.100
libavfilter 2. 61.100 / 2. 61.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 6.100 / 0. 6.100
Input #0, mpegts, from '00004.MTS':
Duration: 00:01:24.57, start: 0.632622, bitrate: 15063 kb/s
Program 1
Stream #0:0[0x1011]: Video: h264 (High) (HDMV / 0x564D4448), yuv420p,
1280x720 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn, 119.88 tbc
Stream #0:1[0x1100]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo,
s16, 192 kb/s
Stream #0:2[0x1200]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] /
0x0090)
[mpegts @ 0x7f990c054000] muxrate VBR, pcr every 5 pkts, sdt every 200,
pat/pmt every 40 pkts
Output #0, mpegts, to 'output.MTS':
Metadata:
encoder : Lavf53.32.100
Stream #0:0: Video: h264 (HDMV / 0x564D4448), yuv420p, 1280x720 [SAR
1:1 DAR 16:9], q=2-31, 29.97 fps, 90k tbn, 59.94 tbc
Stream #0:1: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, 192 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame= 0 fps= 0 q=-1.0 size= 0kB time=00:00:00.00 bitrate=
0.0kbits/s frame= 0 fps= 0 q=-1.0 Lsize= 657kB time=00:00:00.00
bitrate= 0.0kbits/s
video:0kB audio:586kB global headers:0kB muxing overhead 11.940537%
If I use -ss 0:00:00, it works fine:
Users-MacBook-Pro:ffmpeg-0.10.2 user$ *./ffmpeg -ss 00:00:00 -t 00:00:25 -i
00004.MTS -threads 3 -acodec copy -vcodec copy "output.MTS"*
ffmpeg version 0.10.2 Copyright (c) 2000-2012 the FFmpeg developers
built on Apr 15 2012 23:02:27 with llvm_gcc 4.2.1 (Based on Apple Inc.
build 5658) (LLVM build 2336.1.00)
configuration: --enable-static --disable-shared --disable-outdev=sdl
--enable-runtime-cpudetect --disable-bzlib --disable-libfreetype
--disable-libopenjpeg --enable-zlib --arch=x86_64
--sysroot=/Developer/SDKs/MacOSX10.7.sdk --extra-cflags='-isysroot
/Developer/SDKs/MacOSX10.7.sdk'
libavutil 51. 35.100 / 51. 35.100
libavcodec 53. 61.100 / 53. 61.100
libavformat 53. 32.100 / 53. 32.100
libavdevice 53. 4.100 / 53. 4.100
libavfilter 2. 61.100 / 2. 61.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 6.100 / 0. 6.100
Input #0, mpegts, from '00004.MTS':
Duration: 00:01:24.57, start: 0.632622, bitrate: 15063 kb/s
Program 1
Stream #0:0[0x1011]: Video: h264 (High) (HDMV / 0x564D4448), yuv420p,
1280x720 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn, 119.88 tbc
Stream #0:1[0x1100]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo,
s16, 192 kb/s
Stream #0:2[0x1200]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] /
0x0090)
File 'output.MTS' already exists. Overwrite ? [y/N] y
muxrate VBR, pcr every 5 pkts, sdt every 200, pat/pmt every 40 pkts
Output #0, mpegts, to 'output.MTS':
Metadata:
encoder : Lavf53.32.100
Stream #0:0: Video: h264 (HDMV / 0x564D4448), yuv420p, 1280x720 [SAR
1:1 DAR 16:9], q=2-31, 29.97 fps, 90k tbn, 59.94 tbc
Stream #0:1: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, 192 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame= 640 fps= 0 q=-1.0 size= 40390kB time=00:00:21.33
bitrate=15506.5kbits/sframe= 750 fps= 0 q=-1.0 Lsize= 46332kB
time=00:00:25.00 bitrate=15177.2kbits/s
video:42293kB audio:586kB global headers:0kB muxing overhead 8.053502%
The input video can be downloaded here:
http://dl.dropbox.com/u/28441949/00004.MTS
Here's what MediaInfo says about the input video:
General
ID : 0 (0x0)
Complete name : K:\PRIVATE\AVCHD\BDMV\STREAM\00004.MTS
Format : BDAV
Format/Info : Blu-ray Video
File size : 152 MiB
Duration : 1mn 24s
Overall bit rate : 15.1 Mbps
Maximum Overall bit rate : 18.0 Mbps
Video
ID : 4113 (0x1011)
Menu ID : 1 (0x1)
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High at L4.0
Format settings, CABAC : No
Format settings, ReFrames : 1 frame
Frame mode : Frame doubling
Codec ID : 27
Duration : 1mn 24s
Bit rate mode : Variable
Bit rate : 14.3 Mbps
Maximum bit rate : 16.6 Mbps
Width : 1 280 pixels
Height : 720 pixels
Display aspect ratio : 16:9
Frame rate : 29.970 fps
Standard : NTSC
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.516
Stream size : 144 MiB (95%)
Audio
ID : 4352 (0x1100)
Menu ID : 1 (0x1)
Format : AC-3
Format/Info : Audio Coding 3
Mode extension : CM (complete main)
Codec ID : 129
Duration : 1mn 24s
Bit rate mode : Constant
Bit rate : 192 Kbps
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 48.0 KHz
Bit depth : 16 bits
Compression mode : Lossy
Stream size : 1.94 MiB (1%)
Text
ID : 4608 (0x1200)
Menu ID : 1 (0x1)
Format : PGS
Codec ID : 144
Duration : 1mn 24s
More information about the ffmpeg-user
mailing list