Order Now AdSolution Sign Up | Login » Bits on the Run Sign Up | Login »

Forums

/

Multiple Segments Partitioning

20 replies [Last post]
Reply

By the way, are there some successful implementations, working with JW Player, of Multiple Segments Partitioning? It would allow to seek into files served with "classical" webservers without any additional modules (with files stored in S3 for example...)

Reply

You can look at our beta HTTP Live Streaming provider. Docs, tests and code can be found here:

http://developer.longtailvideo.com/trac/browser/branches/adaptive

Reply

 
The examples work great; happens to be a nginx server, but other HTTP servers should be fine.

Now for the issue of segmenting. There's a great Windows segmenter  tsMuxeR  with one issue. It puts multiple (15) PMT entries in each segment so the adaptiveProvider throws this error  "Multiple PMT entries are not supported."

Would it be possible to ignore the multiple PMT entries and just use the first. Apparently tsMuxeR puts multiple entries in the segments because some players miss the first few???

I've almost got the open source segmenter compiled on Windows, so maybe it's the answer for segmenting...

Reply

I think that could be supported. I'd need a test steam though.

Perhaps first try the open source segmenter? It could be a lot better, and not requiring this hack.

Reply

 
Test Streams are here:  http://willswonders.myip.org:8088/HTML5/provider.html

A Day Like Today is from tsMuxeR. You can see the "Multiple PMT entries are not supported." error there.

Dartmoor was made with the open source segmenter. You can see the "PES start code not found or not AAC/AVC" error because the transcoding is directed at iOS devices.

A BIG problem with the op segmenter, is that the video first has to be transcoded to MPEG-TS (using ffmpeg or equivalent) before it can be segmented, whereas tsMuxeR does the segmenting directly. The examples for the op segmenter are directed to iOS and don't work with the JW Player. I've done some experimenting with the ffmpeg transcoding settings, but have not yet gotten a TS file that the JW Player will play.

Reply

Yes, there's a known issue with that segmenter that prevents files processed by it from easy streaming in Flash. I have added some info here:

http://developer.longtailvideo.com/trac/ticket/1224

On top of that, it's indeed a separate tool that needs a TS stream as input. It'd be much nicer to have a drag&drop tool like MiroVideoEncoder that can create an HLS stream from an MP4/AVI/MOV.

Reply

 
I found that I could use ffmpeg to copy the MP4 file to a TS file that plays in the JW Player.ffmpeg -i infile.mp4 -vcodec copy -acodec copy -vbsf h264_mp4toannexb -f mpegts outfile.ts

But then, the segmenter messes it up. I'm using the latest Windows binary r15 segmenter from here:  http://code.google.com/p/httpsegmenter/

I guess next I'll look into installing the code-shop smooth streaming module on my Apache server to see if it will generate usable segments...

Reply

The code-shop module works perfectly, as does the Wowza server.

The httpsegmenter is a mess, plus nobody is maintaining it. It's really the weak link in HLS streaming with open-source tools.

Reply

We're currently committed to Encoding.com for all our streaming conversion. We're running into the same "Multiple PMT entries are not supported.". Does anyone know what setting is needed for the Encoding.com profile to output compatible .ts files? or would it be helpful if we shared a example so that the experimental JW Player code can include support for Encoding.com output?

Reply

Sharing an example is always helpful.

The "multiple PMT entries" can be caused by having a stream with multiple audio or video tracks.

Reply

In this case VLC (if a sufficient indicator?) is reporting one audio stream and one video stream.

Our sandbox is setup here (based on the already provided demo). Our test streams are the last two entries. http://pjs.plainjoe.net/temp/jw/provider.html

Reply

I can take a look at that.

Reply

Thanks for your time.

Any update or new info at this point?

We've gotten our build environment working and are tweaking source code but no luck yet. We need to dig deeper into the binary spec for MPEG TS I suppose.

If you've gleaned anything at this point that might help, it'd be much appreciated.

Reply

Hmm, nothing yet. Sorry. Can you give me just the URL of a single M3U8 playlist to test? One with e.g. a 1 minute stream. Checking that one can be swiftly done in between other things.

Reply

I don't have any short clips available to post. Here is a 3 minute creative commons video.

(contains two quality levels)
http://production.mediasocial.tv.s3.amazonaws.com/Videos/2796/ios.m3u8

(the associated 340kbps quality level)
http://production.mediasocial.tv.s3.amazonaws.com/Videos/2796/ios-340k.m3u8

We've also updated the "Test 2" link at our test page to point to this.
(http://pjs.plainjoe.net/temp/jw/provider.html)

Many thanks for the help

Reply

Got it; I'll take a look at it.

Reply

I have also been in communication with Encoding.com regarding this beta branch.

I've received this from them:
"If you can give us ffmpeg or x264 commands [that Longtail] would like to use we can add into our API"

Reply

I don't think the problems here are around FFmpeg or x264. All problems we have with playing of HLS streams revolve around the way the streams are segmented. Encoding.com likely uses an open-source tool called "Segmenter" for this, which has a few quirks our player still needs to work around.

Reply

The problem is indeed not with the encoding, but with the TS muxing. This stream does not just contain a PMT, it also contains an NIT (network information table). Perhaps these streams can be muxed in such a way that this NIT is not included?

Reply

Encoding.com is saying they can't provide an ETA on if/when they can adjust this. So at the moment I don't have a way to change the muxing/segmenting.

Do you have any other suggestions at this point? I have experience with BMP/PNG binary formats, but have not worked with AS or the TS binary format much. I'm tempted to dig into the JW source and TS specs on this further, but I don't want it to be a rabbit hole if you know what I mean.

I appreciate your thoughts and help thus far though. We're a paid licensee if that helps here at all :).

Reply

Have you tried another service? Zencoder for example works great with the player.

The parsing is indeed a rabbit hole. There's already quite a few exceptions for nonstandard TS handling, and I'm hesitant to add even more.

Post new comment

  • Allowed HTML tags: <code> <blockquote> <em> <strong> <strike> <ul> <li> <ol>
  • You may post code using <code>...</code> .
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options