Foliovision › Forums › FV Player › How to … › How to use RTMP streams with Flash
-
I was running a free version of flowplayer on my wordpress site to do live broadcasts. And it worked great! But when I updated the plugin, it stopped working. Have been trying to solve it for two days now, to no avail. I am willing to buy a license, but are there any guarantees it will work again? I mean, the free version is the same coding, right? So do i need to spend another 70 dollars to get someone to look at it to fix it? Or is the broken rtmp a known bug, and there is a solution being made as we speak?
-
-
Hi Alfons,
Thank you for the bug report. I have tested HLS live streaming (last video in this demo) and RTMP in this demo and everything works fine. Is there any chance that there is an issue on the source end of your streams?
It would be a great help if you sent us a link to your page where the problem has occurred, then we eventually might move to checking the backend.
Thanks,
EduardHi, my problem seems solved. But as soon as i upgraded to the latest version, the live stream did not work anymore.
I have these settings in fv player:
`[fvplayer src="http://81.171.19.137/live/test/index.m3u8" rtmp="rtmp://81.171.19.137/" rtmp_path="/live/test" live="true" width="600" height="380"]`
and on my VPS, I run ngnix with this script:
worker_processes 1; error_log logs/error.log debug; events { worker_connections 1024; } rtmp { server { listen 1935; allow play all; #creates our "live" full-resolution HLS videostream from our incoming encoder stream and tells where to put the HLS video manifest and video fragments application live { allow play all; live on; record all; record_path /video_recordings; record_unique on; hls on; hls_nested on; hls_path /HLS/live; hls_fragment 10s; #creates the downsampled or "trans-rated" mobile video stream as a 400kbps, 480x360 sized video exec ffmpeg -i rtmp://81.171.19.137:1935/$app/$name -acodec copy -c:v libx264 -preset veryfast -profile:v baseline -vsync cfr -s 480x360 -b:v 400k maxrate 400k -bufsize 400k -threads 0 -r 30 -f flv rtmp://81.171.19.137:1935/mobile/$; } #creates our "mobile" lower-resolution HLS videostream from the ffmpeg-created stream and tells where to put the HLS video manifest and video fragments application mobile { allow play all; live on; hls on; hls_nested on; hls_path /HLS/mobile; hls_fragment 10s; } #allows you to play your recordings of your live streams using a URL like "rtmp://my-ip:1935/vod/filename.flv" application vod { play /video_recordings; } } } http { include mime.types; default_type application/octet-stream; server { listen 80; server_name 81.171.19.137; #creates the http-location for our mobile-device HLS stream - "http://my-ip/mobile/my-stream-key/index.m3u8" location /mobile { types { application/vnd.apple.mpegurl m3u8; } alias /HLS/mobile; add_header Cache-Control no-cache; } #allows us to see how stats on viewers on our Nginx site using a URL like: "http://my-ip/stats" location /stats { stub_status; } #allows us to host some webpages which can show our videos: "http://my-ip/my-page.html" location / { root html; index index.html index.htm; } } }
I wil update to the latest fv again, I hope it works now.. If not, any help is highly appreciated! I will keep you informed. Cheers!
- This reply was modified 7 years, 11 months ago by Alec Kinnear.
- This reply was modified 7 years, 11 months ago by Alec Kinnear. Reason: adding code
i updated the fv player plugin to the latest version. And the stream is broken again : (
Could you be so kind to check if I did something wrong?
Hello Alfons,
the important change in FV Player 6.0.5.15 was (citing from the change log https://foliovision.com/player/changelog): “Bugfix – RTMP – making sure it takes priority over other formats to prevent browser from trying to load HLS in Flash engine”
We did this so that if there is a player with HLS and RTMP the Flash player would pick the RTMP format over HLS, as HLS has higher requirements when loading in Flash.
What happens to you suggests that your RTMP stream is actually not working and perhaps it never as browser were picking MP4 video instead.
Please check if it plays if you remove the RTMP stream from that player.
Since FV Player plays HLS streams with proper crossdomain.xml file in Flash, you don’t really need RTMP if you can meet these requirements: https://foliovision.com/player/video-hosting/hls
Thanks,
Martinif I remove the rtmp stream, it works on desktop and ios. Not on Android.
But when I go back to the previous fv version, and add the rtmp stream, it works on ios AND android. So the latest fv is not a real improvement for me, I guess.
I did place the crossdomain.xml in the folder from where I stream th HLS.
#edit i also put the file in /HLS/live/test and in /HLS/live
still, no result on android…..
tomorrow night (wednesday) is my next broadcast. But I can roll back the server to the previous version of fv. I hope I have a solution earlier, though….
Cheers,
Alfons
Wow! I cracked it. The problem was entirely my fault!
[fvplayer src="http://81.171.19.137/live/test/index.m3u8" rtmp="rtmp://81.171.19.137:1935/HLS/live" rtmp_path="test" live="true" splash="http://vocalfeedbackacademy.vocalmedia.nl/wp-content/uploads/2016/11/cropped-VFMLogo2016-Diapositief-1280.png" width="600" height="380"]
instead of:
[fvplayer src="http://81.171.19.137/live/test/index.m3u8" rtmp="rtmp://81.171.19.137:1935/live" rtmp_path="test" live="true" splash="http://vocalfeedbackacademy.vocalmedia.nl/wp-content/uploads/2016/11/cropped-VFMLogo2016-Diapositief-1280.png" width="600" height="380"]
the bug in the previous version somehow allowed the wrong stream to be played. But since you fixed it, the code was tried first. And that code was faulty.
I guess now is the time for me to buy a license.
One more question though: is it possible to play stored videos (VOD) with fv without the viewer downloading the video simply by rightclicking? I know jwplayer does that, i already use that, but I would rather stick to only one player. Which would be fv ofcourse.
thanks for your support!
Alfons Verreijt
- This reply was modified 7 years, 11 months ago by Alec Kinnear. Reason: code formatting
Hello Alfons,
you can read our overview of video download protection techniques here: https://foliovision.com/player/securing-your-video/protecting-video-from-downloading
What browser/extension do you use if it allows you to download the video with a right click? Or do you mean you use the browser developer console to get the video URL and download it here? Please let us know where we can see your JW Player setup which prevents that. Perhaps it is just using a HLS stream for VOD.
We offer encrypted HLS support, so even if somebody knows how to download a HLS stream, it won’t play: https://foliovision.com/player/demos/encrypted-hls-stream
Regarding the Android Chrome issue – the first player here uses RTMP as well as other formats: https://foliovision.com/player/demos/cloudfront-download-protection The RTMP is only picked in browser with Flash, the other ones do for the MP4 or WebM.
I also setup a demo with both RTMP and HLS: https://foliovision.com/player/demos/hls-stream -> RTMP Then HLS
Both play properly for me on Android 4.4.4 with Chrome 55.
Thanks,
MartinThanks Alfons for your detailed notes.
Alfons we’ll work with you on format priority until we get the fallback working just right. Mobile playback and formats are a moving target: we tune the priorities to stay up to date with best practices, along with existing browser technologies, security methods and current devices.
Dear Alec,
tonight I was set up and ready to start my weekly live stream from my website. There was nothing visible anymore in fvplayer. I checked my stream from OBS to my VPS. That was fine: I saw flv files being created, which I could download and look at. So the server was recieving the right signal. But between the server and the website, there was something wrong. I checked the script of fv player. That had not changed since last week, when I did my last broadcast. Then I saw fv player offered to be updated. So I guessed, maybe that could help. But it didn’t. So I am stuck here. Not a single setting has changed since my last working broadcast. So please help me out on this one. Thanks!Alfons Verreijt
Hello Adeleke,
can you get it to play here? https://www.wowza.com/testplayers
What RTMP messages do you see on browser console once you execute this command on it and play the stream afterwards?
localStorage.flowplayerDebug = true
Thanks,
MartinHello Vj,
please use our video checker and submit the report using that: https://foliovision.com/player/basic-setup/how-to-use-video-checker
Thanks,
Martin