mpv-player / mpv

🎥 Command line video player
https://mpv.io
Other
27.85k stars 2.87k forks source link

mpv fails playing next items of m3u file when one url is unavailable #6578

Closed sebma closed 4 years ago

sebma commented 5 years ago

mpv version and platform

mpv v2:0.29.1+git2~trusty on Ubuntu 14.04.5 LTS

Reproduction steps

$ command mpv --no-config --ytdl-raw-options=sub-lang= myPlaylists/Louanges_Adoration.m3u --log-file=output.txt
Playing: http://www.youtube.com/watch?v=tt1yUlqoBAB
[ytdl_hook] ERROR: This video is unavailable.
[ytdl_hook] 
[ytdl_hook] stack traceback:
[ytdl_hook]     @ytdl_hook.lua:522: in function 'run_ytdl_hook'
[ytdl_hook]     @ytdl_hook.lua:674: in function 'fn'
[ytdl_hook]     mp.defaults:515: in function 'handler'
[ytdl_hook]     mp.defaults:459: in function 'call_event_handlers'
[ytdl_hook]     mp.defaults:493: in function 'dispatch_events'
[ytdl_hook]     mp.defaults:452: in function <mp.defaults:451>
[ytdl_hook]     [C]: in ?
[ytdl_hook]     [C]: in ?
[ytdl_hook] Lua error: @ytdl_hook.lua:522: attempt to concatenate local 'err' (a nil value)
client removed during hook handling
Failed to recognize file format.

Playing: http://www.youtube.com/watch?v=TUXIWIvebW0
Sending hook command failed. Removing hook.
Failed to recognize file format.

Playing: http://www.youtube.com/watch?v=tt1yUlqoB-U
Failed to recognize file format.

Playing: http://www.youtube.com/watch?v=-MPZ7elLAPQ
Failed to recognize file format.

Playing: http://www.youtube.com/watch?v=q4KzCrpcLjo
Failed to recognize file format.

Playing: http://www.youtube.com/watch?v=6Uh47_uF2sM
Failed to recognize file format.

Exiting... (Quit)

Expected behavior

The unavailable url(s) should be skipped and the others should be played

Actual behavior

The first unavailable url causes the other urls not to be played.

Log file

output.txt

Sample files

zc62 commented 5 years ago

Cannot reproduce with a m3u file I created that contains first two youtube links you provided. The second video played successfully.

mpv --no-config --ytdl-raw-options=sub-lang= .\test.m3u

Playing: http://www.youtube.com/watch?v=tt1yUlqoBAB
[ytdl_hook] ERROR: This video is unavailable.
[ytdl_hook] youtube-dl failed: unexpected error ocurred
Failed to recognize file format.

Playing: http://www.youtube.com/watch?v=TUXIWIvebW0
 (+) Video --vid=1 (*) (h264 640x480 25.000fps)
 (+) Audio --aid=1 (*) 'DASH audio' (aac 2ch 44100Hz) (external)

ytdl_hook.lua does not seem to be changed in past 6 months, but please make sure you have the latest version. And probably update your youtube-dl.

garoto commented 5 years ago

I can reproduce with these two slightly distinct examples from YT:

mpv --ytdl-raw-options="playlist-start=28" "https://www.youtube.com/playlist?list=PLoRduEz9iRshkqzX06twydbR4x7R064Ay"

and

mpv --ytdl-raw-options="yes-playlist=,playlist-start=22" "https://www.youtube.com/watch?v=SGvmnrToQo8&list=PLJ1qnUFyyTf-eP4Ng7tjgdFZEqu2qODcJ"
sebma commented 5 years ago

@zc62 ytdl_hook.lua and youtube-dl are both up to date :

$ ls -l ./.config/mpv/scripts/ytdl_hook.lua 
-rw-rw-r-- 1 abcdexyzt abcdexyzt 21940 2019-03-22 01:34:21 ./.config/mpv/scripts/ytdl_hook.lua
$ youtube-dl --version
2019.03.18

Can you give the output of this command on your system : lua -v ?

zc62 commented 5 years ago

@sebma ytdl_hook.lua is a built-in script. Maybe you shouldn't manually download it and put it in your local config folder. Just compile current git master.

I cannot reproduce what @garoto gives either. Just a random guess, possibly related to the lua version that mpv is built with? shinchiro's build uses luajit. (I cannot give the output of lua -v since I didn't actually install lua on my machine. The mpv build is static.)

sebma commented 5 years ago

@zc62 My ytdl_hook.lua comes from the git master : https://github.com/mpv-player/mpv/raw/master/player/lua/ytdl_hook.lua

zc62 commented 5 years ago

I know. I mean this script is built inside the mpv executable, as shown here https://github.com/mpv-player/mpv/blob/fcb320fd3fd3b1fc5549c009f23fc831bd37a495/player/scripting.c#L209 So do not manually download it and put it in ~/.config/mpv/scripts. The version of this script is related to the version of mpv. Putting an extra ytdl_hook.lua might confuse mpv, I guess.

I just checked the git hash of your build, f2e7e81 is recent enough, so forget about the script.

One thing you could try is probably building mpv with luajit.

sebma commented 5 years ago

@zc62 OK, I just removed the ~/.config/mpv/scripts/ytdl_hook.lua script because it's already builtin into mpv avoid any confusion in the future.

I think, I've found where the problem is coming from. It's not really related to mpv but to one of my youtube-dl parameters in ~/.config/youtube-dl.conf.

I use the youtube-dl parameter --ignore-errors to skip unavailable items in a playlist continue downloading.

mpv does not seem to "like" this youtube-dl parameter is set (in ~/.config/youtube-dl.conf), so I tried calling mpv with --ytdl-raw-options=ignore-errors=no and I tried with --ytdl-raw-options=no-ignore-errors=, but none of these seem to solve this problem.

Can you do something about it so don't have to remove --ignore-errors from my ~/.config/youtube-dl.conf each time I want to play a playlist with mpv ?

garoto commented 5 years ago

ytdl-raw-options=ignore-config=

sebma commented 5 years ago

Actually, I don't want to ignore the whole youtube-dl config, I want only want to ignore the --ignore-errors parameter from youtube-dl.

garoto commented 5 years ago

What yt-dl feature that you need that ytdl_hook.lua won't provide nor ytdl-raw-options= won't cover?

sebma commented 5 years ago

@garoto I want to disable youtube-dl --ignore-errors parameter ONLY when I use mpv but I want to keep this --ignore-errors parameter in my ~/.config/youtube-dl.conf.

Therefore I tried mpv --ytdl-raw-options=ignore-errors=no ... and I tried mpv --ytdl-raw-options=no-ignore-errors=, ... but none of these seem to work.

Can you help ?

sebma commented 5 years ago

@zc62 Hi, can you implement a --ytdl-raw-options=no-ignore-errors= or a --ytdl-raw-options=ignore-errors=no to have mpv disable the --ignore-errors on youtube-dlcalls ?

qmega commented 5 years ago

mpv doesn't "implement" --ytdl-raw-options. Those are just youtube-dl's options that get passed directly.

