[vdr] Basic shell problems / stdin / requant

Gavin Hamill gdh at acentral.co.uk
Sun Mar 27 05:02:27 CEST 2005

Hi :)

Following Sascha's announcement of an external script being used for
remuxing, I've tried to implement not only 'normal' remuxing, but to
include 'requantisation' in the pipeline so that the resulting MPEG2
stream sent to the client is much smaller than the input one.. and
everything in realtime....

Unfortunately I've come up against a fairly fundamental problem... I've
first grabbed some test data (by setting the /root/externremux.sh to
"cat >/test.ts" for a few seconds).

I'm trying to use this basic script that I found on a MythTV forum:

mkfifo vid aud demux.mv2 demux0.mp2
replex --demux -k -o demux &
cat demux.mv2 | buffer -s 50k -m30m | tcrequant -f 1.33 | buffer -m10m
>vid &
cat demux0.mp2 | buffer -s 50k -m30m | cat | buffer -m10m >aud &
mplex -f 3 -V -o /dev/stdout aud vid

And when I do a test run of just the 'replex' line from the shell, it

telly:/tmp# cat test.ts  | replex --demux -k -o demux
using stdin as input
Checking for TS: confirmed
Trying to find PIDsmux.sh
found vpid 610 (0x0262)  apid 611 (0x0263)
Video: aspect ratio: 16:9  size = 720x576  frame rate: 25.000 fps  bit
rate: 6.50 Mbit/s
  vbvbuffer 1835008
Sequence Extension: chroma 4:2:0   size = 720x576  bit rate: 6.50 Mbit/s
vbvbuffer 1835008  frame rate: 25.000
starting with video PTS: 24:14:24.721
Audiostream: layer: 2  BRate: 256 kb/s  Freq: 48.0 kHz frame size: 768
starting audio PTS: 24:14:24.410

But when I run it by piping the input to the script, replex doesn't get
any input:

telly:/tmp# cat test.ts  | /root/externremux.sh
telly:/tmp# using stdin as input
Checking for TS: failed
Checking for AVI: failed
Checking for PS: confirmed(maybe)
read 0.00 MB
Can't find all required streams
Please check if audio and video have standard IDs (0xc0 or 0xe0)

And now if I remove the '&' from the replex line - it works again, but
of course the script halts forever since the fifos replex is writing to
will never be read!

Am I missing something really simple here? 


More information about the vdr mailing list