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

Youku Incorrect Handling of Format Options #6193

Closed
eternia478 opened this issue Jul 11, 2015 · 3 comments
Closed

Youku Incorrect Handling of Format Options #6193

eternia478 opened this issue Jul 11, 2015 · 3 comments
Labels
bug

Comments

@eternia478
Copy link

@eternia478 eternia478 commented Jul 11, 2015

It seems that youtube-dl is bad with handling format options when the video is split like in the case of Youku or Tudou. For example, the following is a run that ended in an error instead of concatenation:

~$ youtube-dl -f h4 http://v.youku.com/v_show/id_XMTI1ODU4NzIzMg==.html
[youku] XMTI1ODU4NzIzMg: Downloading JSON metadata 1
[youku] XMTI1ODU4NzIzMg: Downloading JSON metadata 2
[download] Downloading playlist: 花千骨 01
[youku] playlist 花千骨 01: Collected 21 video ids (downloading 21 of them)
[download] Downloading video 1 of 21
[download] Destination: 花千骨 01-XMTI1ODU4NzIzMg_part1.flv
[download] 100% of 13.06MiB in 00:03
[download] Downloading video 2 of 21
[download] Destination: 花千骨 01-XMTI1ODU4NzIzMg_part2.flv
[download] 100% of 13.25MiB in 00:03
[download] Downloading video 3 of 21
[download] Destination: 花千骨 01-XMTI1ODU4NzIzMg_part3.flv
[download] 100% of 13.62MiB in 00:03
[download] Downloading video 4 of 21
[download] Destination: 花千骨 01-XMTI1ODU4NzIzMg_part4.flv
[download] 100% of 12.83MiB in 00:05
[download] Downloading video 5 of 21
[download] Destination: 花千骨 01-XMTI1ODU4NzIzMg_part5.flv
[download] 100% of 15.42MiB in 00:09
[download] Downloading video 6 of 21
[download] Destination: 花千骨 01-XMTI1ODU4NzIzMg_part6.flv
[download] 100% of 12.45MiB in 00:03
[download] Downloading video 7 of 21
[download] Destination: 花千骨 01-XMTI1ODU4NzIzMg_part7.flv
[download] 100% of 11.97MiB in 00:05
[download] Downloading video 8 of 21
ERROR: requested format not available

The reason for this is because the number of videos each format is split across is different. For example, here, resolutions h4 and h3 require only 7 files, but h1 requires 21. Apparently youtube-dl will try to get all 21 even if such is not available for those formats.

