Error downloading video from Twitter message with additional text #12383

Open
opened 2026-02-21 06:36:59 -05:00 by deekerman · 6 comments
Owner

Originally created by @Kilmatar on GitHub (Dec 18, 2017).

Please follow the guide below

  • You will be asked some questions and requested to provide some information, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your issue (like this: [x])
  • Use the Preview tab to see what your issue will actually look like

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2017.12.14. If it's not, read this FAQ entry and update. Issues with outdated version will be rejected.

  • I've verified and I assure that I'm running youtube-dl 2017.12.14

Before submitting an issue make sure you have:

  • At least skimmed through the README, most notably the FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones

What is the purpose of your issue?

  • Bug report (encountered problems with youtube-dl)
  • Site support request (request for adding support for a new site)
  • Feature request (request for a new functionality)
  • Question
  • Other

The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your issue


If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output as follows:

youtube-dl.exe -v https://twitter.com/WZorNET/status/942638289928048640
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', 'https://twitter.com/WZorNET/status/942638289928048640']
[debug] Encodings: locale cp1251, fs mbcs, out cp1251, pref cp1251
[debug] youtube-dl version 2017.12.14
[debug] Python version 3.4.4 - Windows-10-10.0.17046
[debug] exe versions: ffmpeg N-86383-g4705edb, ffprobe N-86383-g4705edb
[debug] Proxy map: {}
ffmpeg version N-86383-g4705edb Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 7.1.0 (GCC)
configuration: --enable-gpl --enable-version3 --enable-cuda --enable-cuvid --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-zlib
libavutil 55. 63.100 / 55. 63.100
libavcodec 57. 96.101 / 57. 96.101
libavformat 57. 72.101 / 57. 72.101
libavdevice 57. 7.100 / 57. 7.100
libavfilter 6. 91.100 / 6. 91.100
libswscale 4. 7.101 / 4. 7.101
libswresample 2. 8.100 / 2. 8.100
libpostproc 54. 6.100 / 54. 6.100
[tls @ 0000000002643ee0] Server closed the connection
[hls,applehttp @ 0000000002642ca0] HLS request for url 'https://video.twimg.com/ext_tw_video/942637672249593857/pu/vid/0/3000/1280x720/w9j2y_rZbE59gak9.ts', offset 0, playlist 0
[hls,applehttp @ 0000000002642ca0] Opening 'https://video.twimg.com/ext_tw_video/942637672249593857/pu/vid/0/3000/1280x720/w9j2y_rZbE59gak9.ts' for reading
[h264 @ 00000000026e6d80] Reinit context to 1280x720, pix_fmt: yuv420p
Input #0, hls,applehttp, from 'https://video.twimg.com/ext_tw_video/942637672249593857/pu/pl/1280x720/m_EZ56Axc3i2sFTY.m3u8':
Duration: 00:00:38.37, start: 0.000000, bitrate: 0 kb/s
Program 0
Metadata:
variant_bitrate : 0
Stream #0:0: Video: h264 (High), 1 reference frame ([27][0][0][0] / 0x001B), yuv420p(left), 1280x720, 23.98 fps, 23.98 tbr, 90k tbn, 47.95 tbc
Metadata:
variant_bitrate : 0
Stream #0:1: Audio: aac (LC) ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp
Metadata:
variant_bitrate : 0
file:WZor - тП░#GoodMorning #NinjaCat's and #WindowsInsiders ЁЯУМThis week 51 we expect the #lastflightЁЯЫйя╕Пthis year to get new #WIP build!ЁЯд╢ЁЯСб ЁЯЪйon #Tuesday we are waiting new ISO's Build 17061-> #DAC, #ADK, ...-942638289928048640.mp4.part: No such file or directory
ERROR: ffmpeg exited with code 1
File "main.py", line 19, in
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpekokknty\build\youtube_dl_init_.py", line 465, in main
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpekokknty\build\youtube_dl_init_.py", line 455, in _real_main
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpekokknty\build\youtube_dl\YoutubeDL.py", line 1986, in download
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpekokknty\build\youtube_dl\YoutubeDL.py", line 795, in extract_info
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpekokknty\build\youtube_dl\YoutubeDL.py", line 887, in process_ie_result
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpekokknty\build\youtube_dl\YoutubeDL.py", line 849, in process_ie_result
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpekokknty\build\youtube_dl\YoutubeDL.py", line 1620, in process_video_result
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpekokknty\build\youtube_dl\YoutubeDL.py", line 1893, in process_info
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpekokknty\build\youtube_dl\YoutubeDL.py", line 1832, in dl
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpekokknty\build\youtube_dl\downloader\common.py", line 361, in download
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpekokknty\build\youtube_dl\downloader\external.py", line 57, in real_download
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpekokknty\build\youtube_dl\downloader\common.py", line 163, in report_error
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpekokknty\build\youtube_dl\YoutubeDL.py", line 612, in report_error
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpekokknty\build\youtube_dl\YoutubeDL.py", line 574, in trouble

