[FFmpeg-user] Unable to trim certain MTS files unless I start from 0:00:00

Simon Daniels simondaniels23 at gmail.com
Mon Apr 23 23:02:04 CEST 2012


Any ideas Audrey? Thanks!

On Thu, Apr 19, 2012 at 9:26 AM, Simon Daniels <simondaniels23 at gmail.com>wrote:

> Thanks Audrey. And apologies to ffmpeg-user as I think my message was sent
> a few times :-(
>
> I'm not seeing the * on my end so I believe that's an email formatting
> issue.
>
> I tried moving the -i to the first argument but I got the same results on
> the latest GIT HEAD. It only trims correctly if starting from 0. Again,
> it's only unique to these MTS files off my Panasonic Lumix camera. I've
> trimmed other MTS files without issues.
>
> Users-MacBook-Pro:ffmpeg-HEAD-a4a88fd user$ ./ffmpeg -i 00004.MTS -ss
> 00:00:01 -t 00:00:25 -threads 3 -acodec copy -vcodec copy "output.MTS"
> ffmpeg version 0.10.2.git-a4a88fd Copyright (c) 2000-2012 the FFmpeg
> developers
>   built on Apr 19 2012 09:13:53 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. 46.100 / 51. 46.100
>   libavcodec     54. 14.101 / 54. 14.101
>   libavformat    54.  3.100 / 54.  3.100
>   libavdevice    53.  4.100 / 53.  4.100
>   libavfilter     2. 70.100 /  2. 70.100
>   libswscale      2.  1.100 /  2.  1.100
>   libswresample   0. 11.100 /  0. 11.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         : Lavf54.3.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.0 q=-1.0 Lsize=     656kB time=00:00:00.00 bitrate=
> 0.0kbits/s
> video:0kB audio:586kB global headers:0kB muxing overhead 11.958493%
>
>
>
> On Thu, Apr 19, 2012 at 1:05 AM, Andrey Utkin <
> andrey.krieger.utkin at gmail.com> wrote:
>
>> 2012/4/19 Simon Daniels <simondaniels23 at gmail.com>:
>> > 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"*
>>
>> What do the * signs mean in cmdline?
>>
>> AFAIR, -ss, -t args position matters. Placing them before -i makes
>> them work without transcoding, and after - with transcoding. Try
>> second way, it will be more time expensive, but should generally work
>> better.
>> If my idea is right, and if you need to avoid transcoding, then
>> probably your case requires writing tailored application.
>>
>> --
>> Andrey Utkin
>> _______________________________________________
>> ffmpeg-user mailing list
>> ffmpeg-user at ffmpeg.org
>> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>>
>
>


More information about the ffmpeg-user mailing list