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

Option --embed-thumbnail does not work with avconv #26702

Open
florianpasteur opened this issue Sep 25, 2020 · 0 comments
Open

Option --embed-thumbnail does not work with avconv #26702

florianpasteur opened this issue Sep 25, 2020 · 0 comments

Comments

@florianpasteur
Copy link

@florianpasteur florianpasteur commented Sep 25, 2020

Checklist

  • I'm reporting a broken site support issue
  • I've verified that I'm running youtube-dl version 2020.09.20
  • I've checked that all provided URLs are alive and playable in a browser
  • I've checked that all URLs and arguments with special characters are properly quoted or escaped
  • I've searched the bugtracker for similar bug reports including closed ones
  • I've read bugs section in FAQ

Verbose log

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', '--embed-thumbnail', '--extract-audio', '--audio-format', 'mp3', 'https://music.youtube.com/watch?v=P2IxGppZhxo']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2020.09.20
[debug] Python version 3.7.2 (CPython) - Darwin-19.6.0-x86_64-i386-64bit
[debug] exe versions: avconv 12.3, avprobe 12.3, ffprobe 4.3.1, rtmpdump 2.4
[debug] Proxy map: {}
[youtube] P2IxGppZhxo: Downloading webpage
[youtube] {18} signature length 107, html5 player 12237e3d
[youtube] {137} signature length 107, html5 player 12237e3d
[youtube] {248} signature length 107, html5 player 12237e3d
[youtube] {136} signature length 107, html5 player 12237e3d
[youtube] {247} signature length 107, html5 player 12237e3d
[youtube] {135} signature length 107, html5 player 12237e3d
[youtube] {244} signature length 107, html5 player 12237e3d
[youtube] {134} signature length 107, html5 player 12237e3d
[youtube] {243} signature length 107, html5 player 12237e3d
[youtube] {133} signature length 107, html5 player 12237e3d
[youtube] {242} signature length 107, html5 player 12237e3d
[youtube] {160} signature length 103, html5 player 12237e3d
[youtube] {278} signature length 107, html5 player 12237e3d
[youtube] {394} signature length 107, html5 player 12237e3d
[youtube] {140} signature length 107, html5 player 12237e3d
[youtube] {249} signature length 107, html5 player 12237e3d
[youtube] {250} signature length 103, html5 player 12237e3d
[youtube] {251} signature length 107, html5 player 12237e3d
[youtube] P2IxGppZhxo: Downloading thumbnail ...
[youtube] P2IxGppZhxo: Writing thumbnail to: Ne me ramène pas-P2IxGppZhxo.webp
[debug] Invoking downloader on 'https://r3---sn-5hnekn7l.googlevideo.com/videoplayback?expire=1601035490&ei=gYhtX4z2OZeigQfY2L3IDA&ip=213.127.113.242&id=o-AAeB6kvxP_ARQzsG9C3_zNF0JmKmUqVSg94jBwRzVp0P&itag=251&source=youtube&requiressl=yes&mh=-A&mm=31%2C29&mn=sn-5hnekn7l%2Csn-5hne6nsd&ms=au%2Crdu&mv=m&mvi=3&pl=17&gcr=nl&initcwndbps=2360000&vprv=1&mime=audio%2Fwebm&gir=yes&clen=2502930&dur=136.521&lmt=1577217924607483&mt=1601013760&fvip=3&keepalive=yes&fexp=23915654&c=WEB&txp=5531432&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cgcr%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRgIhAJrJq6BUQDNQR6nY3A6-sAP_6Df58VJTUeFKjsHJ_mGXAiEA1YI5BHW130c9QAyFPXwB61-1_xTHcbPGe1nPLrk_rlw%3D&sig=AOq0QJ8wRQIhAJle5b8VVH5Pg28CVwAL-rsJPVS2HEaudmZpqybKYP6WAiBrxr_7zReCOhlkPWgHrKxcWmYdqeotetIRTEn7u3PveQ==&ratebypass=yes'
[download] Destination: Ne me ramène pas-P2IxGppZhxo.webm
[download] 100% of 2.39MiB in 00:00
[debug] avconv command line: ffprobe -show_streams 'file:Ne me ramène pas-P2IxGppZhxo.webm'
[ffmpeg] Destination: Ne me ramène pas-P2IxGppZhxo.mp3
[debug] ffmpeg command line: avconv -y -i 'file:Ne me ramène pas-P2IxGppZhxo.webm' -vn -acodec libmp3lame -q:a 5 'file:Ne me ramène pas-P2IxGppZhxo.mp3'
Deleting original file Ne me ramène pas-P2IxGppZhxo.webm (pass -k to keep)
[ffmpeg] Converting thumbnail "Ne me ramène pas-P2IxGppZhxo.webp" to JPEG
[debug] ffmpeg command line: avconv -y -i 'file:Ne me ramène pas-P2IxGppZhxo.webp' -bsf:v mjpeg2jpeg 'file:Ne me ramène pas-P2IxGppZhxo.jpg'
ERROR: Error applying bitstream filters to an output packet for stream #0:0.
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 2065, in post_process
    files_to_delete, info = pp.run(info)
  File "/usr/local/bin/youtube-dl/youtube_dl/postprocessor/embedthumbnail.py", line 70, in run
    self.run_ffmpeg(escaped_thumbnail_filename, escaped_thumbnail_jpg_filename, ['-bsf:v', 'mjpeg2jpeg'])
  File "/usr/local/bin/youtube-dl/youtube_dl/postprocessor/ffmpeg.py", line 239, in run_ffmpeg
    self.run_ffmpeg_multiple_files([path], out_path, opts)
  File "/usr/local/bin/youtube-dl/youtube_dl/postprocessor/ffmpeg.py", line 235, in run_ffmpeg_multiple_files
    raise FFmpegPostProcessorError(msg)
youtube_dl.postprocessor.ffmpeg.FFmpegPostProcessorError: Error applying bitstream filters to an output packet for stream #0:0.

Description

Hello,

When I use the option --embed-thumbnail the download fails because of converting the thumbnail to jpg image. Actually the error comes from the command: avconv -y -i 'file:Ne me ramène pas-P2IxGppZhxo.webp' -bsf:v mjpeg2jpeg 'file:Ne me ramène pas-P2IxGppZhxo.jpg', apparently avconv is not able to convert webp images to jpg. I couldn't find a way to to do it in the manual of avconv

Here the dependencies version:

$ avconv -L
avconv version 12.3, Copyright (c) 2000-2018 the Libav developers
  built on Jul  3 2020 19:38:15 with Apple clang version 11.0.3 (clang-1103.0.32.62)
This version of avconv has nonfree parts compiled in.
Therefore it is not legally redistributable.

No ffmpeg installed.

Workaroung

As workaround, I installed ffmpeg and the command succeed.

Possible solutions

Instead of using avconv to convert the image maybe an explicit error can be thrown to invite installing ffmpeg or maybe youtube-dl can try to download a lower resolution jpg image.

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
1 participant
You can’t perform that action at this time.