Description of your issue, suggested solution and other information

https://twitter.com/WZorNET/status/942638289928048640 - tweet with excessive text/formatting/tagging
Looks like error parsing such a page

Originally created by @Kilmatar on GitHub (Dec 18, 2017). ## Please follow the guide below - You will be asked some questions and requested to provide some information, please read them **carefully** and answer honestly - Put an `x` into all the boxes [ ] relevant to your *issue* (like this: `[x]`) - Use the *Preview* tab to see what your issue will actually look like --- ### Make sure you are using the *latest* version: run `youtube-dl --version` and ensure your version is *2017.12.14*. If it's not, read [this FAQ entry](https://github.com/rg3/youtube-dl/blob/master/README.md#how-do-i-update-youtube-dl) and update. Issues with outdated version will be rejected. - [x] I've **verified** and **I assure** that I'm running youtube-dl **2017.12.14** ### Before submitting an *issue* make sure you have: - [x] At least skimmed through the [README](https://github.com/rg3/youtube-dl/blob/master/README.md), **most notably** the [FAQ](https://github.com/rg3/youtube-dl#faq) and [BUGS](https://github.com/rg3/youtube-dl#bugs) sections - [x] [Searched](https://github.com/rg3/youtube-dl/search?type=Issues) the bugtracker for similar issues including closed ones ### What is the purpose of your *issue*? - [x] Bug report (encountered problems with youtube-dl) - [ ] Site support request (request for adding support for a new site) - [ ] Feature request (request for a new functionality) - [ ] Question - [ ] Other --- ### The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your *issue* --- ### If the purpose of this *issue* is a *bug report*, *site support request* or you are not completely sure provide the full verbose output as follows: youtube-dl.exe -v https://twitter.com/WZorNET/status/942638289928048640 [debug] System config: [] [debug] User config: [] [debug] Custom config: [] [debug] Command-line args: ['-v', 'https://twitter.com/WZorNET/status/942638289928048640'] [debug] Encodings: locale cp1251, fs mbcs, out cp1251, pref cp1251 [debug] youtube-dl version 2017.12.14 [debug] Python version 3.4.4 - Windows-10-10.0.17046 [debug] exe versions: ffmpeg N-86383-g4705edb, ffprobe N-86383-g4705edb [debug] Proxy map: {} ffmpeg version N-86383-g4705edb Copyright (c) 2000-2017 the FFmpeg developers built with gcc 7.1.0 (GCC) configuration: --enable-gpl --enable-version3 --enable-cuda --enable-cuvid --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-zlib libavutil 55. 63.100 / 55. 63.100 libavcodec 57. 96.101 / 57. 96.101 libavformat 57. 72.101 / 57. 72.101 libavdevice 57. 7.100 / 57. 7.100 libavfilter 6. 91.100 / 6. 91.100 libswscale 4. 7.101 / 4. 7.101 libswresample 2. 8.100 / 2. 8.100 libpostproc 54. 6.100 / 54. 6.100 [tls @ 0000000002643ee0] Server closed the connection [hls,applehttp @ 0000000002642ca0] HLS request for url 'https://video.twimg.com/ext_tw_video/942637672249593857/pu/vid/0/3000/1280x720/w9j2y_rZbE59gak9.ts', offset 0, playlist 0 [hls,applehttp @ 0000000002642ca0] Opening 'https://video.twimg.com/ext_tw_video/942637672249593857/pu/vid/0/3000/1280x720/w9j2y_rZbE59gak9.ts' for reading [h264 @ 00000000026e6d80] Reinit context to 1280x720, pix_fmt: yuv420p Input #0, hls,applehttp, from 'https://video.twimg.com/ext_tw_video/942637672249593857/pu/pl/1280x720/m_EZ56Axc3i2sFTY.m3u8': Duration: 00:00:38.37, start: 0.000000, bitrate: 0 kb/s Program 0 Metadata: variant_bitrate : 0 Stream #0:0: Video: h264 (High), 1 reference frame ([27][0][0][0] / 0x001B), yuv420p(left), 1280x720, 23.98 fps, 23.98 tbr, 90k tbn, 47.95 tbc Metadata: variant_bitrate : 0 Stream #0:1: Audio: aac (LC) ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp Metadata: variant_bitrate : 0 file:WZor - тП░#GoodMorning #NinjaCat's and #WindowsInsiders ЁЯУМThis week 51 we expect the #lastflightЁЯЫйя╕Пthis year to get new #WIP build!ЁЯд╢ЁЯСб ЁЯЪйon #Tuesday we are waiting new ISO's Build 17061-&gt; #DAC, #ADK, ...-942638289928048640.mp4.part: No such file or directory ERROR: ffmpeg exited with code 1 File "__main__.py", line 19, in <module> File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpekokknty\build\youtube_dl\__init__.py", line 465, in main File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpekokknty\build\youtube_dl\__init__.py", line 455, in _real_main File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpekokknty\build\youtube_dl\YoutubeDL.py", line 1986, in download File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpekokknty\build\youtube_dl\YoutubeDL.py", line 795, in extract_info File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpekokknty\build\youtube_dl\YoutubeDL.py", line 887, in process_ie_result File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpekokknty\build\youtube_dl\YoutubeDL.py", line 849, in process_ie_result File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpekokknty\build\youtube_dl\YoutubeDL.py", line 1620, in process_video_result File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpekokknty\build\youtube_dl\YoutubeDL.py", line 1893, in process_info File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpekokknty\build\youtube_dl\YoutubeDL.py", line 1832, in dl File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpekokknty\build\youtube_dl\downloader\common.py", line 361, in download File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpekokknty\build\youtube_dl\downloader\external.py", line 57, in real_download File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpekokknty\build\youtube_dl\downloader\common.py", line 163, in report_error File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpekokknty\build\youtube_dl\YoutubeDL.py", line 612, in report_error File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpekokknty\build\youtube_dl\YoutubeDL.py", line 574, in trouble ### Description of your *issue*, suggested solution and other information https://twitter.com/WZorNET/status/942638289928048640 - tweet with excessive text/formatting/tagging Looks like error parsing such a page
Author
Owner

