Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't download entire video from bilibili (only part 1 of 7 is retained) #17166

Closed
Kadigan opened this issue Aug 5, 2018 · 2 comments
Closed

Can't download entire video from bilibili (only part 1 of 7 is retained) #17166

Kadigan opened this issue Aug 5, 2018 · 2 comments
Labels

Comments

@Kadigan
Copy link

@Kadigan Kadigan commented Aug 5, 2018

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

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
  • Checked that provided video/audio/playlist URLs (if any) are alive and playable in a browser

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

Output log:

G:\Downloaded>youtube-dl --verbose https://www.bilibili.com/video/av25295314
[debug] System config: []
[debug] User config: ['-o', 'G:/DOWNLOADED/%(title)s.%(ext)s', '-f', 'bestvideo[height<=?1080][vcodec!=?vp9][ext=mp4]+bestaudio[ext=m4a]/best[height<=?1080][ext=mp4]/best', '--merge-output-format', 'mkv']
[debug] Custom config: []
[debug] Command-line args: ['--verbose', 'https://www.bilibili.com/video/av25295314']
[debug] Encodings: locale cp1252, fs utf-8, out utf-8, pref cp1252
[debug] youtube-dl version 2018.08.04
[debug] Python version 3.6.1 (CPython) - Windows-7-6.1.7601-SP1
[debug] exe versions: ffmpeg N-65476-ge18d9d9, ffprobe N-65476-ge18d9d9, phantomjs 2.1.1
[debug] Proxy map: {}
[BiliBili] 25295314: Downloading webpage
[BiliBili] 25295314: Downloading video info page
WARNING:root: Failed to write string to console (cmd.exe does not support UTF-8)
WARNING:root: Failed to write string to console (cmd.exe does not support UTF-8)
[download] Downloading video 1 of 7
[debug] Invoking downloader on 'http://upos-hz-mirrorcos.acgvideo.com/upgcxcode/64/69/42996964/42996964-1-80.flv?um_deadline=1533510100&platform=pc&rate=486200&oi=1041576234&um_sign=1e9f639c41370ccff7faa5360ada1dd7&gen=playurl&os=cos&trid=30493794d6a64f47afa33a1427d8b46a'
WARNING:root: Failed to write string to console (cmd.exe does not support UTF-8)
[download] 100% of 115.33MiB in 04:54
[download] Downloading video 2 of 7
[debug] Invoking downloader on 'http://upos-hz-mirrorcos.acgvideo.com/upgcxcode/64/69/42996964/42996964-2-80.flv?um_deadline=1533510100&platform=pc&rate=515100&oi=1041576234&um_sign=c417e6ec37890c565bc5630ded36ccd9&gen=playurl&os=cos&trid=30493794d6a64f47afa33a1427d8b46a'
WARNING:root: Failed to write string to console (cmd.exe does not support UTF-8)
[download] 100% of 115.33MiB
[download] Downloading video 3 of 7
[debug] Invoking downloader on 'http://upos-hz-mirrorcos.acgvideo.com/upgcxcode/64/69/42996964/42996964-3-80.flv?um_deadline=1533510100&platform=pc&rate=542300&oi=1041576234&um_sign=f00d5210f950b5b768902e170604d394&gen=playurl&os=cos&trid=30493794d6a64f47afa33a1427d8b46a'
WARNING:root: Failed to write string to console (cmd.exe does not support UTF-8)
[download] 100% of 115.33MiB
[download] Downloading video 4 of 7
[debug] Invoking downloader on 'http://upos-hz-mirrorcos.acgvideo.com/upgcxcode/64/69/42996964/42996964-4-80.flv?um_deadline=1533510100&platform=pc&rate=518500&oi=1041576234&um_sign=512e1e071ab821cac5683864173bc3f2&gen=playurl&os=cos&trid=30493794d6a64f47afa33a1427d8b46a'
WARNING:root: Failed to write string to console (cmd.exe does not support UTF-8)
[download] 100% of 115.33MiB
[download] Downloading video 5 of 7
[debug] Invoking downloader on 'http://upos-hz-mirrorcos.acgvideo.com/upgcxcode/64/69/42996964/42996964-5-80.flv?um_deadline=1533510100&platform=pc&rate=498100&oi=1041576234&um_sign=483c0e77ba6918490c492c135e77c818&gen=playurl&os=cos&trid=30493794d6a64f47afa33a1427d8b46a'
WARNING:root: Failed to write string to console (cmd.exe does not support UTF-8)
[download] 100% of 115.33MiB
[download] Downloading video 6 of 7
[debug] Invoking downloader on 'http://upos-hz-mirrorcos.acgvideo.com/upgcxcode/64/69/42996964/42996964-6-80.flv?um_deadline=1533510100&platform=pc&rate=501500&oi=1041576234&um_sign=ab91507f33fdc1d18e63ca63b6f9b2d4&gen=playurl&os=cos&trid=30493794d6a64f47afa33a1427d8b46a'
WARNING:root: Failed to write string to console (cmd.exe does not support UTF-8)
[download] 100% of 115.33MiB
[download] Downloading video 7 of 7
[debug] Invoking downloader on 'http://upos-hz-mirrorcos.acgvideo.com/upgcxcode/64/69/42996964/42996964-7-80.flv?um_deadline=1533510100&platform=pc&rate=523600&oi=1041576234&um_sign=14a37194c943d7847d8da477086c86fc&gen=playurl&os=cos&trid=30493794d6a64f47afa33a1427d8b46a'
WARNING:root: Failed to write string to console (cmd.exe does not support UTF-8)
[download] 100% of 115.33MiB
WARNING:root: Failed to write string to console (cmd.exe does not support UTF-8)

Note: I install youtube-dl via pip install --upgrade youtube-dl, so please don't close my ticket based on "python version mismatch" as has happened previously.

Note 2: WARNING:root: Failed to write string to console (cmd.exe does not support UTF-8) is a result of my modification to utils.py at line 1393, which was done to enable downloading UTF-8-named files at all under Windows 7:

#raise OSError('Failed to write string')
import logging; logging.warning(" Failed to write string to console (cmd.exe does not support UTF-8)"); return True;

Problem description:

Only part 1 of 7 is ever downloaded -- the other parts (2 through 7) take < 1s to complete, and show the same video size. Honestly, I don't even know how a proper Bilibili download should look like, so I can't tell if this is an error or if it's intended.

The downloaded file size is as indicated, but it only covers about 7min of the actual video (which is 44 minutes long).

This issue has been around since at least 2018.03.26.1, when I came in to report a different issue (see #16019 for details - last comment).

Is it possible that my Youtube format-selection entry (as defined in my config file and shown above) is interfering here?

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Aug 5, 2018

-o must must provide filename uniqueness.

@dstftw dstftw closed this Aug 5, 2018
@dstftw dstftw added the invalid label Aug 5, 2018
@Kadigan
Copy link
Author

@Kadigan Kadigan commented Aug 5, 2018

Added %(autonumber)s to the -o option (overriding the user config entry), and now it seems to be working - so confirming user error.

Is there some way to enforce this behaviour for multi-part videos, while not adding trailing stuff in single-part videos?

Better yet, is there a way to enforce this internally (so that downloaded files are named something like a serial number) without it affecting the resultant (single/combined) filename?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.