mpv icon indicating copy to clipboard operation
mpv copied to clipboard

ytdl_hook: consistant behavior for single format

Open christoph-heinrich opened this issue 3 years ago • 3 comments

One would expect that e.g. --script-opts=ytdl_hook-all_formats=no --ytdl-format=bestaudio and --script-opts=ytdl_hook-all_formats=yes --ytdl-format=bestaudio to play the exact same tracks without manual intervention. This already worked when two formats were requested. For a single format with all_formats=yes it would also play a track that was not requested when available. This was inconsistant with the behavior of all_formats=no (default), which would not play a second track when only a single one was requested. This combined with #10395 now plays the exact same tracks with all_formats=yes as without, even when only one format is requested.

christoph-heinrich avatar Jul 11 '22 01:07 christoph-heinrich

This is not a nice solution, but it works without a problem for me so far. Alternatively the same could be achieved by changing the EDL format to not only have a flag for default tracks, but also a flag for tracks that should not be automatically selected.

christoph-heinrich avatar Jul 11 '22 01:07 christoph-heinrich

It's better to use mp.set_property("file-local-options/ to not affect other playlist entries.

guidocella avatar Jul 11 '22 06:07 guidocella

Thanks, I've corrected that and it now also respects vid and aid when they are not set to "auto". I think with that in place, this isn't all that bad anymore.

christoph-heinrich avatar Jul 11 '22 12:07 christoph-heinrich

Honestly looking at that code now, I don't know why I was keeping track of the aid and vid.

Edit: Because of the rebase there is now tons of stuff in the diff to my last commit, but I had to rebase to be able to test it, because otherwise it wouldn't compile anymore because of changes to libplacebo. Just look at the commit itself.

Edit2: Actually I now realized I could have just deactivated gpu-next for this...

christoph-heinrich avatar Aug 13 '22 21:08 christoph-heinrich

Even better now. Thanks!

Dudemanguy avatar Aug 14 '22 23:08 Dudemanguy