@hpistor commented on GitHub (Dec 18, 2017):

I just cloned master and it worked on my mac, it doesn't look like it's a parsing error. Maybe a problem with the emojis/other characters on Windows?

@hpistor commented on GitHub (Dec 18, 2017): I just cloned master and it worked on my mac, it doesn't look like it's a parsing error. Maybe a problem with the emojis/other characters on Windows?
Author
Owner

@SpEcHiDe commented on GitHub (May 25, 2018):

I got this issue on a system running Debian 9, with YouTubeDL version 2018.05.18!

@SpEcHiDe commented on GitHub (May 25, 2018): I got this issue on a system running Debian 9, with YouTubeDL version 2018.05.18!
Author
Owner

@omgitsraven commented on GitHub (Oct 19, 2018):

I'm having an issue that was just closed as a duplicate without saying what it's a duplicate of, but I suppose they're suggesting that it's a duplicate of this?

I made some test cases that demonstrate this happening as a factor of tweet length rather than containing formatting/tagging or not, so I'm not sure if this belongs here, or if this report was mistaken about the cause... I'll put my examples in this thread for now, but if someone can point me towards a more appropriate thread I'll put it there instead.


When using youtube-dl to save a video attached to a tweet, the body of the tweet is used as the filename -- however, this can produce invalid filenames, at least on Windows. Using -o myfilename.mp4 is enough to work around this, but it would be nice if that weren't necessary :)

