kevinGodell / mp4frag

Parser that works with ffmpeg to read piped data and fragment mp4 into an initialization segment and media segments. It can also get the codec info and generate an fmp4 HLS m3u8 playlist.
https://kevingodell.github.io/mp4frag/
MIT License
68 stars 15 forks source link

hls-urls with token #15

Closed Bond246 closed 2 years ago

Bond246 commented 2 years ago

Hello Kevin

i have a dashboard with multible sources to monitor. The player plugin is wonderful for that. Otherwise i had to do a lot of self works.

All urls i have are playing fine with one exception: There is one URL that is build similare to this one: https://out.example.com/edge/ABC323_AbABce/playlist.m3u8?token=<some 150 characters string with upper and lower case characters and with dots and dashes>

The mp4frag-player does not play this one. But there are also no error messages or similar hints that could help. In hlsjs demo player, vlc and so on the url is playing fine.

kevinGodell commented 2 years ago

Can I assume that you are referring to node-red-contrib-ui-mp4frag? If yes, for a workaround, try adding another generic param to the end of your url such as &format=.m3u8.

Bond246 commented 2 years ago

Can I assume that you are referring to node-red-contrib-ui-mp4frag?

ah yes, of course

for a workaround, try adding another generic param to the end of your url such as &format=.m3u8.

brilliant that works! 👍 so from my point of view the project is ready für the official npm. 💯

kevinGodell commented 2 years ago

The reason that hack worked is because I check the payload string to end with ".m3u8" to know that it is the correct format to feed to hls.js player. You could shorten it to &f=.m3u8. The important thing is that it should be at the very end.