Piped Video Streaming Crash

Hello all

Sorry if this is a duplicate, haven’t found a thread with me specific
config (no UDP).

System:
ubuntu 12.10
N2100
SBX
GNU Radio 3.7.2.1
UHD 003.006.002-1

I have been trying to set up a video link (loop back cable) using named
pipes but am stuck with a crash.
It works until I introduce the USRP into the loop. Though it is the same
set up I use to transmit I text file without trouble.

What I have done:

VLC - Named Pipe - VLC
(fail) - found reference to VLC bugs in forums so gave up on that

VLC - Named Pipe - Mplayer
(works)

VLC - Named Pipe 1 - File Source GRC - File Sink GRC - Named Pipe 2 -
Mplayer
(works)

VLC - Named Pipe 1 - File Source GRC - OFDM MOD - OFDM DEMOD - File Sink
GRC - Named Pipe 2 - Mplayer
(works)

Now with hardware:
VLC - Named Pipe 1 - File Source GRC - OFDM MOD - USRP Sink- USRP
-Source -
OFDM DEMOD - File Sink GRC - Named Pipe 2 - Mplayer
(FAILS!!). Reports: Segfault (core dumped). GRC file is running, VLC is
streaming. Fail occurs as soon as I open Named Pipe 2 with Mplayer

However, this is the identical GRC - USRP setup I use to repeatedly
transmit a text file successfully.
I have no reason to believe the UHDlib is failing, the segfault I think
is
a python crash?

The parameters I am using:

VLC:
cvlc v4l2:///dev/video0 :v4l2-width=160 :v4l2-height=120
:v4l2-aspect-ratio=4/3 --noaudio
–sout="#transcode{vcodec=h264,vb=1024}:file{dst=./txPIPE.ts}"
:sout-keep

USRP:
sample rate 12.5M

GRC: - not sure of the impact of these settings
These are the ones I am not so sure of:
File source, repeat yes or no?
File Sink, unbuffered on or off? append file on or off?

I am guessing my problem is related to sample rate, buffer sizes, frame
rate etc. I have tried a few permutations without luck though, but not
everything.
I have not set camera fps ->
*v4l2-fps *I have hoped the data flow back pressure would be
dealt
with by perhaps VLC with default setting (zero)? Or I’d just miss frames
on
reception?

Just looking for some suggestions here I as I have put a good bit of
time
into this now without luck…

regards
Alexander Buckley

Hi Alexander,

interesting approach!
Just a few quick questions to understand better:

Now with hardware:
VLC - Named Pipe 1 - File Source GRC - OFDM MOD - USRP Sink- USRP
-Source - OFDM DEMOD - File Sink GRC - Named Pipe 2 - Mplayer
(FAILS!!). Reports: Segfault (core dumped). GRC file is running, VLC
is streaming. Fail occurs as soon as I open Named Pipe 2 with Mplayer

What is segfaulting? Mplayer or your Flowgraph?
If it’s Mplayer I don’t know, but it sounds like a solid Mplayer bug…

Also: Be aware that a named pipe might still have unread information
from runs before; I guess the safest way would be rm’ing and mkfifo’ing
right before every start.

GRC: - not sure of the impact of these settings
These are the ones I am not so sure of:
File source, repeat yes or no?
don’t repeat. Wouldn’t work anyway. a byte that came out of a named pipe
is gone forever :slight_smile:
File Sink, unbuffered on or off? append file on or off?
buffering shouldn’t change much, but since your fifo is basically a
buffer, just use unbuffered.
Appending on/off is meaningless for named pipe file descriptors. use the
off variant - it’s how fifo’s were meant to be used.

Do things work out if you replace Named Pipe 2 with an actual file and
try to play back that afterwards?

Greetings
Marcus