Skip to content

Instantly share code, notes, and snippets.

@sk22
Last active April 5, 2023 23:52
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sk22/868679fff370d62399b7003a4b307c75 to your computer and use it in GitHub Desktop.
Save sk22/868679fff370d62399b7003a4b307c75 to your computer and use it in GitHub Desktop.

how to download a video from the orf tvthek

  • open the tvthek page with the video you want to download
  • open the dev tools
    • open the network tab
    • search for 'playlist'
    • open playlist.m3u8, and open the 'response' tab
    • look for the highest given bandwidth (usually at the bottom, e.g. #EXT-X-STREAM-INF:BANDWIDTH=3192000)
    • copy the url below that, open it in a new browser tab and download it (e.g. https://apasfiis.sf.apa.at/ipad/cms-worldwide_abr/.../chunklist.m3u8&ip=...)
  • open bash
    • go to the folder you downloaded the chunklist playlist to (e.g. chunklist.m3u)
# download each .ts file specified in the playlist
cat chunklist.m3u8 | grep -o ^.*\.ts | while read url; do wget $url; done
# stitch the .ts files together
find media_* | sort -V | xargs cat > joined.ts
  • you can now open joined.ts in media players like vlc or the app called "movies and tv" integrated in windows 10

note that if the chunklist.m3u or chunklist.m3u8 file contains no full urls but only file names, use the following command instead:

# download each .ts file specified in the playlist
cat chunklist.m3u8 | grep -o ^.*\.ts | while read url; do wget {URL}$url; done

where {URL} should be replaced with the path to the media*.ts files, such as https://apasfiis.sf.apa.at/cms-austria_nas/_definst_/nas/cms-austria/online/2020-01-26_2305_sd_02_dokFilm--Back-t_____14039389__o__1216294778__s14632510_0__ORF2HD_23042611P_00203011P_Q8C.mp4/

wget https://varorfvod.sf.apa.at/cms-worldwide_episodes_nas/_definst_/nas/cms-worldwide_episodes/online/14025076_0013_Q8C.mp4/media_{98..120}.ts
@Arnold1
Copy link

Arnold1 commented Apr 4, 2023

@sk22
Copy link
Author

sk22 commented Apr 4, 2023

@Arnold1
actually, better forget about this and use yt-dlp instead https://github.com/yt-dlp/yt-dlp

for example:

yt-dlp --playlist-items 2,3,4 https://tvthek.orf.at/profile/Kaernten-heute/70022

@Arnold1
Copy link

Arnold1 commented Apr 5, 2023

@sk22 thanks

how to fix the following?

./yt-dlp --playlist-items 1 https://tvthek.orf.at/profile/Formel-1/7028409/Formel-1-GP-von-Australien-2023-Highlights-aus-Melbourne/14174109
[orf:tvthek] Extracting URL: https://tvthek.orf.at/profile/Formel-1/7028409/Formel-1-GP-von-Australien-2023-Highlights-aus-Melbourne/14174109
[orf:tvthek] 14174109: Downloading webpage
[download] Downloading playlist: 14174109
[orf:tvthek] 15370818: Downloading hls-Q1A-Niedrig m3u8 manifest
ERROR: This video is not available from your location due to geo restriction
You might want to use a VPN or a proxy server (with --proxy) to workaround.
[orf:tvthek] Playlist 14174109: Downloading 1 items of 1
[download] Finished downloading playlist: 14174109

do you know any austrian proxy server?

@sk22
Copy link
Author

sk22 commented Apr 5, 2023

@Arnold1
i don't, unfortunately, but anyway, i've down- and uploaded it for you:
part 1: https://we.tl/t-wdkTdELNCE
part 2: https://we.tl/t-I3fhZs64Ap

had to split it in two because the video was larger than 2 GB.
just open/extract the .7z.001 file using 7-zip (with both the .001 and .002 files downloaded to the same folder) and you should get the complete mp4 file.

greetings!

@Arnold1
Copy link

Arnold1 commented Apr 5, 2023

oh thank u. i wish i could do it myself also for other videos.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment