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

My bad, no issue #9967

Closed
LTGM opened this issue May 19, 2024 · 5 comments
Closed

My bad, no issue #9967

LTGM opened this issue May 19, 2024 · 5 comments
Labels
question Question

Comments

@LTGM
Copy link

LTGM commented May 19, 2024

There was no issue here, my fault

@LTGM LTGM added the question Question label May 19, 2024
@bashonly
Copy link
Member

bashonly commented May 19, 2024

How to select the best quality audio-only with preference to opus (I guess 251 stream is the best one quality-wise?) and if there is no such option, to fallback to the other 'best option available'

-x -S acodec:opus

-x implies a format selection of bestaudio/best, and it will extract the audio track from the downloaded file if it isn't already audio-only. The -S argument will sort the formats such that opus codec audio formats are considered "best".

and to remux (not convert) to opus. Is it even possible without converting?

No. The only codec that the opus container supports is opus, so you'd have to re-encode if there are no opus codec formats available:

-x --audio-format opus -S acodec:opus

I want to keep a few tracks from this channel but also preserve it completely because a few tracks already missing: yt com @Vandoorea - it says that there is 343 videos and yt-dlp attempts to download them, but downloads only 340 or something like that. I wonder why that happens even if I leave 'ba' only (without specifying opus) and how to fix that. I double-checked that and there are at least 343 links on the channel. It could be that a few videos do not contain any audio I guess, but in the case when I was selecting opus only, yt-dlp still created 0 kb files so I'm confused.

Would need to see a log

Maybe there is a way to display all failed attempts as a summary at the end of the download? Like, a log or something. I cannot even find the specific video with the problem to attempt to manually fix the issue...

There is a feature request for this: #7832
Also related: #2668

For now you'd have to manually capture all of yt-dlp's output to a log file, and search through it for ERRORs.

In powershell, I think you can do this:

yt-dlp -v "URL" 2>&1 | Tee-Object -file log.txt

Or else in cmd, you'd need to do this (but you wouldn't see the output in your terminal, it would be redirected only to the log file):

yt-dlp -v "URL" > log.txt 2>&1

@LTGM
Copy link
Author

LTGM commented May 20, 2024

Thanks, I'll stick to mkv and Opus then.
I guess "-x -S acodec:opus --remux-video mkv" is an optimal modern way of achieving this result

I had no signs of errors in log file via CMD, but a few files were still missing. I assume they were in mp4 format and I made a mistake somewhere trying to adapt my old script. Should be fine now, thanks

Besides that, I usually get the following (or rather similar) messages but everything downloads nonetheless: "WARNING: [youtube] Skipping player responses from android clients (got player responses for video "aQvGIIdgFDM" instead of "Tt-vtc4NHrQ")"

P.S. Yes please, add an option to view how many videos were successfully downloaded and how many have failed + links to them and the reason why, if possible. That would be a nice QoL improvement for large playlists or channels.

@bashonly
Copy link
Member

I made a mistake somewhere trying to adapt my old script

It's most likely an isssue with your script. Can't say any more without seeing a full verbose log

@bashonly
Copy link
Member

bashonly commented May 20, 2024

You aren't including the id (or some other unique identifier) in your output template, so there are 3 videos with filename collisions and therefore they are not being downloaded.

(At least that's what's happening in the actual log you sent where nothing is being downloaded. In the initial run when you actually downloaded all of this, the videos in question may have been downloaded and then later overwritten during the postprocessing stage of the identically named subsequent downloads).

These are the problematic filenames:

Deleting original file Portal 2 - Reconstructing More Science [Remix].mkv (pass -k to keep)
Deleting original file Portal 2 - Reconstructing More Science [Remix].opus (pass -k to keep)

Deleting original file Portal 2 - Wheatley Science [Remix].mkv (pass -k to keep)
Deleting original file Portal 2 - Wheatley Science [Remix].opus (pass -k to keep)

Deleting original file Portal - Still Alive [Remix].mkv (pass -k to keep)
Deleting original file Portal - Still Alive [Remix].opus (pass -k to keep)

@bashonly
Copy link
Member

#5485

@LTGM LTGM changed the title Best quality audio (ba) question + missing files My bad, no issue May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Question
Projects
None yet
Development

No branches or pull requests

2 participants