Downloading feature for Bilibili is not working properly in terms of sequential videos #7878

Closed
opened 2026-02-21 04:09:30 -05:00 by deekerman · 6 comments
Owner

Originally created by @starkshaw on GitHub (Jun 1, 2016).

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2016.06.02. 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 2016.06.02

Before submitting an issue make sure you have:

  • At least skimmed through README and most notably 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:

Add -v flag to your command line you run youtube-dl with, copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):

$ youtube-dl -v http://www.bilibili.com/video/av4808130/
[debug] System config: []
[debug] User config: [u'-f', u'bestvideo+bestaudio/best']
[debug] Command-line args: [u'-v', u'http://www.bilibili.com/video/av4808130/']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2016.06.02
[debug] Python version 2.7.10 - Darwin-15.5.0-x86_64-i386-64bit
[debug] exe versions: avconv 11.4, avprobe 11.4, ffmpeg 3.0.2, ffprobe 3.0.2
[debug] Proxy map: {}
[BiliBili] 4808130: Downloading webpage
[BiliBili] 7802182: Downloading video info page
[download] Downloading playlist: 【长篇】哆啦A梦443【钉铛】
[BiliBili] playlist 【长篇】哆啦A梦443【钉铛】: Collected 4 video ids (downloading 4 of them)
[download] Downloading video 1 of 4
[debug] Invoking downloader on u'http://ws.acgvideo.com/b/35/7802182-1.flv?wsTime=1464819935&wsSecret2=46d27ce17d9c45ed34c501f1f9bd20e3&oi=1445658136&appkey=86385cdc024c0f6c&or=1167325994'
[download] Destination: 【长篇】哆啦A梦443【钉铛】-7802182.flv
[download] 100% of 46.71MiB in 00:37
[download] Downloading video 2 of 4
[debug] Invoking downloader on u'http://ws.acgvideo.com/b/35/7802182-2.flv?wsTime=1464819935&wsSecret2=a5caf416c7f8c9267f7e5a94068afdfe&oi=1445658136&appkey=86385cdc024c0f6c&or=1167325994'
[download] 【长篇】哆啦A梦443【钉铛】-7802182.flv has already been downloaded
[download] 100% of 46.71MiB
[download] Downloading video 3 of 4
[debug] Invoking downloader on u'http://ws.acgvideo.com/b/35/7802182-3.flv?wsTime=1464819935&wsSecret2=6adbdee4f951614edc56800a8ca1566e&oi=1445658136&appkey=86385cdc024c0f6c&or=1167325994'
[download] 【长篇】哆啦A梦443【钉铛】-7802182.flv has already been downloaded
[download] 100% of 46.71MiB
[download] Downloading video 4 of 4
[debug] Invoking downloader on u'http://ws.acgvideo.com/b/35/7802182-4.flv?wsTime=1464819935&wsSecret2=f1ea44300218d2ae35bc0bbe2ff6e4ae&oi=1445658136&appkey=86385cdc024c0f6c&or=1167325994'
[download] 【长篇】哆啦A梦443【钉铛】-7802182.flv has already been downloaded
[download] 100% of 46.71MiB
[download] Finished downloading playlist: 【长篇】哆啦A梦443【钉铛】
<end of log>

Description of your issue, suggested solution and other information

The URL of that video has multiple pieces, which is common in Bilibili, the early versions of youtube-dl downloaded these pieces and merge automatically, while the recent versions download these pieces without merge, but after the fix on last version, the file names are not carrying part_x suffix thus after first piece been successfully downloaded, the following ones cannot be downloaded since this naming issue.
Suggest that add the part_x back or even better, add auto merge back since I need to write a bash to use ffmpeg anyway.

