如何从DVB卡连接ATSC流? [英] How can I concatenate ATSC streams from DVB card?

查看:154
本文介绍了如何从DVB卡连接ATSC流?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Linux DVB视频采集卡制作一个简单的电视观众。目前,我使用以下过程观看电视(我在Raspberry Pi上):


  1. 使用 azap -r TV_CHANNEL_HERE 。这将为
    设备 / dev / dvb / adapter0 / dvr0 提供字节。

  2. 打开OMXPlayer omxplayer / dev / dvb / adapter0 / dvr0

  3. 看电视!

当我尝试更改频道时出现问题。即使我设置播放器来缓存传入的字节(也用MPlayer尝试),播放器无法承受频道更改(通过重新启动 azap 与新的频道。 p>

我认为这是因为MPEG TS流元数据的变化。



寻找一个C库将让我执行以下操作:


  1. 从DVR设备拉 cache_size * mpeg_ts_packet_size

  2. 根据需要评估每个数据包并重写元数据(PID等)。

  3. 填充FIFO,并生成数据包。

  4. 将{OMXPlayer,MPlayer}设置为从FIFO读取。

另外我在想的是使用程序将MPEG TS转换为MPEG PS并连接这些字节。



想法?

解决方案

确实,当你想调整其他频道时,一些元数据可能会改变和无效以前的缓存数据
不幸的是,我不熟悉你正在使用的工具,但你的观点 2。让我抬起眉头:你会浪费你的时间来重写传输流数据。 p>

我宁愿建议停止并重启进程,因为它似乎在开始工作正常。



PS:
以下是可以帮助的一些工具。此外,我不知道您的问题在哪个级别,但 VLC 可以安装在Raspberry PI上,它优雅地处理TS。


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):

  1. Tune to a channel using azap -r TV_CHANNEL_HERE. This will supply bytes to device /dev/dvb/adapter0/dvr0.
  2. Open OMXPlayer omxplayer /dev/dvb/adapter0/dvr0
  3. 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:

  1. Pull cache_size * mpeg_ts_packet_size from DVR device.
  2. Evaluate each packet and rewrite metadata (PID, etc) as needed.
  3. Populate FIFO with resulting packet.
  4. 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?

解决方案

Indeed, when you want to tune on an other channel, some metadata can potentially change and invalid previously cached data. Unfortunately I'm not familiar with the tools you are using but your point 2. makes me raise an eyebrow: you will waste your time trying to rewrite Transport Stream data.

I would rather suggest to stop and restart process on zapping since it seems to work fine at start.

P.S.: Here are some tools that can help. Also, I'm not sure at which level your problem is but VLC can be installed on Raspberry PI and it handles TS gracefully.

这篇关于如何从DVB卡连接ATSC流?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