The inverse of --ignore-errors is --abort-on-error. It's right under it in the manpage. The manpage could make it a little clearer that they're exact opposites, but looking at the code they really are: https://github.com/ytdl-org/youtube-dl/blob/8cb10807ed6c6aa8e0f316b3f1a31a91df46abdb/youtube_dl/options.py#L144-L151

sebma commented 5 years ago

@qmega It works but not every time.

When working :

$ command mpv --no-config --ytdl-raw-options=abort-on-error=,sub-lang= myPlaylists/Louanges_Adoration.m3u --log-file=output.txt
Playing: myPlaylists/Louanges_Adoration.m3u

Playing: http://www.youtube.com/watch?v=tt1yUlqoBAB
[ytdl_hook] ERROR: This video is unavailable.
[ytdl_hook] youtube-dl failed: unexpected error ocurred 
Failed to recognize file format.

Playing: http://www.youtube.com/watch?v=TUXIWIvebW0
 (+) Video --vid=1 (*) (h264 640x480 25.000fps)
 (+) Audio --aid=1 (*) 'DASH audio' (aac 2ch 44100Hz) (external)
AO: [pulse] 44100Hz stereo 2ch float
VO: [gpu] 640x480 yuv420p
AV: 00:00:00 / 00:29:24 (0%) A-V:  0.000 Cache: 29s+548KB
[ffmpeg] https: Will reconnect at 475136 in 0 second(s), error=End of file.
[ffmpeg] https: Will reconnect at 311296 in 0 second(s), error=End of file.
[ffmpeg] NULL: Invalid NAL unit size (66 > 57).
[ffmpeg] NULL: missing picture in access unit with size 61

Exiting... (Quit)

When not working :

$ command mpv --no-config --ytdl-raw-options=abort-on-error=,sub-lang= myPlaylists/Louanges_Adoration.m3u --log-file=output.txt
Playing: myPlaylists/Louanges_Adoration.m3u

Playing: http://www.youtube.com/watch?v=tt1yUlqoBAB
[ytdl_hook] ERROR: This video is unavailable.
[ytdl_hook] 
[ytdl_hook] stack traceback:
[ytdl_hook]     @ytdl_hook.lua:522: in function 'run_ytdl_hook'
[ytdl_hook]     @ytdl_hook.lua:674: in function 'fn'
[ytdl_hook]     mp.defaults:515: in function 'handler'
[ytdl_hook]     mp.defaults:459: in function 'call_event_handlers'
[ytdl_hook]     mp.defaults:493: in function 'dispatch_events'
[ytdl_hook]     mp.defaults:452: in function <mp.defaults:451>
[ytdl_hook]     [C]: in ?
[ytdl_hook]     [C]: in ?
[ytdl_hook] Lua error: @ytdl_hook.lua:522: attempt to concatenate local 'err' (a nil value)
client removed during hook handling
Failed to recognize file format.

Playing: http://www.youtube.com/watch?v=TUXIWIvebW0
Sending hook command failed. Removing hook.
Failed to recognize file format.

Playing: http://www.youtube.com/watch?v=tt1yUlqoB-U

Exiting... (Quit)

Any idea why ?

sebma commented 5 years ago

The --ytdl-raw-options=abort-on-error= parameter could also be a solution to issue #6285

qmega commented 5 years ago

In the not-working case, it seems like youtube-dl is exiting with a success code returning some output? despite printing the error. I'm not sure why. Tried briefly and couldn't get it to happen myself. Based on the error message and some quick tracing, it seems like mpv is taking the success path after having called youtube-dl, but actually decodes the JSON to a null value (maybe because it's empty? or maybe it's actually null) which then throws it down the error path without an actual error.

This could end up being a youtube-dl issue. Try running on the command line: youtube-dl -J --abort-on-error '<the url of the video that fails>' ; echo "exit code: $?" a few times (you want to hit whatever circumstances get mpv to fail), and see what exit codes you get. If you see youtube-dl fail, but exit code: 0 shows up after it, then that's probably something you should report to youtube-dl.

sebma commented 5 years ago

@qmega I'm running this command and it will stop launching youtube-dl and exit when the output of youtube-dl changes :

$ watch -n1 -g 'youtube-dl -J --abort-on-error -a ~/myPlaylists/Louanges_Adoration.m3u ; echo "exit code: $?"'
Every 1,0s: youtube-dl -J --abort-on-error -a ~/myPlaylists/Louanges_Adoration.m3u ; echo "exit code: $?"    Fri Mar 29 01:53:56 2019

ERROR: This video is unavailable.
exit code: 1

Unfortunately, after many repetitions, youtube-dl is still not exiting 0.

I'm not sure this if is a youtube-dl bug anymore.

qmega commented 5 years ago

Okay, so ytdl_hook actually doesn't check for non-zero exit code in general, only exec errors / signals. I take back my prediction about it exiting with 0. Maybe the script should check for non-zero exit code though... That would fix this issue at least. Not sure if if would ever exit non-zero but also return what we want.

Having looked a little more carefully at the script now, as long as it was able to run youtube-dl (even if it returned a bad exit status) and it produced some output, the script will try to parse that output.

So my next guess is that youtube-dl outputs something to stdout in the failing case, and that is successfully parsed as JSON but its value is nil (null). This could be a string that's only whitespace, maybe? Or the actual string "null". youtube-dl -J ... | wc might at least show you if there is any output.

It's weird that it only happens sometimes, though. (I can't get it to happen at all here.) If it's sometimes printing something and sometimes not, watch -g should have still triggered on that, right?

Anything you can think of in terms of getting it to fail reproducibly? (Your original use case, I mean.) Does it fail at random every few times? Does it fail at certain times and then keep failing for a while?

sebma commented 5 years ago

The number of characters does not seem to change either :

$ watch -n1 -g 'youtube-dl -J --abort-on-error http://www.youtube.com/watch?v=tt1yUlqoBAB 2>&1 | wc'
Every 1,0s: youtube-dl -J --abort-on-error http://www.youtube.com/watch?v=tt1yUlqoBAB 2>&1 | wc                                                  Fri Mar 29 12:34:43 2019

      1       5      34

Type this : $ echo -e http://www.youtube.com/watch?v=tt1yUlqoBAB"\n"http://www.youtube.com/watch?v=tt1yUlqoB-U > test_issue_#6578.urls and then this : $ command mpv --no-config --ytdl-raw-options=sub-lang=,abort-on-error= -playlist test_issue_#6578.urls

You should get the [ytdl_hook] stack traceback quite often but not every time :

$ command mpv --no-config --ytdl-raw-options=sub-lang=,abort-on-error= -playlist test_issue_#6578.urls
[playlist] Reading plaintext playlist.
Playing: http://www.youtube.com/watch?v=tt1yUlqoBAB
[ytdl_hook] ERROR: This video is unavailable.
[ytdl_hook] 
[ytdl_hook] stack traceback:
[ytdl_hook]     @ytdl_hook.lua:522: in function 'run_ytdl_hook'
[ytdl_hook]     @ytdl_hook.lua:674: in function 'fn'
[ytdl_hook]     mp.defaults:515: in function 'handler'
[ytdl_hook]     mp.defaults:459: in function 'call_event_handlers'
[ytdl_hook]     mp.defaults:493: in function 'dispatch_events'
[ytdl_hook]     mp.defaults:452: in function <mp.defaults:451>
[ytdl_hook]     [C]: in ?
[ytdl_hook]     [C]: in ?
[ytdl_hook] Lua error: @ytdl_hook.lua:522: attempt to concatenate local 'err' (a nil value)
client removed during hook handling
Failed to recognize file format.

