开发者

DVB Recording of a channel

开发者 https://www.devze.com 2023-02-20 11:48 出处:网络
I\'m trying to record a DVB-Channel with a DVB-T Tuner. I already did much research on this topic but I don\'t get really \"information\" what to do.

I'm trying to record a DVB-Channel with a DVB-T Tuner. I already did much research on this topic but I don't get really "information" what to do.

Basically I'm already able to create a own Graph with the default GraphEdit, make a 开发者_C百科tune request and watch a channel. Converting the Graph to C# Code with the DirectShowLib or to C++ isn't a big problem for me.

But what I don't know, what is the right approach to record the movie. (Without decode it to mpeg / avi and so on.)


The most important parts of the graph are some tuning related filters, they connect to the demultiplexer (demux), and the demux will output a video and audio stream.

The easiest way to get the mpeg stream is putting a filter before the demux. For example a samplegrabber. There you will receive the complete transport stream as it is broadcasted. But that normally contains multiple programs which are multiplexed on the same frequency. If you only need one program, you need to filter the other programs out of the stream.

If you only need a single program, it is probably easier to directly connect the audio and video stream coming out of the demultiplexer, to a multiplexer, and write it's output to a file. You need to make sure there is no decoder or any other filter between the demux and the mux. The problem is that you need to find a directshow multiplexer, as windows does not contain a standard multiplexer. I don't know any free multiplexer.

What you also can do is write the audio and video directly to a file. (again without decoding, or anything else). Then use for example ffmpeg to join the audio and video to a single file.

C:\> ffmpeg -i input.m2v -i input.mp2 -vcodec copy -acodec copy output.mpg

You probably also need to delay the audio or video stream to get them in sync.

One addition, of course you can also use ffmpeg to convert the multi program transport stream to a single program stream.

0

精彩评论

暂无评论...
验证码 换一张
取 消