Fakes Faking Programs/Websites

Dec 13, 2022
49
1,496
It is because of ts format itself. All ts videos behave this way. It is format for broadcasts DVB-T/IPTV etc. with adaptations for that medium which may not always be reliable. I think the reason for it could be that mp4 format keyframe positions are known but in ts they are not.
 
  • Like
Reactions: Ionic Spark
Comment
Nov 2, 2023
9
5
i tried to check available resolution. i got this error
[https @ 000002161b9b8d40] No trailing CRLF found in HTTP header. Adding it.
[tcp @ 000002161b9911c0] Connection to tcp://...:443 failed: Error number -138 occurred
https://.../playlist.m3u8: Error number -138 occurred
the "..." is m3u8 url
 
Comment
Nov 2, 2023
7
73

Thank you, but you give me far too much credit, I only figured it out with some googling and reading through this thread, so I dont even know where to start with what you have suggest, but I will look into it.
One thing I would like to point out though: without a VPN on I dont even get the video player to load and thus cant get a m3u8 link. I dont know if it geo locked or not but if I turn on my VPN, get the m3u8 link, and turn off my VPN, the m3u8 becomes invalid. My location is in the west, but my VPN is Japan
Hope this clarifies some things
 
Comment
Dec 13, 2022
49
1,496
I've made wget version of batch script for playlist.m3u8 download: wget --user-agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36" --header="Referer: https://iframe.mediadelivery.net/" -O playlist.m3u8 %URL%. After download it types its content to console. Consequent downloads will overwrite older playlist.m3u8 file. Technically you only need url address of video thumbnail (e.g.: https://XX-XXXXXXXX-XXX.b-cdn.net/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/thumbnail.jpg). Then replace "thumbnail.jpg" with "playlist.m3u8".

Code:
@echo off
:start
set /p purl="Enter url to playlist.m3u8 to check available resolutions (e.g.: https://.../playlist.m3u8): "
if "%purl%" EQU "" goto start
echo.
wget --user-agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36" --header="Referer: https://iframe.mediadelivery.net/" -O playlist.m3u8 -q "%purl%"
type playlist.m3u8
pause
goto start
 
Comment
Dec 13, 2022
49
1,496
You can "get" playlist.m3u8 link from video thumbnails url. I wrote about it in my comment above. Then you check for available resolutions and reconstruct full url to video.m3u8 playlist. When you have it you can download it with ffmpeg even without VPN. The problem is that you won't be able to load thumbnails without VPN unless your IP address is from allowed region. But you still can see their underlying urls if you check them with Inspect Element (Ctrl+Shift+C) in Developer tools.

UPDATE:
You can't access playlist urls (with my batch scripts which provide correct referrer header) if you get them while browsing without VPN and can't load thumbnails/videos. If you get them with VPN, you can access them temporary even without VPN. It seems that accessibility window is open for ~5 minutes. So if you use TunnlTo app with ProtonVPN Japan servers as I described earlier everything should work very well (browser uses VPN, ffmpeg doesn't).
 
  • Like
Reactions: ajmcs and MRGOO
Comment
Dec 13, 2022
49
1,496
Batch script if someone want to play videos with VLC player directly from video.m3u8 playlist.
Code:
:start
@set /p url="video.m3u8 url: "
@if "%url%" EQU "" goto start
"C:\Program Files\VideoLAN\VLC\vlc.exe" --http-user-agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36" --http-referrer="https://iframe.mediadelivery.net/" "%url%"
goto start
 
Comment