Originally created by @starkshaw on GitHub (Jun 1, 2016). ### Make sure you are using the _latest_ version: run `youtube-dl --version` and ensure your version is _2016.06.02_. 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 **2016.06.02** ### Before submitting an _issue_ make sure you have: - [x] At least skimmed through [README](https://github.com/rg3/youtube-dl/blob/master/README.md) and **most notably** [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) - [x] 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: Add `-v` flag to **your command line** you run youtube-dl with, copy the **whole** output and insert it here. It should look similar to one below (replace it with **your** log inserted between triple ```): ``` $ youtube-dl -v http://www.bilibili.com/video/av4808130/ [debug] System config: [] [debug] User config: [u'-f', u'bestvideo+bestaudio/best'] [debug] Command-line args: [u'-v', u'http://www.bilibili.com/video/av4808130/'] [debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8 [debug] youtube-dl version 2016.06.02 [debug] Python version 2.7.10 - Darwin-15.5.0-x86_64-i386-64bit [debug] exe versions: avconv 11.4, avprobe 11.4, ffmpeg 3.0.2, ffprobe 3.0.2 [debug] Proxy map: {} [BiliBili] 4808130: Downloading webpage [BiliBili] 7802182: Downloading video info page [download] Downloading playlist: 【长篇】哆啦A梦443【钉铛】 [BiliBili] playlist 【长篇】哆啦A梦443【钉铛】: Collected 4 video ids (downloading 4 of them) [download] Downloading video 1 of 4 [debug] Invoking downloader on u'http://ws.acgvideo.com/b/35/7802182-1.flv?wsTime=1464819935&wsSecret2=46d27ce17d9c45ed34c501f1f9bd20e3&oi=1445658136&appkey=86385cdc024c0f6c&or=1167325994' [download] Destination: 【长篇】哆啦A梦443【钉铛】-7802182.flv [download] 100% of 46.71MiB in 00:37 [download] Downloading video 2 of 4 [debug] Invoking downloader on u'http://ws.acgvideo.com/b/35/7802182-2.flv?wsTime=1464819935&wsSecret2=a5caf416c7f8c9267f7e5a94068afdfe&oi=1445658136&appkey=86385cdc024c0f6c&or=1167325994' [download] 【长篇】哆啦A梦443【钉铛】-7802182.flv has already been downloaded [download] 100% of 46.71MiB [download] Downloading video 3 of 4 [debug] Invoking downloader on u'http://ws.acgvideo.com/b/35/7802182-3.flv?wsTime=1464819935&wsSecret2=6adbdee4f951614edc56800a8ca1566e&oi=1445658136&appkey=86385cdc024c0f6c&or=1167325994' [download] 【长篇】哆啦A梦443【钉铛】-7802182.flv has already been downloaded [download] 100% of 46.71MiB [download] Downloading video 4 of 4 [debug] Invoking downloader on u'http://ws.acgvideo.com/b/35/7802182-4.flv?wsTime=1464819935&wsSecret2=f1ea44300218d2ae35bc0bbe2ff6e4ae&oi=1445658136&appkey=86385cdc024c0f6c&or=1167325994' [download] 【长篇】哆啦A梦443【钉铛】-7802182.flv has already been downloaded [download] 100% of 46.71MiB [download] Finished downloading playlist: 【长篇】哆啦A梦443【钉铛】 <end of log> ``` --- ### Description of your _issue_, suggested solution and other information The URL of that video has multiple pieces, which is common in Bilibili, the early versions of `youtube-dl` downloaded these pieces and merge automatically, while the recent versions download these pieces without merge, but after the fix on last version, the file names are not carrying `part_x` suffix thus after first piece been successfully downloaded, the following ones cannot be downloaded since this naming issue. Suggest that add the `part_x` back or even better, add auto merge back since I need to write a `bash` to use `ffmpeg` anyway.
Author
Owner

@yan12125 commented on GitHub (Jun 2, 2016):

AFAIK auto merging in youtube-dl is never implemented. Which version are you using and how did you enable it?

@yan12125 commented on GitHub (Jun 2, 2016): AFAIK auto merging in youtube-dl is never implemented. Which version are you using and how did you enable it?
Author
Owner

@yan12125 commented on GitHub (Jun 2, 2016):

_partX suffixes will be added back in the next version. Sorry for my previous mistake.

