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

Add an option to ignore PostProcessingError (was: --embed-thumbnail should warn, not error, on non-mp3/mp4) #9289

Open
FGasper opened this issue Apr 23, 2016 · 10 comments
Labels

Comments

@FGasper
Copy link

@FGasper FGasper commented Apr 23, 2016

  • [ x ] I've verified and I assure that I'm running youtube-dl 2016.04.19
  • [ x ] At least skimmed through README and most notably FAQ and BUGS sections
  • [ x ] Searched the bugtracker for similar issues including closed ones
  • [ x ] 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

> youtube-dl -x --embed-thumbnail http://youtube.com/watch?v=Jj1KTPOqd_A
[youtube] Jj1KTPOqd_A: Downloading webpage
[youtube] Jj1KTPOqd_A: Downloading video info webpage
[youtube] Jj1KTPOqd_A: Extracting video information
[youtube] Jj1KTPOqd_A: Downloading thumbnail ...
[youtube] Jj1KTPOqd_A: Writing thumbnail to: 01-Kenny Wayne Shepherd Band - Deja Voodoo (Video)-Jj1KTPOqd_A.jpg
[download] Destination: 01-Kenny Wayne Shepherd Band - Deja Voodoo (Video)-Jj1KTPOqd_A.webm
[download] 100% of 4.31MiB in 01:11
[ffmpeg] Destination: 01-Kenny Wayne Shepherd Band - Deja Voodoo (Video)-Jj1KTPOqd_A.ogg
Deleting original file 01-Kenny Wayne Shepherd Band - Deja Voodoo (Video)-Jj1KTPOqd_A.webm (pass -k to keep)
ERROR: Only mp3 and m4a/mp4 are supported for thumbnail embedding for now.

A failure to embed a thumbnail should probably be treated as a nonfatal error, don’t you think?

@Hrxn
Copy link

@Hrxn Hrxn commented Apr 23, 2016

Well, not necessarily..

Works as expected, I'd say.
You have to specify a specific format that supports embedding, e.g:
youtube-dl -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best'

@FGasper
Copy link
Author

@FGasper FGasper commented Apr 24, 2016

@Hrxn I would agree if I were asking for a specific format, but in my case I’m just wanting “best”, whichever that happens to be.

If I specify a format, won’t there be loss of quality from lossy compression? In the example you gave, if “best” were, say, WebM, there’d be a recompression, no?

At the end of the day, I want:

  • if the format supports thumbnails, embed
  • otherwise, don’t embed
@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Apr 24, 2016

Currently all post-processing options, such as --extract-audio, --embed-subs, halt youtube-dl in case of errors. It's a good idea to tolerate these errors, but we need a new option but not changing the semantic of existing options.

@yan12125 yan12125 added the request label Apr 24, 2016
@yan12125 yan12125 changed the title --embed-thumbnail should warn, not error, on non-mp3/mp4 Add an option to ignore PostProcessingError (was: --embed-thumbnail should warn, not error, on non-mp3/mp4) Apr 24, 2016
@FGasper
Copy link
Author

@FGasper FGasper commented Apr 24, 2016

It’s especially annoying for playlist downloads since you might get a failure at track 5 of a 25-track playlist.

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Apr 24, 2016

FYI: for playlists, --ignore-errors is handy.

@Hrxn
Copy link

@Hrxn Hrxn commented Apr 24, 2016

If I specify a format, won’t there be loss of quality from lossy compression? In the example you gave, if “best” were, say, WebM, there’d be a recompression, no?

Well, depends on the source/site, technically.

But usually not. YouTube for example has a quite large selection of available formats, .webm being one of them, and there is nothing transcoded.

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Apr 24, 2016

Never. There's no recompression unless --recode-video is used. The container may be changed in merging, but the streams are simply copied.

@Hrxn
Copy link

@Hrxn Hrxn commented Apr 24, 2016

Maybe some sites re-encode on the fly, depending on the request. Could be, you can't tell for sure on the client side.

Not that I've ever heard of such an example, but still...

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Apr 24, 2016

I assume @FGasper is talking about what happens in youtube-dl. Of course servers can do anything and we can't know.

@FGasper
Copy link
Author

@FGasper FGasper commented Apr 24, 2016

@Hrxn It’s not the transcoding that concerns me; it’s that youtube-dl would fetch a less-than-optimal format for the sake of embedding that thumbnail.

My own use case is that I always want the highest-quality audio. Then, add the thumbnail if that format allows.

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.