Playing: http://www.youtube.com/watch?v=tt1yUlqoB-U
Sending hook command failed. Removing hook.
Failed to recognize file format.
qmega commented 5 years ago

2>&1

Don't count stderr. What we want to see is if anything comes on stdout. For me it's always 0 0 0.

I tried your example a few times and it still never fails for me. (I tried that first video a bunch of times before, too, seeing it in your posted output.)

Can you post your youtube-dl config? Maybe that's the difference between your setup and mine.

Another thing to try is having the script just print the JSON it's about to parse. Here's a version of the script that does that: custom_ytdl_hook.lua (had to upload as .txt). You can use it with --no-ytdl --script=cusotm_ytdl_hook.lua.

sebma commented 5 years ago

@qmega The output is also 0 0 0 :

$ watch -n1 -g 'youtube-dl --ignore-config -J --abort-on-error http://www.youtube.com/watch?v=tt1yUlqoBAB | wc'
Every 1,0s: youtube-dl --ignore-config -J --abort-on-error http://www.youtube.com/watch?v=tt1yUl...  Sat Mar 30 12:37:31 2019

WARNING: Unable to extract video title
ERROR: This video is unavailable.
      0       0       0

I think you are right, maybe it has something to do with my youtube-dl.conf because if I had ignore-config= to the --ytdl-raw-options, it works much more often :

$ command mpv --no-config --ytdl-raw-options=sub-lang=,abort-on-error=,ignore-config= -playlist test_issue_#6578.urls
[playlist] Reading plaintext playlist.
Playing: http://www.youtube.com/watch?v=tt1yUlqoBAB
[ytdl_hook] ERROR: This video is unavailable.
[ytdl_hook] youtube-dl failed: unexpected error ocurred 
Failed to recognize file format.

Playing: http://www.youtube.com/watch?v=tt1yUlqoB-U
 (+) Video --vid=1 (*) (h264 852x480 29.970fps)
 (+) Audio --aid=1 --alang=eng (*) 'DASH audio' (opus 2ch 48000Hz) (external)
AO: [pulse] 48000Hz stereo 2ch float
VO: [gpu] 852x480 yuv420p
AV: 00:00:00 / 00:08:21 (0%) A-V:  0.000 Cache: 32s+1MB
[ffmpeg] https: Will reconnect at 1277952 in 0 second(s), error=End of file.
[ffmpeg] NULL: Invalid NAL unit size (3156 > 186).
[ffmpeg] NULL: missing picture in access unit with size 190

Exiting... (Quit)

Here is my youtube-dl.conf :

$ egrep -v "^$|^#" ~/.config/youtube-dl.conf 
--ignore-errors --prefer-ffmpeg  --no-warnings --restrict-filenames -o"%(title)s__%(format_id)s__%(id)s.%(ext)s" --format mp4[height<=480]/mp4/best --add-metadata --write-auto-sub --embed-subs --sub-lang en,fr,es,de --hls-prefer-native

And here is the output of mpv with --no-ytdl --script=custom_ytdl_hook.txt :

$ command mpv --no-config --no-ytdl --script=custom_ytdl_hook.txt --ytdl-raw-options=sub-lang=,abort-on-error=,ignore-config= -playlist test_issue_#6578.urls --log-file=output.txt
[playlist] Reading plaintext playlist.
Playing: http://www.youtube.com/watch?v=tt1yUlqoBAB
Failed to recognize file format.

Playing: http://www.youtube.com/watch?v=tt1yUlqoB-U
Failed to recognize file format.

Exiting... (Errors when loading file)

Here is the output.txt

qmega commented 5 years ago

Ah, using your youtube-dl config I immediately got the traceback.

You have to rename the custom script to .lua; right now your mpv's not using it at all.

Here's what I got, though:

[ytdl_hook] json: 'null
[ytdl_hook] ' (len 5) 

Which is pretty much what I was expecting.

The actual youtube-dl command that makes this happen ends up being:

youtube-dl --no-warnings -J --flat-playlist --sub-format ass/srt/best --format bestvideo+bestaudio/best --sub-lang --abort-on-error --all-subs --no-playlist -- 'http://www.youtube.com/watch?v=tt1yUlqoBAB'

From that I'm getting "null" on stdout and 1 1 5 from wc consistently.

I narrowed down your config to just --ignore-errors. That alone in the config file is enough to reproduce this. Which is really weird, because --abort-on-error should just be completely reversing that.

...Oh. You've got --sub-lang in there with no argument. So --abort-on-error is taken as the sub lang and completely ignored. The reason it doesn't always fail is that the order of --ytdl-raw-options is shuffled based on lua's hash seed, I guess.

I'm not actually sure how to get an empty --sub-lang passed through, though. That may not be possible with the current ytdl_hook script.

qmega commented 5 years ago

So, to summarize where we've got so far, I guess:

One idea would be to make --ytdl-raw-options a string or string list instead of a key-value list in mpv's option parser, and then parse it in the script. That could solve the shuffling problem, and could solve the empty-arg problem -- by not requiring an "=" for no-value options, and passing the arg even if it's empty when there is an "=" -- but that would break existing configs.

sebma commented 5 years ago

