[Libav-user] Batch trimming commands

Simon Daniels simondaniels23 at gmail.com
Wed Jan 11 18:54:35 CET 2012


I tried that and it creates output files with 0 bytes.

Here was my input:
./ffmpeg -i "/Users/user/Documents/original.MP4" -vcodec copy -acodec
copy -ss 00:10:10 -t 00:00:30 -vcodec copy -acodec copy -ss 00:24:15
-t 00:00:30 "/Users/user/Documents/output1.MP4"
"/Users/user/Documents/output2.MP4"

Here was the output:
ffmpeg version 0.8.git-08d2cee, Copyright (c) 2000-2011 the FFmpeg developers
  built on Dec  8 2011 14:22:08 with clang 3.0 (tags/Apple/clang-211.10.1)
  configuration: --enable-static --disable-shared --disable-outdev=sdl
--enable-runtime-cpudetect --disable-bzlib --disable-libfreetype
--disable-libopenjpeg --enable-zlib --cc='clang -m32'
  libavutil    51. 11. 1 / 51. 11. 1
  libavcodec   53.  9. 1 / 53.  9. 1
  libavformat  53.  6. 0 / 53.  6. 0
  libavdevice  53.  2. 0 / 53.  2. 0
  libavfilter   2. 27. 5 /  2. 27. 5
  libswscale    2.  0. 0 /  2.  0. 0
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/user/Documents/original.MP4':
  Metadata:
    major_brand     : avc1
    minor_version   : 0
    compatible_brands: avc1isom
    creation_time   : 2011-07-09 14:44:04
  Duration: 00:34:39.11, start: 0.000000, bitrate: 15151 kb/s
    Stream #0.0(eng): Video: h264 (Main), yuv420p, 1280x720 [SAR 1:1
DAR 16:9], 15008 kb/s, 59.94 fps, 59.94 tbr, 90k tbn, 119.88 tbc
    Metadata:
      creation_time   : 2011-07-09 14:44:04
    Stream #0.1(eng): Audio: aac, 48000 Hz, stereo, s16, 128 kb/s
    Metadata:
      creation_time   : 2011-07-09 14:44:04
[buffer @ 0xc05fc0] w:1280 h:720 pixfmt:yuv420p tb:1/1000000 sar:1/1 sws_param:
encoder 'aac' is experimental and might produce bad results.
Add '-strict experimental' if you want to use it.
Users-MacBook-Pro:MacOS user$


I also tried ./ffmpeg -i "/Users/user/Documents/original.MP4" -vcodec
copy -acodec copy -ss 00:10:10 -t 00:00:30
"/Users/user/Documents/output1.MP4" -vcodec copy -acodec copy -ss
00:24:15 -t 00:00:30 "/Users/user/Documents/output2.MP4"

Is it designed to support batch commands?

Thanks!



On Fri, Jan 6, 2012 at 4:47 AM, Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:
> Simon Daniels <simondaniels23 at ...> writes:
>
>> Oftentimes I need to trim several clips out of the same video.
>> Unfortunately this means ffmpeg.exe must scan over the same sections
>> of video over and over again to get to the clip's starting point. A
>> more efficient way to handle this would be to batch trimming commands.
>> Maybe something like: ffmpeg -i "original.avi" -ss1 0:10:00 -t1 0:00:30
> "output1.avi" -ss2 0:15:00 -t2 0:00:30 "output2.avi".
>
> Did you test your command line (without "1" and "2" except "output2.avi")?
> It works fine here.
>
> Carl Eugen
>
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user


More information about the Libav-user mailing list