I'm trying to make a simple "TV viewer" using a Linux DVB video capture card. Currently I watch TV using the following process (I'm on a Raspberry Pi):
- Tune to a channel using
azap -r TV_CHANNEL_HERE
. This will supply bytes to device/dev/dvb/adapter0/dvr0
. - Open OMXPlayer
omxplayer /dev/dvb/adapter0/dvr0
- Watch TV!
The problem comes when I try to change channels. Even if I set the player to cache incoming bytes (tried with MPlayer also), the player can't withstand a channel change (by restarting azap
with a new channel.
I'm thinking this is because of changes in the MPEG TS stream metadata.
Looking for a C library that would let me do the following:
- Pull cache_size * mpeg_ts_packet_size from DVR device.
- Evaluate each packet and rewrite metadata (PID, etc) as needed.
- Populate FIFO with resulting packet.
- Set {OMXPlayer,MPlayer} to read from FIFO.
The other thing I was thinking would be to use a program that converts MPEG TS into MPEG PS and concatenate the bytes that way.
Thoughts?