Closed shorewall closed 6 months ago
Do I need VPN/Proxy for this?
Yes, as I wrote at the beginning of this issue RAI broadcast are geoblocked. You need an italian ip. I assume both a vpn or proxy could work.
I can't find any working http proxy (QMPlay2/FFmpeg support only http proxy AFAIK).
What happen it you play it from ffmpeg command line: ffplay http://mediapolis.rai.it/relinker/relinkerServlet.htm?cont=2606803
Can you upload me working Italian OpenVPN configuration?
FFplay works fine. No dtops at first timestamp reached. it also works ffmpeg -i http://mediapolis.rai.it/relinker/relinkerServlet.htm?cont=2606803 -c copy -f mpegts - | mpv or xine or mplayer - My ffmpeg ia 3.3.9
I'm sorry but I don't have a working openvpn config with an italian server available. I attempted to raise a local http proxy on my systems but my ip is not public. It is natted behind my ISP provider.
Can you try to download stream in QMPlay2 and check what will happen? If the same issue when playing a file, you can upload it somewhere. Best to use current master
branch.
Hi, i did some more test and the RAI streams (hls format) appear completely unreliables these days. Expecially RAI1 and RAI4 flows. The only way to make them working is using an hls downloader and pipe the output to an hls capable player. My best solution for now is: hlsdl -b https://raiuno1-live.akamaized.net/hls/live/598308/raiuno1/raiuno1/playlist_ma.m3u8?hdnea=st=1621659642~exp=1621659792~acl=/*~hmac=bc17872e96eaeaeaaad7af68bfab96eb5a5ef0990166acea9ce48cf53e164679 -o - | mpv - HLSDL appears working much better than ffmpeg in these cases. Hlsdl is public and the source code available. The stream plays almost immediately and is stable. No errors or buffering. Using ffmpeg for the download step gives a very long intial delay and is not very stable. so I assume that the new crypto+hls RAI flows are badly handled by ffmpeg based players now. Due the current RAI (1/4) instability I suggest to temporary close this issue and look at the problem once all the RAI stuff will became more stable, and we can collect solid debug data.
Could I suggest to add hlsld engine to handle hls streams? At least as an option? Or make QMPLay2 able to receive an input as stdin to pipe hlsdl output directly to QMPlay2?. Hlsdl seems much more stable faster and reliable than ffmpeg lately in handling hls flows.
After further tests I discovered that the only reliable player for these hls streams is Parole, that uses gstreamer as backend. Almost all the ffmpeg based players (and sometime ffmpeg itself), have some problems. This happens not only on RAI broadcast, but also reproducing hls flows from other streaming sites or servers as Ninjastream for example. In this case for example the video is choppy and unable to buffer enough for a fluid vision. Parole has no problem.
FFmpeg is not good for HLS streams, but I watched a lot of various HLS streams without any problems. The main problem is that FFmpeg downloads all streams (many video sizes at once), so you can watch only HLS stream with single video size. Can you upload QMPlay2's information panel screenshot?
Here the content: Comment: Italiano
Address: https://raiquattro1-live.akamaized.net/hls/live/598315/raiquattro1/raiquattro1/playlist_ma.m3u8?hdnea=st=1623220378~exp=1623220528~acl=/*~hmac=8c900b8935b64b23bc539e3ad5b76b6709e2dfd2b24479500ea721557941596d Format: hls Programs: Program 0 Program 0 Program 0 Video streams: Stream 1 - FFmpeg, OpenGL 3.0 codec: h264 size: 1024x576 aspect ratio: 1.77778 FPS: 25 format: yuv420p Stream 2 codec: h264 size: 928x522 aspect ratio: 1.77778 FPS: 25 format: yuv420p Stream 3 codec: h264 size: 704x396 aspect ratio: 1.77778 FPS: 25 format: yuv420p Audio streams: Stream 1 - FFmpeg, PulseAudio codec: aac sample rate: 44100Hz channels: stereo bitrate: 122kbps format: fltp language: italian Stream 2 codec: aac sample rate: 44100Hz channels: stereo bitrate: 128kbps format: fltp language: v.o Stream 3 codec: aac sample rate: 44100Hz channels: stereo bitrate: 124kbps format: fltp comment: Audiodescrizione language: des Stream 4 codec: aac sample rate: 44100Hz channels: stereo format: fltp Stream 5 codec: aac sample rate: 44100Hz channels: stereo format: fltp Stream 6 codec: aac sample rate: 44100Hz channels: stereo format: fltp
Here a shot:
Note that while Parole video goes fluid and is capable to create a good input buffer using QMPlay2 there is almost no buffer, so the video plays a couple of seconds, then stop for buffering, then play another couple of seconds and so on...
Here two short screen recording of the same RAI channel using QMPlay2 and Parole that can better explain the problem
As I've written before:
The main problem is that FFmpeg downloads all streams (many video sizes at once), so you can watch only HLS stream with single video size.
3 video streams and 6 audio streams are downloading by the FFmpeg, so that's why your problem exists. I'm aware of this issue. Sometimes you can be able to obtain HLS URL for single stream (YouTube can do this) - try to find if RAI also can.
I completely agree with you that the problem is not QMPlay2 itself but the hls handling by ffmpeg. I'm wondering if adding to QMPlay2 the option to play streams by stdin input could be implemented. For example, in some cases, I uses hlsdl downloader writing the output to stdout and piping it to MPV stdin.
I'm wondering if adding to QMPlay2 the option to play streams by stdin input could be implemented.
stdin
it's not going to be supported, it's not console application. You can try to create pipe or whatever and try to load it into a playlist. Console software is streaming to the pipe and QMPlay2 maybe will be able to read it. Maybe try mkfifo
?
Fix for HLS streams should be done but I don't know when. If FFmpeg has option to download only chosen streams, it should be easy. Otherwise I have to skip FFmpeg HLS parser and use my own.
Can you upload the HLS M3U8 file ?
Yes, sure. Rai4_M3u8.zip
Hello, may be this m3u8 hls tools could help :
m3u8 : Python m3u8 Parser for HTTP Live Streaming (HLS) Transmissions :
https://github.com/globocom/m3u8
[.NET] m3u8 downloader Open source command line m3u8/HLS/dash downloader, supports common AES-128-CBC decryption, multi-threading, custom request headers, etc. Supports Simplified Chinese, Traditional Chinese and English. English Supported.
https://github.com/nilaoda/N_m3u8DL-CLI
[.NET7] Cross-Platform stream downloader for DASH/HLS.
https://github.com/nilaoda/N_m3u8DL-RE
and
https://github.com/selsta/hlsdl
FFmpeg downloads all streams (many video sizes at once)
This has been fixed a while ago, closing.
Starting lately QMPLay2 (latest appimage for Linux available) drop the flow after a fixed time This RAI relinker: http://mediapolis.rai.it/relinker/relinkerServlet.htm?cont=2606803 produces the following real link i.e.: https://raiuno1-live.akamaized.net/hls/live/598308/raiuno1/raiuno1/playlist_ma.m3u8?hdnea=st=1610623724~exp=1610623874~acl=/*~hmac=fd0e28834d392997bdfd9f71ec3ca9823cfd146efe57173d2a237d55c320ab02 QMPlay2 stop the flow when the exp=1610623874 timestamp is reached. This happens only using the latest version. All previous ones continues playing w/o stopping. Other hls capable players are working too (Parole, Streamlink etc) You need an italian ip to reproduce. Rai flows are geoblocked.