FriendTeamInc / VodBot

A command line interface VOD and Clip manager for Twitch.
MIT License
14 stars 1 forks source link

VodBot writing files with URL query params #70

Closed NotQuiteApex closed 1 year ago

NotQuiteApex commented 1 year ago

Some old videos from Sky is having issues being downloaded, because of the weird naming and exporting Twitch used to use for highlights 5+ years ago.

A notable culprit is this: https://www.twitch.tv/videos/39737400

The playlist gets written to disk as:

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:6
#EXT-X-PLAYLIST-TYPE:EVENT
#EXT-X-DISCONTINUITY
#EXTINF:10,
transmux-0000000159-g3R9.ts?start_offset=0&end_offset=2854967
#EXTINF:10,
transmux-0000000160-lv2p.ts?start_offset=0&end_offset=2678811
#EXTINF:10,
transmux-0000000161-lBiF.ts?start_offset=0&end_offset=2999351
#EXTINF:10,
transmux-0000000162-CVKI.ts?start_offset=0&end_offset=2914751
#EXTINF:10,
transmux-0000000163-efwG.ts?start_offset=0&end_offset=2816239
#EXTINF:10,
transmux-0000000164-gQFH.ts?start_offset=0&end_offset=2776007
#EXT-X-ENDLIST

All the files are named appropriately, yet FFMPEG seems to struggle with these. Reading the stderr logs, it appears FFMPEG is ignoring these segments as a security measure.

[hls @ 0x5649438efd40] Filename extension of '/mnt/scratch/vodbot/temp/46779644/transmux-0000000103-TsNL.ts?start_offset=0&end_offset=2881663' is not a common multimedia extension, blocked for security reasons.
If you wish to override this adjust allowed_extensions, you can set it to 'ALL' to allow all

Seems like all that needs to be done is to add -allowed_extensions ALL before the input file in the FFMPEG command.