mhdzumair / mediaflow-proxy

A high-performance proxy server for streaming media, supporting HTTP(S), HLS, and MPEG-DASH with real-time DRM decryption.
MIT License
53 stars 12 forks source link

How to get a MPD file directly? #8

Open FragRot opened 1 month ago

FragRot commented 1 month ago

I would like to get a MPD file directly via proxy without being converted to M3U8 file and without its content being modified. How do I achieve this?

This URL just let me download M3U8 file instead of MPD file directly. http://xxx.xxx.xxx.xxx:8888/proxy/hls/manifest.m3u8?d=https://MPDURL/WATCH.mpd&key_id=aaa&key=bbb&api_password=password

This URL download M3U8 file with a proxied URL of MPD file. When I click the proxied URL it returned me a M3U8 file with contents of the actual MPD file instead of returning me the actual MPD file directly. http://xxx.xxx.xxx.xxx:8888/proxy/hls/manifest.m3u8?d=http://xxx.xxx.xxx.xxx/index.m3u8&api_password=password

I'm not able to watch a geo-blocked live channel as it's returning me a M3U8 file instead of MPD file.

mhdzumair commented 1 month ago

the proxy/hls/manifest.m3u8 endpoint is for proxy stream m3u8, not for mpd. You can get the just MPD file via proxy with /proxy/stream path. But note that the /proxy/stream path is not going to support playing MPD in a video player.

For streaming MPD, you need to use /proxy/mpd/manifest.m3u8 see the available endpoints https://github.com/mhdzumair/mediaflow-proxy?tab=readme-ov-file#endpoints

FragRot commented 1 month ago

I'm able to load both test MPD below successfully.

Protected video https://media.axprod.net/TestVectors/v7-MultiDRM-SingleKey/Manifest_1080p_ClearKey.mpd

Unprotected live https://livesim.dashif.org/livesim/chunkdur_1/ato_7/testpic4_8s/Manifest.mpd

I'm still unable to load protected live MPD by using below endpoint. http://xxx.xxx.xxx.xxx:8888/proxy/mpd/manifest.m3u8?d=https://MPDURL/WATCH.mpd&key_id=aaa&key=bbb&api_password=password

Below are logs from docker. c8aafe5af2028090eb77db4dc3faaba7df40a948fef365d5b7648b1bb17b014d-json.log

Based on logs it is hitting error 404 when trying to download .MP4 file.

mhdzumair commented 1 month ago

What is the source country? Only work on Indonesian?

FragRot commented 4 weeks ago

Yes you are correct.

FragRot commented 2 weeks ago

Any idea how do I resolve this issue?

mhdzumair commented 1 week ago

Any idea how do I resolve this issue?

Hi, im facing issue on testing this on my local, i try to check with some free proxy to bypass the geo location. however, those are not reliable to test. if you know any way to get a proxy or vpn with indo lmk.