@qmega I use --ytdl-raw-options=sub-lang= to stop youtube-dl from downloading any subtitle because there are 104 of them and it takes youtube-dl upto 1m41s to download them all and then mpv starts playing the video (http://www.youtube.com/watch?v=tt1yUlqoB-U).

Are you saying that, for the time being, mpv cannot pass an empty argument to a youtube-dl option when there is another one : --ytdl-raw-options=sub-lang=,abort-on-error=,ignore-config= ?

Until this issue is solved is there a workaround ?

Is there another youtube-dl option that prevents it from downloading any subtitle ?

Here is the output with the custom_ytdl_hook.lua :

$ mv -v custom_ytdl_hook.txt custom_ytdl_hook.lua
‘custom_ytdl_hook.txt’ -> ‘custom_ytdl_hook.lua’
$ command mpv --no-config --no-ytdl --script=custom_ytdl_hook.lua --ytdl-raw-options=sub-lang=,abort-on-error=,ignore-config= -playlist test_issue_#6578.urls --log-file=output.txt
[playlist] Reading plaintext playlist.
Playing: http://www.youtube.com/watch?v=tt1yUlqoBAB
[custom_ytdl_hook] ERROR: This video is unavailable.
[custom_ytdl_hook] json: '' (len 0) 
[custom_ytdl_hook] youtube-dl failed: unexpected error ocurred 
Failed to recognize file format.

Playing: http://www.youtube.com/watch?v=tt1yUlqoB-U
[custom_ytdl_hook] json: '{"id": "tt1yUlqoB-U", "uploader": "Israel Kindomba", "uploader_id": "UCTbD9l7jJEotwLSa5fuk1-Q", "uploader_url": "http://www.youtube.com/channel/UCTbD9l7jJEotwLSa5fuk1-Q", "channel_id": "UCTbD9l7jJEotwLSa5fuk1-Q", "channel_url": "http://www.youtube.com/channel/UCTbD9l7jJEotwLSa5fuk1-Q", "upload_date": "20170421", "license": null, "creator": null, "title": "LA GRACE by ISRAEL KINDOMBA", "alt_title": null, "thumbnail": "https://i.ytimg.com/vi/tt1yUlqoB-U/hqdefault.jpg", "description": "Soyez \u00e9difi\u00e9s par ces d\u00e9clarations sur la gr\u00e2ce...", "categories": ["People & Blogs"], "tags": [], "subtitles": {}, "automatic_captions": {}, "duration": 501, "age_limit": 0, "annotations": null, "chapters": null, "webpage_url": "https://www.youtube.com/watch?v=tt1yUlqoB-U", "view_count": 3085, "like_count": 113, "dislike_count": 3, "average_rating": null, "formats": [{"format_id": "249", "url": "https://r1---sn-cv0tb0xn-jqbk.googlevideo.com/videoplayback?initcwndbps=770000&dur=501.081&fvip=1&signature=15AEAAB23DA5A1E60B41511EAB27A3AF5390D0E9.8730902B30FF1FECFC6244A6C645C379CE16618E&clen=3115101&itag=249&c=WEB&key=yt6&ipbits=0&id=o-AOrIX5RYgmprbg9wJ2bTP5Cfgj33wFJiToIV_DQNiTMy&ms=au%2Crdu&mt=1553985358&mv=m&expire=1554007053&keepalive=yes&requiressl=yes&ip=89.84.148.159&mime=audio%2Fwebm&source=youtube&mm=31%2C29&mn=sn-cv0tb0xn-jqbk%2Csn-25glen7y&pl=21&ei=re-fXLbmMdDYVPuDi5AE&gir=yes&sparams=clen%2Cdur%2Cei%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Ckeepalive%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Crequiressl%2Csource%2Cexpire&lmt=1492808992308014&ratebypass=yes", "player_url": "/yts/jsbin/player_ias-vflUi8DdH/en_US/base.js", "ext": "webm", "format_note": "DASH audio", "acodec": "opus", "abr": 50, "filesize": 3115101, "tbr": 52.451, "quality": -1, "vcodec": "none", "downloader_options": {"http_chunk_size": 10485760}, "format": "249 - audio only (DASH audio)", "protocol": "https", "http_headers": {"User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0", "Accept-Charset": "ISO-8859-1,utf-8;q=0.7,*;q=0.7", "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "Accept-Encoding": "gzip, deflate", "Accept-Language": "en-us,en;q=0.5"}}, {"format_id": "250", "url": "https://r1---sn-cv0tb0xn-jqbk.googlevideo.com/videoplayback?initcwndbps=770000&dur=501.081&fvip=1&signature=550A06A0BDE446CE3E3E4D897ADEAFB35048161A.BEA510A95B476725844C16456609EF7422C6539F&clen=4131546&itag=250&c=WEB&key=yt6&ipbits=0&id=o-AOrIX5RYgmprbg9wJ2bTP5Cfgj33wFJiToIV_DQNiTMy&ms=au%2Crdu&mt=1553985358&mv=m&expire=1554007053&keepalive=yes&requiressl=yes&ip=89.84.148.159&mime=audio%2Fwebm&source=youtube&mm=31%2C29&mn=sn-cv0tb0xn-jqbk%2Csn-25glen7y&pl=21&ei=re-fXLbmMdDYVPuDi5AE&gir=yes&sparams=clen%2Cdur%2Cei%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Ckeepalive%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Crequiressl%2Csource%2Cexpire&lmt=1492809017879668&ratebypass=yes", "player_url": "/yts/jsbin/player_ias-vflUi8DdH/en_US/base.js", "ext": "webm", "format_note": "DASH audio", "acodec": "opus", "abr": 70, "filesize": 4131546, "tbr": 69.221, "quality": -1, "vcodec": "none", "downloader_options": {"http_chunk_size": 10485760}, "format": "250 - audio only (DASH audio)", "protocol": "https", "http_headers": {"User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0", "Accept-Charset": "ISO-8859-1,utf-8;q=0.7,*;q=0.7", "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "Accept-Encoding": "gzip, deflate", "Accept-Language": "en-us,en;q=0.5"}}, {"format_id": "171", "url": "https://r1---sn-cv0tb0xn-jqbk.googlevideo.com/videoplayback?initcwndbps=770000&dur=501.074&fvip=1&signature=1C80108AA83B1F1A10F79675647345B54B094052.25F8BDD342660542E8938E333F7556E65990C2CB&clen=7427551&itag=171&c=WEB&key=yt6&ipbits=0&id=o-AOrIX5RYgmprbg9wJ2bTP5Cfgj33wFJiToIV_DQNiTMy&ms=au%2Crdu&mt=1553985358&mv=m&expire=1554007053&keepalive=yes&requiressl=yes&ip=89.84.148.159&mime=audio%2Fwebm&source=youtube&mm=31%2C29&mn=sn-cv0tb0xn-jqbk%2Csn-25glen7y&pl=21&ei=re-fXLbmMdDYVPuDi5AE&gir=yes&sparams=clen%2Cdur%2Cei%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Ckeepalive%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Crequiressl%2Csource%2Cexpire&lmt=1492808991533083&ratebypass=yes", "player_url": "/yts/jsbin/player_ias-vflUi8DdH/en_US/base.js", "ext": "webm", "acodec": "vorbis", "format_note": "DASH audio", "abr": 128, "filesize": 7427551, "tbr": 121.581, "quality": -1, "vcodec": "none", "downloader_options": {"http_chunk_size": 10485760}, "format": "171 - audio only (DASH audio)", "protocol": "https", "http_headers": {"User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0", "Accept-Charset": "ISO-8859-1,utf-8;q=0.7,*;q=0.7", "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "Accept-Encoding": "gzip, deflate", "Accept-Language": "en-us,en;q=0.5"}}, {"format_id": "140", "url": "https://r1---sn-cv0tb0xn-jqbk.googlevideo.com/videoplayback?initcwndbps=770000&dur=501.133&fvip=1&signature=4A83B3A7AB510F0083A96B7DB317C049D8BDF729.0BD4C47D750583101F334DC4D621DB597EB1234E&clen=7960205&itag=140&c=WEB&key=yt6&ipbits=0&id=o-AOrIX5RYgmprbg9wJ2bTP5Cfgj33wFJiToIV_DQNiTMy&ms=au%2Crdu&mt=1553985358&mv=m&expire=1554007053&keepalive=yes&requiressl=yes&ip=89.84.148.159&mime=audio%2Fmp4&source=youtube&mm=31%2C29&mn=sn-cv0tb0xn-jqbk%2Csn-25glen7y&pl=21&ei=re-fXLbmMdDYVPuDi5AE&gir=yes&sparams=clen%2Cdur%2Cei%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Ckeepalive%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Crequiressl%2Csource%2Cexpire&lmt=1492963637120141&ratebypass=yes", "player_url": "/yts/jsbin/player_ias-vflUi8DdH/en_US/base.js", "ext": "m4a", "format_note": "DASH audio", "acodec": "mp4a.40.2", "abr": 128, "container": "m4a_dash", "filesize": 7960205, "tbr": 128.411, "quality": -1, "vcodec": "none", "downloader_options": {"http_chunk_size": 10485760}, "format": "140 - audio only (DASH audio)", "protocol": "https", "http_headers": {"User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0", "Accept-Charset": "ISO-8859-1,utf-8;q=0.7,*;q=0.7", "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "Accept-Encoding": "gzip, deflate", "Accept-Language": "en-us,en;q=0.5"}}, {"format_id": "251", "url": "https://r1---sn-cv0tb0xn-jqbk.googlevideo.com/videoplayback?initcwndbps=770000&dur=501.081&fvip=1&signature=A5C0F5D987F5C71D8828D6DC5F3B9E9C27B75D27.A6930293E112365BDFB034E733C3D902C4B930EF&clen=8183765&itag=251&c=WEB&key=yt6&ipbits=0&id=o-AOrIX5RYgmprbg9wJ2bTP5Cfgj33wFJiToIV_DQNiTMy&ms=au%2Crdu&mt=1553985358&mv=m&expire=1554007053&keepalive=yes&requiressl=yes&ip=89.84.148.159&mime=audio%2Fwebm&source=youtube&mm=31%2C29&mn=sn-cv0tb0xn-jqbk%2Csn-25glen7y&pl=21&ei=re-fXLbmMdDYVPuDi5AE&gir=yes&sparams=clen%2Cdur%2Cei%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Ckeepalive%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Crequiressl%2Csource%2Cexpire&lmt=1492809000733998&ratebypass=yes", "player_url": "/yts/jsbin/player_ias-vflUi8DdH/en_US/base.js", "ext": "webm", "format_note": "DASH audio", "acodec": "opus", "abr": 160, "filesize": 8183765, "tbr": 135.034, "quality": -1, "vcodec": "none", "downloader_options": {"http_chunk_size": 10485760}, "format": "251 - audio only (DASH audio)", "protocol": "https", "http_headers": {"User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0", "Accept-Charset": "ISO-8859-1,utf-8;q=0.7,*;q=0.7", "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "Accept-Encoding": "gzip, deflate", "Accept-Language": "en-us,en;q=0.5"}}, {"format_id": "160", "url": "https://r1---sn-cv0tb0xn-jqbk.googlevideo.com/videoplayback?initcwndbps=770000&dur=501.067&fvip=1&signature=0BA51B34D0A8513248EDBD3DC383F818EC1571EF.6006527DEA195AE7234404304909C3311532013F&clen=2616245&itag=160&c=WEB&key=yt6&ipbits=0&id=o-AOrIX5RYgmprbg9wJ2bTP5Cfgj33wFJiToIV_DQNiTMy&ms=au%2Crdu&mt=1553985358&mv=m&expire=1554007053&keepalive=yes&requiressl=yes&ip=89.84.148.159&mime=video%2Fmp4&source=youtube&mm=31%2C29&mn=sn-cv0tb0xn-jqbk%2Csn-25glen7y&pl=21&ei=re-fXLbmMdDYVPuDi5AE&aitags=133%2C134%2C135%2C160%2C242%2C243%2C244%2C278&gir=yes&sparams=aitags%2Cclen%2Cdur%2Cei%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Ckeepalive%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Crequiressl%2Csource%2Cexpire&lmt=1492963652340541&ratebypass=yes", "player_url": "/yts/jsbin/player_ias-vflUi8DdH/en_US/base.js", "ext": "mp4", "height": 144, "format_note": "144p", "vcodec": "avc1.4d400c", "filesize": 2616245, "tbr": 101.568, "width": 256, "fps": 30, "quality": -1, "acodec": "none", "downloader_options": {"http_chunk_size": 10485760}, "format": "160 - 256x144 (144p)", "protocol": "https", "http_headers": {"User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0", "Accept-Charset": "ISO-8859-1,utf-8;q=0.7,*;q=0.7", "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "Accept-Encoding": "gzip, deflate", "Accept-Language": "en-us,en;q=0.5"}}, {"format_id": "278", "url": "https://r1---sn-cv0tb0xn-jqbk.googlevideo.com/videoplayback?initcwndbps=770000&dur=501.034&fvip=1&signature=D5749D0C77D887820018443D89EAF5E2593ED1D1.4D05B6E8123999F342B90ADFEABDB6556CCA5C69&clen=5411749&itag=278&c=WEB&key=yt6&ipbits=0&id=o-AOrIX5RYgmprbg9wJ2bTP5Cfgj33wFJiToIV_DQNiTMy&ms=au%2Crdu&mt=1553985358&mv=m&expire=1554007053&keepalive=yes&requiressl=yes&ip=89.84.148.159&mime=video%2Fwebm&source=youtube&mm=31%2C29&mn=sn-cv0tb0xn-jqbk%2Csn-25glen7y&pl=21&ei=re-fXLbmMdDYVPuDi5AE&aitags=133%2C134%2C135%2C160%2C242%2C243%2C244%2C278&gir=yes&sparams=aitags%2Cclen%2Cdur%2Cei%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Ckeepalive%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Crequiressl%2Csource%2Cexpire&lmt=1492810318523514&ratebypass=yes", "player_url": "/yts/jsbin/player_ias-vflUi8DdH/en_US/base.js", "ext": "webm", "height": 144, "format_note": "144p", "container": "webm", "vcodec": "vp9", "filesize": 5411749, "tbr": 109.213, "width": 256, "fps": 30, "quality": -1, "acodec": "none", "downloader_options": {"http_chunk_size": 10485760}, "format": "278 - 256x144 (144p)", "protocol": "https", "http_headers": {"User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0", "Accept-Charset": "ISO-8859-1,utf-8;q=0.7,*;q=0.7", "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "Accept-Encoding": "gzip, deflate", "Accept-Language": "en-us,en;q=0.5"}}, {"format_id": "242", "url": "https://r1---sn-cv0tb0xn-jqbk.googlevideo.com/videoplayback?initcwndbps=770000&dur=501.034&fvip=1&signature=B327F71544406CF8B520ED831EB7A49DC9E23570.8DB5996309EC40EF3064BDBA14427155A88297&clen=6645891&itag=242&c=WEB&key=yt6&ipbits=0&id=o-AOrIX5RYgmprbg9wJ2bTP5Cfgj33wFJiToIV_DQNiTMy&ms=au%2Crdu&mt=1553985358&mv=m&expire=1554007053&keepalive=yes&requiressl=yes&ip=89.84.148.159&mime=video%2Fwebm&source=youtube&mm=31%2C29&mn=sn-cv0tb0xn-jqbk%2Csn-25glen7y&pl=21&ei=re-fXLbmMdDYVPuDi5AE&aitags=133%2C134%2C135%2C160%2C242%2C243%2C244%2C278&gir=yes&sparams=aitags%2Cclen%2Cdur%2Cei%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Ckeepalive%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Crequiressl%2Csource%2Cexpire&lmt=1492810319494953&ratebypass=yes", "player_url": "/yts/jsbin/player_ias-vflUi8DdH/en_US/base.js", "ext": "webm", "height": 240, "format_note": "240p", "vcodec": "vp9", "filesize": 6645891, "tbr": 252.783, "width": 426, "fps": 30, "quality": -1, "acodec": "none", "downloader_options": {"http_chunk_size": 10485760}, "format": "242 - 426x240 (240p)", "protocol": "https", "http_headers": {"User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0", "Accept-Charset": "ISO-8859-1,utf-8;q=0.7,*;q=0.7", "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "Accept-Encoding": "gzip, deflate", "Accept-Language": "en-us,en;q=0.5"}}, {"format_id": "133", "url": "https://r1---sn-cv0tb0xn-jqbk.googlevideo.com/videoplayback?initcwndbps=770000&dur=501.067&fvip=1&signature=4CD21E375101415DC6BED6A076BE46017438A38B.B445437DB6F97687132F5D7993B1957658B808DD&clen=8133142&itag=133&c=WEB&key=yt6&ipbits=0&id=o-AOrIX5RYgmprbg9wJ2bTP5Cfgj33wFJiToIV_DQNiTMy&ms=au%2Crdu&mt=1553985358&mv=m&expire=1554007053&keepalive=yes&requiressl=yes&ip=89.84.148.159&mime=video%2Fmp4&source=youtube&mm=31%2C29&mn=sn-cv0tb0xn-jqbk%2Csn-25glen7y&pl=21&ei=re-fXLbmMdDYVPuDi5AE&aitags=133%2C134%2C135%2C160%2C242%2C243%2C244%2C278&gir=yes&sparams=aitags%2Cclen%2Cdur%2Cei%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Ckeepalive%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Crequiressl%2Csource%2Cexpire&lmt=1492963652440983&ratebypass=yes", "player_url": "/yts/jsbin/player_ias-vflUi8DdH/en_US/base.js", "ext": "mp4", "height": 240, "format_note": "240p", "vcodec": "avc1.4d4015", "filesize": 8133142, "tbr": 287.241, "width": 426, "fps": 30, "quality": -1, "acodec": "none", "downloader_options": {"http_chunk_size": 10485760}, "format": "133 - 426x240 (240p)", "protocol": "https", "http_headers": {"User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0", "Accept-Charset": "ISO-8859-1,utf-8;q=0.7,*;q=0.7", "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "Accept-Encoding": "gzip, deflate", "Accept-Language": "en-us,en;q=0.5"}}, {"format_id": "243", "url": "https://r1---sn-cv0tb0xn-jqbk.googlevideo.com/videoplayback?initcwndbps=770000&dur=501.034&fvip=1&signature=30B55BE2B132CD62A5132F101231FAE31FE064DB.BC701A7D839E1BC7C94C591CFE4BE7DC859AD479&clen=13935990&itag=243&c=WEB&key=yt6&ipbits=0&id=o-AOrIX5RYgmprbg9wJ2bTP5Cfgj33wFJiToIV_DQNiTMy&ms=au%2Crdu&mt=1553985358&mv=m&expire=1554007053&keepalive=yes&requiressl=yes&ip=89.84.148.159&mime=video%2Fwebm&source=youtube&mm=31%2C29&mn=sn-cv0tb0xn-jqbk%2Csn-25glen7y&pl=21&ei=re-fXLbmMdDYVPuDi5AE&aitags=133%2C134%2C135%2C160%2C242%2C243%2C244%2C278&gir=yes&sparams=aitags%2Cclen%2Cdur%2Cei%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Ckeepalive%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Crequiressl%2Csource%2Cexpire&lmt=1492810319742575&ratebypass=yes", "player_url": "/yts/jsbin/player_ias-vflUi8DdH/en_US/base.js", "ext": "webm", "height": 360, "format_note": "360p", "vcodec": "vp9", "filesize": 13935990, "tbr": 472.422, "width": 640, "fps": 30, "quality": -1, "acodec": "none", "downloader_options": {"http_chunk_size": 10485760}, "format": "243 - 640x360 (360p)", "protocol": "https", "http_headers": {"User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0", "Accept-Charset": "ISO-8859-1,utf-8;q=0.7,*;q=0.7", "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "Accept-Encoding": "gzip, deflate", "Accept-Language": "en-us,en;q=0.5"}}, {"format_id": "134", "url": "https://r1---sn-cv0tb0xn-jqbk.googlevideo.com/videoplayback?initcwndbps=770000&dur=501.067&fvip=1&signature=418B7D809B0A21BBAA6A12CA635C216F2F13DE7E.BABD48F3215E45C1801E0BD9669FCD5705C4CBD1&clen=10346765&itag=134&c=WEB&key=yt6&ipbits=0&id=o-AOrIX5RYgmprbg9wJ2bTP5Cfgj33wFJiToIV_DQNiTMy&ms=au%2Crdu&mt=1553985358&mv=m&expire=1554007053&keepalive=yes&requiressl=yes&ip=89.84.148.159&mime=video%2Fmp4&source=youtube&mm=31%2C29&mn=sn-cv0tb0xn-jqbk%2Csn-25glen7y&pl=21&ei=re-fXLbmMdDYVPuDi5AE&aitags=133%2C134%2C135%2C160%2C242%2C243%2C244%2C278&gir=yes&sparams=aitags%2Cclen%2Cdur%2Cei%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Ckeepalive%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Crequiressl%2Csource%2Cexpire&lmt=1492963652545396&ratebypass=yes", "player_url": "/yts/jsbin/player_ias-vflUi8DdH/en_US/base.js", "ext": "mp4", "height": 360, "format_note": "360p", "vcodec": "avc1.4d401e", "filesize": 10346765, "tbr": 498.803, "width": 640, "fps": 30, "quality": -1, "acodec": "none", "downloader_options": {"http_chunk_size": 10485760}, "format": "134 - 640x360 (360p)", "protocol": "https", "http_headers": {"User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0", "Accept-Charset": "ISO-8859-1,utf-8;q=0.7,*;q=0.7", "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "Accept-Encoding": "gzip, deflate", "Accept-Language": "en-us,en;q=0.5"}}, {"format_id": "244", "url": "https://r1---sn-cv0tb0xn-jqbk.googlevideo.com/videoplayback?initcwndbps=770000&dur=501.034&fvip=1&signature=293D9013FF48F3D72BD24176F1E69F0CDBEA2FF5.2EF49991074C8A62AC94AF4A35FC293D9FBED599&clen=27444755&itag=244&c=WEB&key=yt6&ipbits=0&id=o-AOrIX5RYgmprbg9wJ2bTP5Cfgj33wFJiToIV_DQNiTMy&ms=au%2Crdu&mt=1553985358&mv=m&expire=1554007053&keepalive=yes&requiressl=yes&ip=89.84.148.159&mime=video%2Fwebm&source=youtube&mm=31%2C29&mn=sn-cv0tb0xn-jqbk%2Csn-25glen7y&pl=21&ei=re-fXLbmMdDYVPuDi5AE&aitags=133%2C134%2C135%2C160%2C242%2C243%2C244%2C278&gir=yes&sparams=aitags%2Cclen%2Cdur%2Cei%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Ckeepalive%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Crequiressl%2Csource%2Cexpire&lmt=1492810320287537&ratebypass=yes", "player_url": "/yts/jsbin/player_ias-vflUi8DdH/en_US/base.js", "ext": "webm", "height": 480, "format_note": "480p", "vcodec": "vp9", "filesize": 27444755, "tbr": 868.527, "width": 852, "fps": 30, "quality": -1, "acodec": "none", "downloader_options": {"http_chunk_size": 10485760}, "format": "244 - 852x480 (480p)", "protocol": "https", "http_headers": {"User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0", "Accept-Charset": "ISO-8859-1,utf-8;q=0.7,*;q=0.7", "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "Accept-Encoding": "gzip, deflate", "Accept-Language": "en-us,en;q=0.5"}}, {"format_id": "135", "url": "https://r1---sn-cv0tb0xn-jqbk.googlevideo.com/videoplayback?initcwndbps=770000&dur=501.067&fvip=1&signature=4E8F4701D3C1A983A8451E92E09BB031FEF81D71.D7EC36DB3F876BBE42F9F5CA01EC3D5FA75124D5&clen=21651320&itag=135&c=WEB&key=yt6&ipbits=0&id=o-AOrIX5RYgmprbg9wJ2bTP5Cfgj33wFJiToIV_DQNiTMy&ms=au%2Crdu&mt=1553985358&mv=m&expire=1554007053&keepalive=yes&requiressl=yes&ip=89.84.148.159&mime=video%2Fmp4&source=youtube&mm=31%2C29&mn=sn-cv0tb0xn-jqbk%2Csn-25glen7y&pl=21&ei=re-fXLbmMdDYVPuDi5AE&aitags=133%2C134%2C135%2C160%2C242%2C243%2C244%2C278&gir=yes&sparams=aitags%2Cclen%2Cdur%2Cei%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Ckeepalive%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Crequiressl%2Csource%2Cexpire&lmt=1492963652732736&ratebypass=yes", "player_url": "/yts/jsbin/player_ias-vflUi8DdH/en_US/base.js", "ext": "mp4", "height": 480, "format_note": "480p", "vcodec": "avc1.4d401f", "filesize": 21651320, "tbr": 1060.375, "width": 852, "fps": 30, "quality": -1, "acodec": "none", "downloader_options": {"http_chunk_size": 10485760}, "format": "135 - 852x480 (480p)", "protocol": "https", "http_headers": {"User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0", "Accept-Charset": "ISO-8859-1,utf-8;q=0.7,*;q=0.7", "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "Accept-Encoding": "gzip, deflate", "Accept-Language": "en-us,en;q=0.5"}}, {"format_id": "43", "url": "https://r1---sn-cv0tb0xn-jqbk.googlevideo.com/videoplayback?initcwndbps=770000&dur=0.000&fvip=1&signature=963D29B79BB6EE335F16D2AC53F5B90E876297B1.26F7AE44A6BC658318A31C5C700C03D50317F82F&clen=40420171&itag=43&c=WEB&key=yt6&ipbits=0&ratebypass=yes&id=o-AOrIX5RYgmprbg9wJ2bTP5Cfgj33wFJiToIV_DQNiTMy&ms=au%2Crdu&mt=1553985358&mv=m&expire=1554007053&requiressl=yes&ip=89.84.148.159&mime=video%2Fwebm&source=youtube&mm=31%2C29&mn=sn-cv0tb0xn-jqbk%2Csn-25glen7y&pl=21&ei=re-fXLbmMdDYVPuDi5AE&gir=yes&sparams=clen%2Cdur%2Cei%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Cratebypass%2Crequiressl%2Csource%2Cexpire&lmt=1492793791557928", "player_url": "/yts/jsbin/player_ias-vflUi8DdH/en_US/base.js", "ext": "webm", "width": 640, "height": 360, "acodec": "vorbis", "abr": 128, "vcodec": "vp8.0", "asr": null, "filesize": 40420171, "format_note": "medium", "fps": null, "quality": 1, "tbr": null, "format": "43 - 640x360 (medium)", "protocol": "https", "http_headers": {"User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0", "Accept-Charset": "ISO-8859-1,utf-8;q=0.7,*;q=0.7", "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "Accept-Encoding": "gzip, deflate", "Accept-Language": "en-us,en;q=0.5"}}, {"format_id": "18", "url": "https://r1---sn-cv0tb0xn-jqbk.googlevideo.com/videoplayback?initcwndbps=770000&dur=501.133&fvip=1&signature=43CA0C620C9B56ED0AFBA3762E97AF4BF33A013B.0722237D97BB2A6C44711672E197D98CFB569BEF&clen=27005518&itag=18&c=WEB&key=yt6&ipbits=0&ratebypass=yes&id=o-AOrIX5RYgmprbg9wJ2bTP5Cfgj33wFJiToIV_DQNiTMy&ms=au%2Crdu&mt=1553985358&mv=m&expire=1554007053&requiressl=yes&ip=89.84.148.159&mime=video%2Fmp4&source=youtube&mm=31%2C29&mn=sn-cv0tb0xn-jqbk%2Csn-25glen7y&pl=21&ei=re-fXLbmMdDYVPuDi5AE&gir=yes&sparams=clen%2Cdur%2Cei%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Cratebypass%2Crequiressl%2Csource%2Cexpire&lmt=1492963651320844", "player_url": "/yts/jsbin/player_ias-vflUi8DdH/en_US/base.js", "ext": "mp4", "width": 640, "height": 360, "acodec": "mp4a.40.2", "abr": 96, "vcodec": "avc1.42001E", "asr": 44100, "filesize": 27005518, "format_note": "medium", "fps": null, "quality": 1, "tbr": 431.111, "format": "18 - 640x360 (medium)", "protocol": "https", "http_headers": {"User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0", "Accept-Charset": "ISO-8859-1,utf-8;q=0.7,*;q=0.7", "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "Accept-Encoding": "gzip, deflate", "Accept-Language": "en-us,en;q=0.5"}}], "is_live": null, "start_time": null, "end_time": null, "series": null, "season_number": null, "episode_number": null, "track": null, "artist": null, "extractor": "youtube", "webpage_url_basename": "watch", "extractor_key": "Youtube", "playlist": null, "playlist_index": null, "thumbnails": [{"url": "https://i.ytimg.com/vi/tt1yUlqoB-U/hqdefault.jpg", "id": "0"}], "display_id": "tt1yUlqoB-U", "requested_subtitles": null, "requested_formats": [{"format_id": "135", "url": "https://r1---sn-cv0tb0xn-jqbk.googlevideo.com/videoplayback?initcwndbps=770000&dur=501.067&fvip=1&signature=4E8F4701D3C1A983A8451E92E09BB031FEF81D71.D7EC36DB3F876BBE42F9F5CA01EC3D5FA75124D5&clen=21651320&itag=135&c=WEB&key=yt6&ipbits=0&id=o-AOrIX5RYgmprbg9wJ2bTP5Cfgj33wFJiToIV_DQNiTMy&ms=au%2Crdu&mt=1553985358&mv=m&expire=1554007053&keepalive=yes&requiressl=yes&ip=89.84.148.159&mime=video%2Fmp4&source=youtube&mm=31%2C29&mn=sn-cv0tb0xn-jqbk%2Csn-25glen7y&pl=21&ei=re-fXLbmMdDYVPuDi5AE&aitags=133%2C134%2C135%2C160%2C242%2C243%2C244%2C278&gir=yes&sparams=aitags%2Cclen%2Cdur%2Cei%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Ckeepalive%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Crequiressl%2Csource%2Cexpire&lmt=1492963652732736&ratebypass=yes", "player_url": "/yts/jsbin/player_ias-vflUi8DdH/en_US/base.js", "ext": "mp4", "height": 480, "format_note": "480p", "vcodec": "avc1.4d401f", "filesize": 21651320, "tbr": 1060.375, "width": 852, "fps": 30, "quality": -1, "acodec": "none", "downloader_options": {"http_chunk_size": 10485760}, "format": "135 - 852x480 (480p)", "protocol": "https", "http_headers": {"User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0", "Accept-Charset": "ISO-8859-1,utf-8;q=0.7,*;q=0.7", "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "Accept-Encoding": "gzip, deflate", "Accept-Language": "en-us,en;q=0.5"}}, {"format_id": "251", "url": "https://r1---sn-cv0tb0xn-jqbk.googlevideo.com/videoplayback?initcwndbps=770000&dur=501.081&fvip=1&signature=A5C0F5D987F5C71D8828D6DC5F3B9E9C27B75D27.A6930293E112365BDFB034E733C3D902C4B930EF&clen=8183765&itag=251&c=WEB&key=yt6&ipbits=0&id=o-AOrIX5RYgmprbg9wJ2bTP5Cfgj33wFJiToIV_DQNiTMy&ms=au%2Crdu&mt=1553985358&mv=m&expire=1554007053&keepalive=yes&requiressl=yes&ip=89.84.148.159&mime=audio%2Fwebm&source=youtube&mm=31%2C29&mn=sn-cv0tb0xn-jqbk%2Csn-25glen7y&pl=21&ei=re-fXLbmMdDYVPuDi5AE&gir=yes&sparams=clen%2Cdur%2Cei%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Ckeepalive%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Crequiressl%2Csource%2Cexpire&lmt=1492809000733998&ratebypass=yes", "player_url": "/yts/jsbin/player_ias-vflUi8DdH/en_US/base.js", "ext": "webm", "format_note": "DASH audio", "acodec": "opus", "abr": 160, "filesize": 8183765, "tbr": 135.034, "quality": -1, "vcodec": "none", "downloader_options": {"http_chunk_size": 10485760}, "format": "251 - audio only (DASH audio)", "protocol": "https", "http_headers": {"User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0", "Accept-Charset": "ISO-8859-1,utf-8;q=0.7,*;q=0.7", "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "Accept-Encoding": "gzip, deflate", "Accept-Language": "en-us,en;q=0.5"}}], "format": "135 - 852x480 (480p)+251 - audio only (DASH audio)", "format_id": "135+251", "width": 852, "height": 480, "resolution": null, "fps": 30, "vcodec": "avc1.4d401f", "vbr": null, "stretched_ratio": null, "acodec": "opus", "abr": 160, "ext": "mp4"}
[custom_ytdl_hook] ' (len 25158) 
 (+) Video --vid=1 (*) (h264 852x480 29.970fps)
 (+) Audio --aid=1 --alang=eng (*) 'DASH audio' (opus 2ch 48000Hz) (external)
AO: [pulse] 48000Hz stereo 2ch float
VO: [gpu] 852x480 yuv420p
AV: 00:00:03 / 00:08:21 (0%) A-V:  0.000 Cache: 34s+1MB
[ffmpeg] https: Will reconnect at 1572864 in 0 second(s), error=End of file.
[ffmpeg] NULL: Invalid NAL unit size (7083 > 57).
[ffmpeg] NULL: missing picture in access unit with size 61

Exiting... (Quit)
qmega commented 5 years ago

Are you saying that, for the time being, mpv cannot pass an empty argument to a youtube-dl option when there is another one

Yeah. The script sees an empty argument as a specification of an option that doesn't take a value. It's actually not just "when there is another one". The case where there's only one is still technically broken: the value-taking option will just consume the -- (which is meant to ensure the video URL isn't treated as an option) instead.

Here is the output with the custom_ytdl_hook.lua :

Looks like you got the non-failing case by chance, due to the order the options ended up in. You'd need the debug output for the script to see what actually got called. There's no need to get the script's output anymore, though. We've figured out exactly what's happening here. (For future reference, though, you could get the script's debug output with --msg-level=ytdl_hook=debug.)

Until this issue is solved is there a workaround ?

Is there another youtube-dl option that prevents it from downloading any subtitle ?

As far as a workaround, you could use something like --ytdl-raw-options=sub-lang=thiswontmatchanything so that the arg isn't empty and does get passed but as long as no subtitle has the language "thiswontmatchanything" it still won't download any subs.

I wouldn't hold my breath for empty-value-passing getting fixed. I don't really love any of the approaches I've thought of for that and I think it needs more input to proceed, but that's been lacking around here of late. I might do a PR later for just adding --abort-on-error and/or checking youtube-dl's exit code; either of those would at least help the next person with --ignore-errors in their config file.

sebma commented 5 years ago

@qmega Ok, thanks man :-)

sebma commented 5 years ago

@qmega Hi,

Your workaround has worked for quite some, but then now, it does not anymore.

The only workaround I was able to find is to add abort-on-error= to my ytdl-raw-options= in my ~/.config/mpv/mpv.conf config file :

...

profile=fsd,english

[english]
alang=en,fr
#slang=eng,en,fra,fre,fr # Does not seem to work on YouTube.com
ytdl-raw-options='sub-lang="en,eng,enUS,en-US,fr",abort-on-error='
...

I've tried and move ytdl-raw-options='abort-on-error=' from the '[english]' profile to the default mpv options like this :

...

ytdl-raw-options='abort-on-error='

profile=fsd,english

[english]
alang=en,fr
#slang=eng,en,fra,fre,fr # Does not seem to work on YouTube.com
ytdl-raw-options='sub-lang="en,eng,enUS,en-US,fr"'
...

But it seems mpv only acknowledges the last ytdl-raw-options line.

I've just created the issue #6788 for that.

ghost commented 4 years ago

The ytdl script crashes, so the other entries in the playlist fail. This has nothing to do with the playlist itself. Open a new issue if there's a reproduction for the crash with master.