[linux-dvb] Simultaneous recordings from one frontend

BOUWSMA Barry freebeer.bouwsma at gmail.com
Wed Mar 9 16:01:24 CET 2011

On Wed (Wednesday) 09.Mar (March) 2011, 14:41,  Pascal Jürgens wrote:

> SUMMARY: What's the best available tool for demultiplexing into 
> multiple simultaneous recordings (files)?

Question -- can you clarify this -- do you want to record two
simultaneous programmes from one device, say, f'rinstance two
BBC radio shows from one common transponder/multiplex for the
sake of efficiency, but which run with overlapping times, or
are you wanting to record a single transport stream or other
permutation thereof (PS, ES, raw payload data) of one single
programme into overlapping files, not unlike juggling floppies?

> I'm looking for a way to record a TS to overlapping files (ie, 
> files2 should start 5 minutes before file1 ends). This means 
> that two readers need to access the card at once. As far as I 
> can tell from past discussions [1], this is not a feature that's 
> currently present or planned in the kernel.

If these would be two distinct programmes, I'd point you in the
direction of what I think is called SuperDemuxer.  Ah, I do have
its source handy:  super_demux-0.3 of which I run a slightly 
hacked 2005 vintage to split out a half dozen overlapping radio
shows into separate mp2 files.

For overlapping files (programmes?) I would suggest just using
`tee' or a similarly-influenced utility and if you can, accept
the waste outside of overlapping programmes.

For multiple access to a single stream, I've had great success
for what I do with UDP multicast over a reliable physical medium.
But there I'm only caring about the simple payload and not the
least about any of the added Transport Stream information.

> - Adam Charrett's dvbstreamer [2] seems to run a sort-of 
> ringbuffer and can output to streams and files. However, it's 
> not all too stable, especially when using the remote control 
> protocol.

For all access to my frontends to get a Transport Stream, I rely 
/media/server/home/beer/bin/dvbstream: broken symbolic link to 
which I'm not sure if it's identical -- and again, likely to have
suffered a few minor hacks here.  I believe it works well for me
the few times I've tested multicast streaming before settling on
stripping out just the payload first.

But as you may guess I'm using essentially a server for everything
that I won't be seeing user stability problems you may have.

> - the RTP streaming apps (dvblast, mumudvb, dvbyell etc.) are 
> designed to allow multiple listeners. The ideal solution would 
> be something like an interface-local ipv6 multicast (mumudvb 
> recommends using a TTL of 0 to prevent packets from exiting the 
> machine, but that seems like a cludge). Sadly, I haven't gotten 
> that to work [4].

Because I only care about the multicast payload, I've used a
version, again perhaps slightly hacked, of
mast-0.2.2/src/mast_rawcast   -p MPA
which again may be unsuitable for your needs -- over IPv4 for
now.  I have no worries about the stream getting out of the local
network, because there's no routing here to send it anywhere that
speaks multicast, support for which I've found less than ideal.

> Additionally, I wasn't able to consume a regular ipv4 multicast 
> with two instances of mplayer - the first one worked, the second 
> one couldn't access the url.

I've had to rely on `vlc' which plays my audio-only stream as 
simple RTP perfectly, even on visiting 'doze machines.  For
scripted server use I rely on something else.

Now that I think of it, I did test simpler streaming of more
than just one part of a more complex stream, had had success in
differentiating the different parts of the stream with `mplayer'
so despite my failing memory, I can admit to doing to.

Another thing to note is that perhaps some utilities may want
to speak over a return channel -- I see port 5003 before I hacked
that useless feedback away, to prune to the bare minimum on my
ancient low-bandwidth ethernet, although I can't imagine how a
utility would depend upon this in my situation.

Hope this is helpful, somehow.  As I say without a better (more
specific) example of what you're trying to do, I can't tell if
I'm leading you astray thanks to simple misunderstanding...

barry bouwsma

More information about the linux-dvb mailing list