vinloren
Posts: 36
Joined: Sun Aug 05, 2012 2:08 pm

raspbian omxplayer seg. fault reading from /dev/stdin

Tue Oct 23, 2012 5:50 pm

I wrote a python app on raspbian wheezy ver Sept. 2012 where rtmp streams are read from TV urls to be displayed via omxplayer piped in from rtmpdump - r theurl .. | omxplayer /dev/stdin.

The memory split is 128-128. What happens is that omxplayer aborts with segmentation fault after correctly interpreted the stream from /dev/stdin.

If I save the rtmpdump output in a file then that file can be played by omxplayer without any problem.

Any idea on this issue? Has anybody tried something like this?

henle
Posts: 65
Joined: Sat Apr 21, 2012 7:23 pm

Re: raspbian omxplayer seg. fault reading from /dev/stdin

Tue Oct 23, 2012 8:37 pm

If you just want to leverage rtmpdump functionality in omxplayer, you can enable librtmp when compiling ffmpeg, or install this version: https://github.com/torarin/omxplayer/downloads

vinloren
Posts: 36
Joined: Sun Aug 05, 2012 2:08 pm

Re: raspbian omxplayer seg. fault reading from /dev/stdin

Wed Oct 24, 2012 1:40 pm

Eventually I could solve the issue as follows:
Actually omxplayer has a bug in fetching data from /dev/stdin but it works fine if data come via a "named pipe". A "named pipe" can be made via mkfifo command (i.e: mkfifo /tmp/mystdin) so after I created this /tmp/mystdin the trick worked like this: rtmpdump -r myUrl -o /tmp/mystdin | omxplayer -o hdmi /tmp/mystdin

The /tmp/mystdin file would not require almost any space since data in are flushed out in the piping.

Cheers
Vincenzo

Return to “Graphics, sound and multimedia”