Note that this problem doesn't occur with very very small videos—the bug only happens when it tries to create .part files, not the actual video files themselves.

In short:
youtube-dl.exe https://twitter.com/RavenTest/status/1053357651101470729 WORKS
(short video on long tweet)

youtube-dl.exe https://twitter.com/RavenTest/status/1053359277916721154 WORKS
(long video on short tweet)

youtube-dl.exe https://twitter.com/RavenTest/status/1053354601607561217 does NOT work
(long video on long tweet with default filename)

youtube-dl.exe -o test.mp4 https://twitter.com/RavenTest/status/1053354601607561217 WORKS
(long video on long tweet with manual filename)

@omgitsraven commented on GitHub (Oct 19, 2018): I'm having an issue that was just closed as a duplicate without saying what it's a duplicate of, but I suppose they're suggesting that it's a duplicate of this? I made some test cases that demonstrate this happening as a factor of tweet *length* rather than containing formatting/tagging or not, so I'm not sure if this belongs here, or if this report was mistaken about the cause... I'll put my examples in this thread for now, but if someone can point me towards a more appropriate thread I'll put it there instead. --- When using youtube-dl to save a video attached to a tweet, the body of the tweet is used as the filename -- however, this can produce invalid filenames, at least on Windows. Using `-o myfilename.mp4` is enough to work around this, but it would be nice if that weren't necessary :) Note that this problem doesn't occur with very very small videos—the bug only happens when it tries to create `.part` files, not the actual video files themselves. **In short:** `youtube-dl.exe https://twitter.com/RavenTest/status/1053357651101470729` **WORKS** (short video on long tweet) `youtube-dl.exe https://twitter.com/RavenTest/status/1053359277916721154` **WORKS** (long video on short tweet) `youtube-dl.exe https://twitter.com/RavenTest/status/1053354601607561217` does **NOT** work (long video on long tweet with default filename) `youtube-dl.exe -o test.mp4 https://twitter.com/RavenTest/status/1053354601607561217` **WORKS** (long video on long tweet with manual filename)
Author
Owner

@ajj8 commented on GitHub (Mar 17, 2020):

This output format fixes it:

-o %(title).220s-%(id)s.%(ext)s

Still should be implemented into youtube-dl, though.

@ajj8 commented on GitHub (Mar 17, 2020): This output format fixes it: >-o %(title).220s-%(id)s.%(ext)s Still should be implemented into youtube-dl, though.
Author
Owner

@omgitsraven commented on GitHub (Mar 17, 2020):

I had to turn the value 220 down further before it would work for me, but that's a great workaround, thanks!

@omgitsraven commented on GitHub (Mar 17, 2020): I had to turn the value 220 down further before it would work for me, but that's a great workaround, thanks!
Author
Owner

@mwattsun commented on GitHub (Apr 3, 2020):

I fixed this bug and submitted a pull request. Twitter videos now download without problem.
See:
https://github.com/ytdl-org/youtube-dl/pull/24604
https://gist.github.com/mwattsun/a5eeb63087c8281066242321f0511185
https://github.com/mwattsun/youtube-dl/blob/master/youtube_dl/extractor/twitter.py

@mwattsun commented on GitHub (Apr 3, 2020): I fixed this bug and submitted a pull request. Twitter videos now download without problem. See: https://github.com/ytdl-org/youtube-dl/pull/24604 https://gist.github.com/mwattsun/a5eeb63087c8281066242321f0511185 https://github.com/mwattsun/youtube-dl/blob/master/youtube_dl/extractor/twitter.py
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/youtube-dl-ytdl-org#12383
No description provided.