~$ youtube-dl -F http://v.youku.com/v_show/id_XMTI1ODU4NzIzMg==.html
[youku] XMTI1ODU4NzIzMg: Downloading JSON metadata 1
[youku] XMTI1ODU4NzIzMg: Downloading JSON metadata 2
[download] Downloading playlist: 花千骨 01
[youku] playlist 花千骨 01: Collected 21 video ids (downloading 21 of them)
[download] Downloading video 1 of 21
[info] Available formats for XMTI1ODU4NzIzMg_part1:
format code  extension  resolution note
h4           flv        unknown    13.06MiB
h3           mp4        unknown    24.91MiB
h2           flv        unknown    26.86MiB
h1           flv        unknown    37.29MiB (best)
[download] Downloading video 2 of 21
[info] Available formats for XMTI1ODU4NzIzMg_part2:
format code  extension  resolution note
h4           flv        unknown    13.25MiB
h3           mp4        unknown    24.77MiB
h2           flv        unknown    27.65MiB
h1           flv        unknown    37.23MiB (best)
[download] Downloading video 3 of 21
[info] Available formats for XMTI1ODU4NzIzMg_part3:
format code  extension  resolution note
h4           flv        unknown    13.62MiB
h3           mp4        unknown    22.78MiB
h2           flv        unknown    23.37MiB
h1           flv        unknown    32.56MiB (best)
[download] Downloading video 4 of 21
[info] Available formats for XMTI1ODU4NzIzMg_part4:
format code  extension  resolution note
h4           flv        unknown    12.83MiB
h3           mp4        unknown    24.52MiB
h2           flv        unknown    30.69MiB
h1           flv        unknown    28.85MiB (best)
[download] Downloading video 5 of 21
[info] Available formats for XMTI1ODU4NzIzMg_part5:
format code  extension  resolution note
h4           flv        unknown    15.42MiB
h3           mp4        unknown    29.13MiB
h2           flv        unknown    30.98MiB
h1           flv        unknown    37.00MiB (best)
[download] Downloading video 6 of 21
[info] Available formats for XMTI1ODU4NzIzMg_part6:
format code  extension  resolution note
h4           flv        unknown    12.45MiB
h3           mp4        unknown    24.62MiB
h2           flv        unknown    23.00MiB
h1           flv        unknown    37.96MiB (best)
[download] Downloading video 7 of 21
[info] Available formats for XMTI1ODU4NzIzMg_part7:
format code  extension  resolution note
h4           flv        unknown    11.97MiB
h3           mp4        unknown    26.91MiB
h2           flv        unknown    30.45MiB
h1           flv        unknown    47.14MiB (best)
[download] Downloading video 8 of 21
[info] Available formats for XMTI1ODU4NzIzMg_part8:
format code  extension  resolution note
h2           flv        unknown    21.83MiB
h1           flv        unknown    25.67MiB (best)
[download] Downloading video 9 of 21
[info] Available formats for XMTI1ODU4NzIzMg_part9:
format code  extension  resolution note
h2           flv        unknown    34.03MiB
h1           flv        unknown    30.46MiB (best)
[download] Downloading video 10 of 21
[info] Available formats for XMTI1ODU4NzIzMg_part10:
format code  extension  resolution note
h2           flv        unknown    28.26MiB
h1           flv        unknown    48.60MiB (best)
[download] Downloading video 11 of 21
[info] Available formats for XMTI1ODU4NzIzMg_part11:
format code  extension  resolution note
h2           flv        unknown    29.12MiB
h1           flv        unknown    35.45MiB (best)
[download] Downloading video 12 of 21
[info] Available formats for XMTI1ODU4NzIzMg_part12:
format code  extension  resolution note
h2           flv        unknown    25.24MiB
h1           flv        unknown    34.04MiB (best)
[download] Downloading video 13 of 21
[info] Available formats for XMTI1ODU4NzIzMg_part13:
format code  extension  resolution note
h2           flv        unknown    26.80MiB
h1           flv        unknown    41.57MiB (best)
[download] Downloading video 14 of 21
[info] Available formats for XMTI1ODU4NzIzMg_part14:
format code  extension  resolution note
h2           flv        unknown    29.61MiB
h1           flv        unknown    45.91MiB (best)
[download] Downloading video 15 of 21
[info] Available formats for XMTI1ODU4NzIzMg_part15:
format code  extension  resolution note
h1           flv        unknown    35.56MiB
[download] Downloading video 16 of 21
[info] Available formats for XMTI1ODU4NzIzMg_part16:
format code  extension  resolution note
h1           flv        unknown    41.85MiB
[download] Downloading video 17 of 21
[info] Available formats for XMTI1ODU4NzIzMg_part17:
format code  extension  resolution note
h1           flv        unknown    33.37MiB
[download] Downloading video 18 of 21
[info] Available formats for XMTI1ODU4NzIzMg_part18:
format code  extension  resolution note
h1           flv        unknown    34.01MiB
[download] Downloading video 19 of 21
[info] Available formats for XMTI1ODU4NzIzMg_part19:
format code  extension  resolution note
h1           flv        unknown    34.69MiB
[download] Downloading video 20 of 21
[info] Available formats for XMTI1ODU4NzIzMg_part20:
format code  extension  resolution note
h1           flv        unknown    27.53MiB
[download] Downloading video 21 of 21
[info] Available formats for XMTI1ODU4NzIzMg_part21:
format code  extension  resolution note
h1           flv        unknown    27.55MiB
@eternia478
Copy link
Author

@eternia478 eternia478 commented Jul 11, 2015

It's not as though there isn't a workaround. A quick ffmpeg -f concat works like a charm. But I think it would be better if this was automated, so that batch downloads won't run into problems.

@jaimeMF jaimeMF added the bug label Jul 11, 2015
@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Jul 11, 2015

So with format h4 the video ends with the part 7?

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented May 26, 2017

This is no longer an issue after the recent Youku update. Now Youku provides HLS, which is well supported by youtube-dl.

@yan12125 yan12125 closed this May 26, 2017
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
3 participants
You can’t perform that action at this time.