Hello,
this is a combo patch that:
1) adds an experimental TS demuxer to mplayer
2) adds an input (streaming) interface from DVB cards.
It compiles and runs with the following versions of the drivers:
dvb-kernel (HEAD) (with stock kernel 2.4.20) and 0.9.4 (with kernel
2.4.18)
It was reported to work with Metzlerbros' drivers, but I didn't test them.
A note about the TS demuxer: it's based on Xine's and FFmpeg's ones, it's
very experimental,
and some functions such as seeking are a little more than a joke, so it
needs serious improvement; any volunteer?
In particular I want to add support for teletext and subtitles. Actually
it should be enough for streaming from DVB;
It can accept an option:
-tsfastparse 1
which disables accurate searching of the streams, and in some rare case
(such as small files piped to mplayer) might be necessary;
furthermore -vid and -aid have been raised to 8192.
I couldn't test this demuxer with a stream containing A52 audio, so if you
have some sample, please send me a link.
About the DVB interface:
I made a major cleanup and added the option to record directly in a
compressed format (such as mpeg1 / 4);
e.g.:
# mencoder -dvbin on=1:prog=C5 -oac copy -vop pp=ci:c -ovc lavc -lavcopts
vcodec=mpeg1video:vhq:vbitrate=1150:aspect=4/3 -o x.avi -
notice that you still need to add - at the end, or mencoder will quit
immediately.
You can use any codec and filter you want.
For watching TV you can use the same syntax:
mplayer -dvbin on=1:prog=R2
where R2 is a program defined in your ~/.mplayer/channels.conf, which has
the same syntax as szap and VDR for DVB-S
and the same for tzap in the case of DVB-T.
You can specify with card type you have with the option "type" (SAT or
TER), and which card number with "card" (from 1 to 4).
Default is type=SAT:card01.
Support for DVB-T is analogous, but totally untested: I used dvbstream's
code that usually works well, so where dvbstream works
this patch should run too.
The command-line syntax for DVB-T parameters is a shortened version of the
same parameters in channels.conf,
e.g.: :gi=32 stands for GUARD_INTERVAL_1_32 and so on.
Read libmpdemux/dvbin.c and cfg-common.h for a complete list.
I also removed some previous dependency from ts2ps and streaming_ctrl. The
system-load should be lower and the visualization more reliable.
The rest remains the same: h= channel up, k=channel down.
The lock-up in the case of a scrambled channel still remains, too. I'd
like to know what to do in this case
(tight loop when reading from the stream when filling the buffer).
This demuxer as a strange feature: the first few seconds (3 or 4) usually
are out of sync, but short after the synchrony fixes.
All the other parameters remain the same.
Last minute update: in mencoder.c at line 209 you should add:
#ifdef HAS_DVBIN_SUPPORT
#include "libmpdemux/dvbin.h"
extern dvb_history_t dvb_prev_next = {-1, -1};
#endif
(before
m_config_t* mconfig;
)
otherwise it records only from the first channel it finds in the
conf-file.
Have fun, and please report if it works or not (remember to run mplayer
with -v and send me the log).
Thanks to all the authors from whom I took the code (xine, dvbstream,
ffmpeg).
Nico
dvbin_ts_v5.gz
Description: Binary data
