[FFmpeg-user] Need help using segment muxer to create mpegts segment every 10 second.

Tom Evans tevans.uk at googlemail.com
Wed Jan 11 16:26:36 CET 2012


On Wed, Jan 11, 2012 at 3:02 PM, Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:
> Does the x264 command line work without the segmenter?
> Does the error trigger for each input video or only for a specific one?
>

Yes, replacing '-f segment ....' with '-f mp4 foo.mp4' works correctly.

Yes, it fails with all video sources I tried where the output c:v is
libx264, or c:v is copy and source is h264 (see below).

ffmpeg -i /tank/video/scratch/ashes_05_match_4.2.5mb.mp4 -r 25 \
    -c:a libfaac -ab:a 128k -ac:a 2 -c:v copy -threads 0 -map 0 \
    -f segment -segment_time 10 -segment_list test.m3u8 \
    -segment_format mpegts stream%05d.ts

ffmpeg version N-36703-g98dfdfd Copyright (c) 2000-2012 the FFmpeg developers
  built on Jan 11 2012 10:35:13 with gcc 4.6.2 20110729 (prerelease)
  configuration: --as=/usr/local/bin/as --cc=/usr/local/bin/gcc46
--extra-libs=-L/usr/local/lib --extra-cflags=-I/usr/local/include
--prefix=/usr/local --mandir=/usr/local/man --disable-protocol=udp
--enable-libx264 --enable-postproc --enable-libfaac
--enable-libmp3lame --enable-libxvid --enable-nonfree --enable-gpl
--enable-version3 --enable-libtheora --enable-libvorbis
--enable-ffmpeg --enable-ffplay --enable-ffprobe
  libavutil      51. 34.100 / 51. 34.100
  libavcodec     53. 54.100 / 53. 54.100
  libavformat    53. 29.100 / 53. 29.100
  libavdevice    53.  4.100 / 53.  4.100
  libavfilter     2. 58.100 /  2. 58.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0.  6.100 /  0.  6.100
  libpostproc    51.  2.100 / 51.  2.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from
'/tank/video/scratch/ashes_05_match_4.2.5mb.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    creation_time   : 1970-01-01 00:00:00
    encoder         : Lavf52.93.0
  Duration: 01:24:31.40, start: 0.000000, bitrate: 2671 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
704x576 [SAR 64:45 DAR 704:405], 2500 kb/s, SAR 91:64 DAR 1001:576, 25
fps, 25 tbr, 25 tbn, 50 tbc
    Metadata:
      creation_time   : 1970-01-01 00:00:00
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz,
stereo, s16, 165 kb/s
    Metadata:
      creation_time   : 1970-01-01 00:00:00
      handler_name    :
[mpegts @ 0x803c3f800] muxrate VBR, pcr every 2 pkts, sdt every 200,
pat/pmt every 40 pkts
Output #0, segment, to 'stream%05d.ts':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    creation_time   : 1970-01-01 00:00:00
    encoder         : Lavf53.29.100
    Stream #0:0(und): Video: h264 (avc1 / 0x31637661), yuv420p,
704x576 [SAR 91:64 DAR 1001:576], q=2-31, 2500 kb/s, 25 fps, 90k tbn,
25 tbc
    Metadata:
      creation_time   : 1970-01-01 00:00:00
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac, 48000 Hz, 2 channels, s16, 128 kb/s
    Metadata:
      creation_time   : 1970-01-01 00:00:00
      handler_name    :
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (aac -> libfaac)
Press [q] to stop, [?] for help
[mpegts @ 0x803c3f800] H.264 bitstream malformed, no startcode found,
use -vbsf h264_mp4toannexb
av_interleaved_write_frame(): Operation not permitted

Cheers

Tom


More information about the ffmpeg-user mailing list