Jump to content
  • entries
    295
  • comments
    862
  • views
    242,346

new project curse

Sign in to follow this  
EricBall

397 views

I have too many unfinished projects. I think of a project and I can think of nothing else. It rattles inside my head, making it difficult to think of anything else. But as I actually start the project the noise quiets down and life returns to normal. But then I get another idea and I can never quite get back to finishing off the project.

 

Currently rattling around in my head is an idea for an MPEG Transport Stream separator. This relates back to my idea of using my PS3 as a MythTV front end. (That project is stalled for a few reasons, including my unfinished outdoor antenna project.) I have some sample ATSC captures which the PS3 won't play back without "transcoding", which I'd like to avoid. The files are basically raw MPEG Transport Streams, and I suspect the reason my PS3 won't play them is because they 1 - are slightly corrupted and don't begin nicely and 2 - contain multiple channels.

 

However, the transport stream is a fairly simple container format. The audio & video streams are chopped up into 184 byte chunks, then a 4 byte header is added. (Except for the start & end of frames which have a timestamp or padding added respectively.) The whole mess is then multiplexed together with some metadata packets. So unlike other container formats, my program only has to deal with packets and parsing some of the metadata. Everything else can be passed through unchanged.

 

The audio and video streams for each channel in the transport stream are identified by the Program Map Table and the PMTs are identified by the Program Access Table. So, to extract a single channel I need to find and parse the PAT and the PMT then copy over all of the packets for just those audio and video streams along with the PMT and a PAT which only contains that channel.

 

Surprisingly, I haven't found a tool which does this. However, there are other tools which do various repairs on transport streams. So I don't know if I need to implement something like that.

Sign in to follow this  


1 Comment


Recommended Comments

Well, the program is done and as tested as I can without a live source. My PS3 is happy with the streams, so that's a good sign for the future. (Although I don't know how it will handle streams with reception errors.)

 

Given that's done, what else do I need to finish for my MythTV setup.

1. Finally get around to building the best damn antenna I can instead of the quick & dirty one I've been using for the past year. Pre-reqs - materials & build planning.

2. Mount that antenna outside. Pre-reqs - materials (Coax, connectors, coax tools, grounding block.)

3. Take delivery of replacement computer & migrate everything, acquire ATSC capture card, install MythTV back-end.

 

Hmmm... I might be able to do #3 before #1 & #2. I just need to split the cable behind the TV and connect up the existing coax to the basement. Yeah, that'll work. Woo-hoo. I might even be able to get this up & running before the Olympics.

Share this comment


Link to comment
Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...