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

Ly Tran Cong lytc at vega.com.vn
Tue Jan 10 07:28:26 CET 2012


Thanks Tom,

My current system using older version of  ffmpeg and seperate segmenter
utility.
Now I have plan upgrade to ffmpeg 0.9.
I read that ffmpeg 0.9 has segmenter muxer, so I hope that I can remove
seperate segmenting utilities and combine 2 command in one ffmpeg command.
It will decrease delay time in my system.

On Tue, Jan 10, 2012 at 12:42 AM, Tom Evans <tevans.uk at googlemail.com>wrote:

> On Sat, Jan 7, 2012 at 9:31 AM, Ly Tran Cong <lytc at vega.com.vn> wrote:
> > 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
> >
>
> You can use one of many separate utilities for segmenting TS:
>
> https://github.com/johnf/m3u8-segmenter
>
> http://www.ioncannon.net/programming/452/iphone-http-streaming-with-ffmpeg-and-an-open-source-segmenter/
>
>
> Using the first one is simple:
>
> ffmpeg <args> -f mpegts - \
>  | m3u8-segmenter -i - -d 10 -p test -m test.m3u8 -u
> http://yourwebsite/path/
>
> Cheers
>
> Tom
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>



-- 
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