@yan12125 commented on GitHub (Jun 2, 2016): `_partX` suffixes will be added back in the next version. Sorry for my previous mistake.
Author
Owner

@starkshaw commented on GitHub (Jun 2, 2016):

@yan12125 I don't know the auto merging you've mentioned. But Bilibili download feature did merge all clips together. Probably version in last year, and I reported this when I found out:
https://github.com/rg3/youtube-dl/issues/8314

Like if I download best quality for YouTube it'll merge audio and video into a single mkv file rather than audio track and video track alone. For Bilibili it also should merge clips into a single file.

@starkshaw commented on GitHub (Jun 2, 2016): @yan12125 I don't know the auto merging you've mentioned. But Bilibili download feature did merge all clips together. Probably version in last year, and I reported this when I found out: https://github.com/rg3/youtube-dl/issues/8314 Like if I download best quality for YouTube it'll merge audio and video into a single mkv file rather than audio track and video track alone. For Bilibili it also should merge clips into a single file.
Author
Owner

@yan12125 commented on GitHub (Jun 2, 2016):

From the description at #8314, I guess in BiliBili, videos were originally served as single files, and some day they decided to convert them to multi-part files. Handling multi-part videos correctly is much harder than merging video- and audio-only files, like the case in YouTube. There are lots of pull requests aim to implement it (#2844, #2723, #995, etc.), but none of them is good enough to get merged.

@yan12125 commented on GitHub (Jun 2, 2016): From the description at #8314, I guess in BiliBili, videos were originally served as single files, and some day they decided to convert them to multi-part files. Handling multi-part videos correctly is much harder than merging video- and audio-only files, like the case in YouTube. There are lots of pull requests aim to implement it (#2844, #2723, #995, etc.), but none of them is good enough to get merged.
Author
Owner

@starkshaw commented on GitHub (Jun 2, 2016):

@yan12125 Hi, actually it was split into several files as well, if my memory is correct, it downloaded several files and merge at the end.
Since the old version has _partX suffixes, I have a bash for that, and if you can implement it into your code make it auto-merge, that'll be some great contribution to me and probably someone else. 😄

Here's what I have before:

printf "ffconcat version 1.0\n" > videolist.txt
for i in {1..4}
do
    printf "file '%s'\n" "【长篇】哆啦A梦442【梦蓝】-7668669_part$i.flv" >> videolist.txt
done
ffmpeg -f concat -safe 0 -i videolist.txt -c copy "【长篇】哆啦A梦442【梦蓝】-7668669.flv"
rm videolist.txt

Using ffmpeg concat feature.
So far, I used it for Bilibili, and for this gist https://gist.github.com/starkshaw/ec3cba780100bbb4050d 😏 before. But the code above is for newer ffmpeg version.

@starkshaw commented on GitHub (Jun 2, 2016): @yan12125 Hi, actually it was split into several files as well, if my memory is correct, it downloaded several files and merge at the end. Since the old version has `_partX` suffixes, I have a `bash` for that, and if you can implement it into your code make it auto-merge, that'll be some great contribution to me and probably someone else. 😄 Here's what I have before: ``` printf "ffconcat version 1.0\n" > videolist.txt for i in {1..4} do printf "file '%s'\n" "【长篇】哆啦A梦442【梦蓝】-7668669_part$i.flv" >> videolist.txt done ffmpeg -f concat -safe 0 -i videolist.txt -c copy "【长篇】哆啦A梦442【梦蓝】-7668669.flv" rm videolist.txt ``` Using `ffmpeg` concat feature. So far, I used it for Bilibili, and for this gist https://gist.github.com/starkshaw/ec3cba780100bbb4050d 😏 before. But the code above is for newer `ffmpeg` version.
Author
Owner

@yan12125 commented on GitHub (Jun 2, 2016):

Dunno. Maybe you were using a fork but not rg3's version.

@yan12125 commented on GitHub (Jun 2, 2016): Dunno. Maybe you were using a fork but not rg3's version.
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#7878
No description provided.