Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Receiving a stream from mjpg-streamer #426

Open
danielmoreink opened this issue Feb 9, 2016 · 6 comments
Open

Receiving a stream from mjpg-streamer #426

danielmoreink opened this issue Feb 9, 2016 · 6 comments

Comments

@danielmoreink
Copy link

(This is a x-post from huceke/omxplayer, but with updated outputs -- a friend told me to ask here)

Hello,

I'm having an issue with OMXPlayer and mjpg-streamer. I'm pretty new to all of this but I promise I tried to find a solution elsewhere before bothering you. But to no avail...

This is what I am trying:
I'm working on an art installation that uses pairs of RPI's (A & B) to stream webcam footage. Pi A runs mjpg-streamer and works fine -- I can watch the stream via VLC from my Computer or the Web-Interface. But if I try to make OMXPlayer play this stream, it's not showing anything. I tried two ways, first by creating a pipe and feed it to the player and secondly to give OMXPlayer the adress of the stream directly (http://IP:8080/?action=stream). Both didn't work.

This is OMXPlayer's output:

pi@position-a-10 ~ $ omxplayer -r -b --live  "http://10.0.3.112:8080/&action=stream"

/usr/bin/omxplayer: line 67:  2808 Aborted                 LD_LIBRARY_PATH="$OMXPLAYER_LIBS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" $OMXPLAYER_BIN "$@"

After this, it seems that the analoge video output fails to work and I have to reboot the machine.

Trying the same with a mp4-video I put on my server, it works flawlessly.
I also tried another mjpg stream from the internet which also works perfectly.
(http://141.89.114.98/cgi-bin/video640x480.mjpg)

This may also be interesting: After some tryouts and reboots I don't get the Error from above but this:

omxplayer "http://10.0.3.112:8080/?action=stream"
Video codec omx-mjpeg width 640 height 480 profile -99 fps 25.000000
Subtitle count: 0, state: off, index: 1, delay: 0

It then just stays like this in my SSH console until I cancel the process, but I get no image whatsoever on my screen attached to the Pi.

After I ctrl+c it shows this:

/usr/bin/omxplayer: line 67: 3010 Aborted LD_LIBRARY_PATH="$OMXPLAYER_LIBS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" $OMXPLAYER_BIN "$@"

Do you have any idea what could be the issue?
Thanks a lot for your work!

Dani

@jehutting
Copy link

When omxplayer reads the http://141.89.114.98/cgi-bin/video640x480.mjpg, logging reveals

21:22:53 T:18446744073367519893 ERROR: COMXPlayer::interrupt_cb - Timed out

This error is given when no data comes in within the default 10 sec timeout period.

I increased the timeout to 30 sec and now it shows me a dark window with at its top the location, date and time (I guess when someone switches on the light in the room I get a better picture...)

The timeout value is not very accurate, it takes more time before it actually times out.

The timeout can be set with the --timeout option with a value in seconds. E.g.
omxplayer -r -b --live --timeout 30 http://141.89.114.98/cgi-bin/video640x480.mjpg

@danielmoreink
Copy link
Author

Hey thanks for your reply.
Unfortunatly that given stream (http://141.89.114.98/cgi-bin/video640x480.mjpg) is no problem for me, it works without any problems. But it is my own stream that Pi B doesn't show. It runs inside my university network so I guess there's no way to give you access to it. It's a standard mjpg-streamer output, this is how I started it:
$ mjpg_streamer -i "/usr/local/lib/input_uvc.so -d /dev/video0 -r 640x480 -f 25 " -o "/usr/local/lib/output_http.so -n -w /usr/local/www -p 8080"

Just to make sure I also tried the timeout method with the omxplayer trying to receive my stream, but with the same results --> nothing happens

$ omxplayer -r --timeout 30 "http://10.0.3.112:8080/?action=stream"
Video codec omx-mjpeg width 640 height 480 profile -99 fps 25.000000
Subtitle count: 0, state: off, index: 1, delay: 0

until i ctrl+c it

$ omxplayer -r --timeout 30 "http://10.0.3.112:8080/?action=stream"
Video codec omx-mjpeg width 640 height 480 profile -99 fps 25.000000
Subtitle count: 0, state: off, index: 1, delay: 0
have a nice day ;)

what also kills the analoge video output sometimes and I have to reboot the Pi.

@jehutting
Copy link

Pitty the --timeout didn't bring much.

There are some issues reported with rtmp streaming (like issue 361/410/415). All are pointing to ffmpeg not delivering data (no picture) or (premature signalling) stream EOF (aborted omxplayer).

Looking through the issues I also stumbled upon issue #314, which seems to match your issue. It still seems unsolved...

(Question to all :) could it be that aborting omxplayer, the resources of the analoge (/composite) video output (=yellow port) are not freed? Firmware issue? Anyone experienced this stalling too?

@danielmoreink
Copy link
Author

little update: i managed to realize my plans by using gstreamer on both machines and stream directly to the ip of the receiver. sadly, no luck with omxplayer on this. but thanks for your help anyway! :)

@jehutting
Copy link

@danielmoreink Can you close this issue?

@Ruffio
Copy link

Ruffio commented Jan 22, 2017

@popcornmix It looks like it can be closed...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants