demos icon indicating copy to clipboard operation
demos copied to clipboard

How do you consume the stream?

Open m59peacemaker opened this issue 7 years ago • 13 comments

I launched the demos to my iPad and made my best attempts to consume/view the streams to no avail. On the FMP4 demo, I used the url as described in the article, which is also logged in the app. I figured opening it as a network url in VLC would be best, but that nor any other thing I tried worked out. The app was logging that a client had connected, but no media ever came up in VLC. I had even less progress with the RTSP demo, as it doesn't log a url to access. Any advice to view the stream from another device/machine on the network?

m59peacemaker avatar Jul 06 '17 02:07 m59peacemaker

@IPv6 could you please take a look?

dangerden avatar Jul 06 '17 04:07 dangerden

@m59peacemaker Of course, here it is.

  1. I suggest to use VLC, since it is most "straightforward". Especially for mp4 demo, because browsers send a lot of "shady" requests for streaming resources (weird file ranges for fmp4, etc), to check different conditions. Which may in turn confuse build-in web server. It is really "dump" and can only "send file" for normally generated request (sufficient for demo). VLC does not do any fancy stuff, it just asks for file and plays it.

  2. Be sure that your device and player are in the SAME wi-fi network. You will not be able to ping device in different network. Again, this demo is not about full-blown network support.

  3. Start demo and grant access to camera/mic

  4. After this you will see access url at the top of the screen. In my case this is http://192.168.1.253:7000/index.mp4 - for mp4 demo rtsp://192.168.1.253/ - for rtsp demo IP address will vary for your network

  5. Tap on big round button at the bottom of the app screen. It will turn red, which mean app is recording camera frames (without this step you will get only blackness in player, not camera frames)

  6. Windup VLC, go to Menu -> "Open Network" item. You`ll get "open" dialog with field named "URL". Fill it with url from step 4 and press "Open" button.

That is all! You can also tap on gear button in app to apply realtime effect to stream

IPv6 avatar Jul 06 '17 15:07 IPv6

I did exactly those things (with my device's IP rather than yours, of course. No media came up in VLC.

m59peacemaker avatar Jul 06 '17 15:07 m59peacemaker

  • Did you see any errors on the app screen?
  • Did VLC report any errors after you "play" stream url? Better start with rtsp, there can be only network problems

IPv6 avatar Jul 06 '17 15:07 IPv6

Good news! The rtsp demo works. The trailing slash is required. I had left it off. That demo is my main interest anyway. Thanks!

m59peacemaker avatar Jul 06 '17 15:07 m59peacemaker

Regarding the FMP4 demo, it logs "Socket operation failed: can't send data" a few times when a client visits the url if streaming hasn't started. When already streaming, sometimes it does nothing, but usually it still says it can't send data.

m59peacemaker avatar Jul 06 '17 15:07 m59peacemaker

@m59peacemaker strange, will look into it... May i ask you - what OS do you using and what version of VLC? As i noted, fmp4 streaming is a bit not-standartized, so browsers, for example, asks for crazy stuff to find out "is this a real stream or normal mp4 file". And do it in different manner. Built-in webserver just tries to "execute" this strange-looking requests, which may lead to socket error. May be VLC started to do something similar recently

IPv6 avatar Jul 06 '17 15:07 IPv6

I used the latest [email protected] on Mac OS Sierra.

On Thu, Jul 6, 2017 at 10:40 AM, Ilja Razinkov [email protected] wrote:

@m59peacemaker https://github.com/m59peacemaker strange, will look into it... May i ask you - what OS do you using and what version of VLC? As i noted, fmp4 streaming is a bit not-standartized, so browsers, for example, asks for crazy stuff to check "is this real stream or normal mp4 file?" and do it in different manner. Built-in webserver just tries to "execute" this strange-looking requests, may be VLC started to do something similar recently

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/denivip/demos/issues/1#issuecomment-313434414, or mute the thread https://github.com/notifications/unsubscribe-auth/AEKrX538GvkhSPuHbkx_9gM0lbEsIYWeks5sLP_tgaJpZM4OPFiS .

m59peacemaker avatar Jul 06 '17 15:07 m59peacemaker

Have you messed with saving / recording the rtsp stream as a video file? I've tried with ffmpeg, openrtsp, and the vlc cli and haven't been able to get it right. The best result has been with:

$ ffmpeg -i rtsp://192.168.1.140/ -acodec copy -vcodec copy foo.mp4

The video is fine, but it gets 0kb of audio. Probably due to these numerous AU headers errors.

[rtsp @ 0x7fdc4a000000] Error parsing AU headers00:00:47.73 bitrate=  26.0kbits/s speed=1.17x    
    Last message repeated 20 times
[rtsp @ 0x7fdc4a000000] Error parsing AU headers00:00:48.16 bitrate=  26.5kbits/s speed=1.16x    
    Last message repeated 23 times
frame=  345 fps=8.2 q=-1.0 Lsize=     238kB time=00:00:48.72 bitrate=  40.0kbits/s speed=1.16x    
video:234kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.861877%

m59peacemaker avatar Jul 06 '17 23:07 m59peacemaker

@m59peacemaker no, recording was not our concern in this demo. It`s strange, though, because audio is converted and sent in the same manner as video (just another stream), so in case of proper codec support at recorder side - there should be no problems.

This needs to be clarified //

IPv6 avatar Jul 07 '17 09:07 IPv6

@IPv6 I'm having similar issues to @m59peacemaker. Consuming via ffmpeg works for me but audio fails in the same way. Here is a log. VLC does not work correctly for me, it freezes on the first frame. VLC log here, which includes the version I'm running.

Thanks,
Marc

kb1ooo avatar Oct 24 '18 23:10 kb1ooo

Hi! Thanks for the great example. I have one weird issue with RTSPDemo. I start the stream on my iPhone 11 Pro Max and open VLC (Version 3.0.10). It connects to the stream and shows me only one frame. After I kill the demo app on device the stream start to play (within 5 to 10 seconds after). Do you have any ideas regarding what could possibly cause such behaviour?

Maxtws avatar Jun 11 '20 10:06 Maxtws

When running the FMP4 demo, I get the error "Socket operation failed: can't send data" too. Did you manage to fix it?

ViktoriiaKh avatar Dec 20 '22 15:12 ViktoriiaKh