demux 2 or more programs from MPEG TS

This forum is about all development around libVLC.
amigo421
New Cone
New Cone
Posts: 4
Joined: 18 Jul 2017 10:36

demux 2 or more programs from MPEG TS

Postby amigo421 » 18 Jul 2017 10:41

I'm retrieving the media from USB device and supply this to libvlc using callbacks-based media
however the stream contains a few programs (or channels? which term is a correct? )

any example please how to:
1. enumerate available programs in the single TS (for user's choice)
2. split these for the UI switching
(for the displaying this, I'm using vlc-qt)

THank you

amigo421
New Cone
New Cone
Posts: 4
Joined: 18 Jul 2017 10:36

Re: demux 2 or more programs from MPEG TS

Postby amigo421 » 18 Jul 2017 11:52

seems the lib vlc-qt already has high-level function to select desired program , just a setProgram by PID
so the topic is actual for a first question only:

how to enumerate available PIDs , extract PMT, from existing MPEG TS?

oviano
Cone that earned his stripes
Cone that earned his stripes
Posts: 120
Joined: 12 Jan 2012 11:12

Re: demux 2 or more programs from MPEG TS

Postby oviano » 23 Jul 2017 19:14

If the callbacks don't give you access then I'd suggest digging down in the TS code in vlc and have a look to see if it stores the data you need anywhere already. If not maybe you'll end up needing to parse certain parts of the stream yourself. It's a pretty common and well documented format, maybe you need to pre-parse the stream for a short time before passing it to the callbacks, enough time until you've read enough packets to get all the PIDs and data you need.


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 40 guests