nginx-rtmp-module: video does not stream locally.

I compile nginx 1.4 with your module on the Raspberry Pi.

I can send rtmp (ffmpeg) data to an external server that uses crtmp-server. When ever I stop and start a player it takes a few seconds and the video plays live video fine. (but it needs to use psips patch)

So then I change the ffmpeg destination to the Raspberry. When I press play on player and then start ffmpeg the local player will show video stream fine. As soon press stop and press play it does not stream. I have to stop ffmpeg and start it again- then the player will instantly start to show video.

This is somewhat strange because I added push to external the crtmp-server in the live app. So I start ffmpeg to local Pi nginx stream. The player using remote rtmp stream can start and stop without any issues. But the player using raspberries rtmp stream just dies.

When looking at the stat it shows the video stats; ffmpeg does not report errors; the remote stream can stop and start at will but the local one just wont play after I stopped it.

I have been using osmf strobe meida player. The local stream is hosted on raspberry and the remote stream on a proper server. I open both url’s side by side with the exact same versions of the player - just different stream source.

The script I use to pipe the camera module stream is …

#!/bin/bash  
 urllocal="rtmp://localhost/myapp/mystream"  
 fifo="live.fifo.h264"  
 rm -f "$fifo"  
 mkfifo "$fifo" 

 #this uses the patched version of raspivid with infinite time and -g option  
 raspivid \  
  -fps 25 -g 100 \  
  -t 0 -b 3500000 -o "$fifo" & 

 ffmpeg -y \  
  -f h264 \  
  -i "$fifo" \  
  -c:v copy \  
  -map 0:0 \  
  -f flv "$urllocal"   

At the moment in the log file I found this peculiar line. When I press play the omsf debugger shows me that it is downloading something… very slowly but it does not recognise a stream. I leave it and after a while it just shows some random error number and this shows up in the log.

2013/06/11 20:20:20 [info] 2447#0: *36 client connected '192.168.1.100'
2013/06/11 20:20:20 [info] 2447#0: *36 connect: app='myapp' args='' flashver='WIN 11,7,700,203' swf_url='http://192.168.1.104/osmf/StrobeMediaPlayback.swf' tc_url='rtmp://192.168.1.104:193
5/myapp' page_url='http://192.168.1.104/osmf/debug.html' acodecs=3575 vcodecs=252 object_encoding=3, client: 192.168.1.100, server: 0.0.0.0:1935
2013/06/11 20:20:20 [info] 2447#0: *37 client sent invalid method while reading client request line, client: 192.168.1.100, server: localhost, request: "..©S"....éH.W.M.Õ¶1.äé°òã}. .àWA¤d..a.lù¶?Ã6þE.¹ª(>{Ã"
2013/06/11 20:20:20 [info] 2447#0: *32 disconnect, client: 192.168.1.100, server: 0.0.0.0:1935

I am recompiling now with the debug option. Hopefully I can find something more.

About this issue

  • Original URL
  • State: closed
  • Created 11 years ago
  • Comments: 23 (9 by maintainers)

Most upvoted comments

You need to put more links to this donation site. I have never seen it when reading your blogsm wikis or on github… I am sure more people will donate if they can see the link (also put in a Bitcoin/Litecoin address - that is really popular for donations now a days).

Enjoy the Raspberry. It is quite a nice piece of hardware 😃 👍