mpeg-ts and multifilesink

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

mpeg-ts and multifilesink

dean

Has anyone gotten multifilesink with h.264 in an mpeg.ts to work playback in iOS?

Single mp4s work but multiple or single mpeg.ts doesn't.

Any tips on how to make compatible multifilesink .ts files for iOS?
Reply | Threaded
Open this post in threaded view
|

Re: mpeg-ts and multifilesink

Mike Mitchell
If I understand correctly you want to create multiple files from a single h.264 stream in iOS.

If you google "gstreamer multifilesink mp4" you will find some discussion of this in the past. I have not done it but have researched the issue. One problem is that an H.264 stream cannot be easily segmented. You need to decode, split the raw and encode.  The other issue is that each new file requires the muxer to be reinitialized.  So the solution ends up being like starting a new file each time anyway, therefore you don't need multifilesink. What you need is a program that can carefully redirect the raw stream from an old encoder and muxer to a new one every so often.  

Mike Mitchell

On Sun, Oct 7, 2012 at 12:24 AM, dean <[hidden email]> wrote:

Has anyone gotten multifilesink with h.264 in an mpeg.ts to work playback in
iOS?

Single mp4s work but multiple or single mpeg.ts doesn't.

Any tips on how to make compatible multifilesink .ts files for iOS?




--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/mpeg-ts-and-multifilesink-tp4656497.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: mpeg-ts and multifilesink

dean

Thanks. I've the splitting working for mp4 files and video splits nicely but
audio has a pop/click when you try to join them together because the audio
buffers don't seem to line up nicely. I'm not sure how to get around this yet.
(maybe decode just the audio and reencode?)

Mpeg ts files still seem to be an issue though as even a single ts doesn't
want to be read by ios devices. Is there some setting I'm missing?

Thanks,

Dean
Reply | Threaded
Open this post in threaded view
|

Re: mpeg-ts and multifilesink

Brian Quandt
Dont' know what you are doing... but ts is supported in iOS (and actually preferred, as part of the HTML5, ie Pantos spec... see www.ioncannon.net for details.



On Thu, Oct 11, 2012 at 11:37 AM, dean <[hidden email]> wrote:

Thanks. I've the splitting working for mp4 files and video splits nicely but
audio has a pop/click when you try to join them together because the audio
buffers don't seem to line up nicely. I'm not sure how to get around this
yet.
(maybe decode just the audio and reencode?)

Mpeg ts files still seem to be an issue though as even a single ts doesn't
want to be read by ios devices. Is there some setting I'm missing?

Thanks,

Dean



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/mpeg-ts-and-multifilesink-tp4656497p4656554.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: mpeg-ts and multifilesink

Brian Quandt
Another note, there is a bug in the existing ffmpeg libs (which some parts of gstreamer are built upon) which don't handle ts mux'ing of MP4 main profile from mp4 muxed content.  There are many folks aware of this and I tried to get one of my clients (a Hollywood studio) to pay for the fix, but the project went on hold prior to funding.   This is however, probably unrelated to your specific issue (doubt you are working with main profile).

On Thu, Oct 11, 2012 at 10:56 PM, Brian Quandt <[hidden email]> wrote:
Dont' know what you are doing... but ts is supported in iOS (and actually preferred, as part of the HTML5, ie Pantos spec... see www.ioncannon.net for details.



On Thu, Oct 11, 2012 at 11:37 AM, dean <[hidden email]> wrote:

Thanks. I've the splitting working for mp4 files and video splits nicely but
audio has a pop/click when you try to join them together because the audio
buffers don't seem to line up nicely. I'm not sure how to get around this
yet.
(maybe decode just the audio and reencode?)

Mpeg ts files still seem to be an issue though as even a single ts doesn't
want to be read by ios devices. Is there some setting I'm missing?

Thanks,

Dean



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/mpeg-ts-and-multifilesink-tp4656497p4656554.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: mpeg-ts and multifilesink

dean

I can get ts files working on IOS fine but just not the gstreamer ones so far.
I'm doing something like this:

gst-launch-1.0 -e rtspsrc location=rtsp://10.10.10.10 latency=100 ! rtph264depay  ! capsfilter caps="video/x-h264,width=720,height=480,framerate=(fraction)30/1" !  mpegtsmux  !  filesink location=file.ts

It's baseline profile coming from a hardware encoder.

Could it be because there's no PAT in the gstreamer ts files?

Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: mpeg-ts and multifilesink

dean

Update... A response from the apple forums:
It looks like your stream does not meet transport stream requirements.  Please see 13818-1:2007, section 2.14.1.
 
It looks like you are not putting in Nal type 9 (access unit delimiter NALs), and I do not see a SPS or PPS in that segment (you should put an SPS/PPS with each IDR frame (nal type 5).


From that it looked like I need to add an h264parse but then I don't get a stream
I can play in VLC either. Do I need something else?
Reply | Threaded
Open this post in threaded view
|

Re: mpeg-ts and multifilesink

dean

SPS and PPS are in there now with the right caps.

Since I'm capturing on an already running stream
and writing from the first iframe I see...

How does one insert an AU delimiter into rtph264depay?