Open baptx opened 3 years ago
First of all you should not be using python 2.7. Second of all, you must be joking with that "workaround", simply tell youtube-dl to name the file something else using the -o
flag.
@llacb47 thanks, I switched to Python 3 (with this solution: https://askubuntu.com/questions/1065572/how-to-safely-switch-to-python3-as-default-after-upgrade-to-ubuntu-18-04/1143852#1143852). I did not pay attention to the error message "File name too long" and did not thought it would be that easy since ffmpeg failed too. Would it be possible to improve the user experience of youtube-dl by displaying a warning when the file name is too long and truncating the name instead of failing the download? Do you have an idea idea why ffmpeg fails? Maybe youtube-dl is doing something different than simply using the M3U8 link. I was not joking about the workaround, using captureStream with MediaRecorder has been useful for me when other solutions failed, for example to record a WebRTC stream or video blob (and it can be used for headless recording of DRM protected content also using Selenium WebDriver, like you could do with a screen recorder but closer to the source).
try like this > youtube-dl -o "%(id)s.%(ext)s" https://twitter.com/ITA6768/status/1402200008896782339
I'm not sure if OP meant to dl tw videos for a script or something, but in case it's solely for own entertainment I'll put this here anyway. Twitter has another "version" of it, mainly used by business personnel, it's called Tweetdeck. there all videos are downloadable as long as you know how to get to the tweet that's hosting the video.
Checklist
Verbose log
Description
It is currently not possible to download Twitter videos, for example with a command like
youtube-dl https://twitter.com/ITA6768/status/1402200008896782339
. I noticed I cannot download Twitter videos with ffmpeg / avconv also with a command likeffmpeg -i "https://video.twimg.com/ext_tw_video/1402199786313424898/pu/pl/p3a4JwGkun5ruVYR.m3u8?tag=12&container=fmp4" -c copy out.mp4
(using the M3U8 link found with Firefox Developer Tools in the Network tab):The workaround is to use JavaScript code in the web console to record the video with captureStream and MediaRecorder APIs: https://gist.github.com/baptx/8a1549d91996a37378faca159b3adc17.