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

Ly Tran Cong lytc at vega.com.vn
Sat Jan 7 10:31:17 CET 2012


Hi all,

I'm trying to use ffmpeg to create mpegts segment for Iphone every 10
second.
Here is my command

ffmpeg -y -i udp://239.30.10.6:5106?reuse=1 -c:v libx264 -b:v 150k -s
320x240 -c:a libfaac -b:a 48k -ar 48000 -map 0 -f segment -segment_time 10
-segment_pattern %05d.ts -segment_basename test test.m3u8

And I got the following segment: test00001.ts, test00002.ts but this is
"nut/multimedia container" so Iphone cannot play this segment.
I also try using parameter "container_format mpegts" or "container_format
ts" but I got the following error

Output #0, segment, to 'list.m3u8':
  Metadata:
    encoder         : Lavf53.24.0
    Stream #0:0: Video: h264, yuv420p, 320x240 [SAR 45:44 DAR 15:11],
q=-1--1, 150 kb/s, 90k tbn, 50 tbc
    Stream #0:1: Audio: aac, 48000 Hz, stereo, s16, 48 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (h264 -> libx264)
  Stream #0:1 -> #0:1 (mp2 -> libfaac)
Could not write header for output file #0 (incorrect codec parameters ?)

How can I use segment muxer to create mpegts every 10 second?
Please help me

-- 
Regards,
Tran Ly

Vega Corporation
98 Hoang Quoc Viet Str, Hanoi, Vietnam
Tel: 84 4 755 4190
Fax: 84 4 755 4190
Mobile: 84 91 487 1115
www.vega.com.vn; www.clip.vn; www.chacha.vn; www.ringring.vn


More information about the ffmpeg-user mailing list