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

embedded youtube-dl not working properly with opera/vivaldi-shipped libffmpeg.so #13260

Closed
le-mon opened this issue Jun 2, 2017 · 5 comments
Closed
Labels

Comments

@le-mon
Copy link

@le-mon le-mon commented Jun 2, 2017

As discussed in vivaldi-forum:
https://forum.vivaldi.net/topic/17134/python-nativemessaginghost-youtube-dl-something-strange
And closed issue: #13127

i use youtube-dl embedded in a python script, acting as NativeMessagingHost for extension to download videos and convert it to mp3 (check out on github).

The Issue:
On Arch Linux, there is this additional package (vivaldi-ffmpeg-codecs) to support better media playback in browser.
If this package is installed, youtube-dl gets some struggle in the FFmpegExtractAudio postprocessor.

[debug][download] Destination: /home/user/Downloads/videotitle.m4a
[download] 0.1% of 873.61KiB at 495.84KiB/s ETA 00:01
...
[download] 100% of 873.61KiB in 00:00
[debug][ffmpeg] Correcting container in "/home/user/Downloads/videotitle.m4a"
[debug][debug] ffmpeg command line: ffmpeg -y -i 'file:/home/user/Downloads/videotitle.m4a' -c copy -f mp4 'file:/home/user/Downloads/videotitle.m4a'
[error]ERROR: Did you mean file:file:/home/user/Downloads/videotitle.m4a?
[error]Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/youtube_dl/YoutubeDL.py", line 1942, in post_process
files_to_delete, info = pp.run(info)
File "/usr/lib/python3.6/site-packages/youtube_dl/postprocessor/ffmpeg.py", line 530, in run
self.run_ffmpeg(filename, temp_filename, options)
File "/usr/lib/python3.6/site-packages/youtube_dl/postprocessor/ffmpeg.py", line 208, in run_ffmpeg
self.run_ffmpeg_multiple_files([path], out_path, opts)
File "/usr/lib/python3.6/site-packages/youtube_dl/postprocessor/ffmpeg.py", line 204, in run_ffmpeg_multiple_files
raise FFmpegPostProcessorError(msg)
youtube_dl.postprocessor.ffmpeg.FFmpegPostProcessorError: Did you mean file:file:/home/user/Downloads/videotitle.m4a?

Two times "file:"?
if i execute the ffmpeg line in terminal, everything works.
if it's been executed as NativeMessagingHost without vivaldi-ffmpeg-codecs packageinstalled, everything works.

Seems that /opt/vivaldi/lib/libffmpeg.so is the reason.
As long as i know, this is custom ffmepg built-in for chromium-related browsers, as opera, where same behaviour can be seen.

is there some workarround for saying youtube-dl to IGNORE this libffmpeg.so?
Is this a bug?

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Jun 2, 2017

--ffmpeg-location.

@dstftw dstftw closed this Jun 2, 2017
@dstftw dstftw added the external-bugs label Jun 2, 2017
@le-mon
Copy link
Author

@le-mon le-mon commented Jun 2, 2017

ffmpeg_location doesn't change anything.
Vivaldi devs say it's youtube-dl related.
You say external bug.

DEBUG:root:[download] /home/user/Downloads/Mukke/TEST VIDEO.m4a has already been downloaded
[download] 100% of 276.96KiB
DEBUG:root:[ffmpeg] Correcting container in "/home/user/Downloads/Mukke/TEST VIDEO.m4a"

DEBUG:root:[debug] ffmpeg command line: /usr/bin/ffmpeg -y -i 'file:/home/user/Downloads/Mukke/TEST VIDEO.m4a' -c copy -f mp4 'file:/home/user/Downloads/Mukke/TEST VIDEO.temp.m4a'

ERROR:root:ERROR: Did you mean file:file:/home/user/Downloads/Mukke/TEST VIDEO.m4a?

ERROR:root:Traceback (most recent call last):

  File "/usr/lib/python3.6/site-packages/youtube_dl/YoutubeDL.py", line 1942, in post_process
    files_to_delete, info = pp.run(info)

  File "/usr/lib/python3.6/site-packages/youtube_dl/postprocessor/ffmpeg.py", line 530, in run
    self.run_ffmpeg(filename, temp_filename, options)

  File "/usr/lib/python3.6/site-packages/youtube_dl/postprocessor/ffmpeg.py", line 208, in run_ffmpeg
    self.run_ffmpeg_multiple_files([path], out_path, opts)

  File "/usr/lib/python3.6/site-packages/youtube_dl/postprocessor/ffmpeg.py", line 204, in run_ffmpeg_multiple_files

    raise FFmpegPostProcessorError(msg)

youtube_dl.postprocessor.ffmpeg.FFmpegPostProcessorError: Did you mean file:file:/home/user/Downloads/Mukke/TEST VIDEO.m4a?
@dstftw
Copy link
Collaborator

@dstftw dstftw commented Jun 2, 2017

It's not a youtube-dl bug.

ffmpeg command line: /usr/bin/ffmpeg -y -i 'file:/home/user/Downloads/Mukke/TEST VIDEO.m4a' -c copy -f mp4 'file:/home/user/Downloads/Mukke/TEST VIDEO.temp.m4a'

This is perfectly legal ffmpeg command that works everywhere apart from your ffmpeg setup.

Did you mean file:file:/home/user/Downloads/Mukke/TEST VIDEO.m4a?

This is the output from your ffmpeg.
Fix your ffmpeg.

@le-mon
Copy link
Author

@le-mon le-mon commented Jun 2, 2017

if i execute the given command line in terminal, it works. My /usr/bin/ffmpeg works as expected.
I didn't manipulate anything, it's the official package.

If the python-script is executed in terminal, it works as well.
If it's executed by browser with *-ffmpeg-codecs package INSTALLED, it fails with error mentioned above. Even if there IS ffmpeg_location in ydl_opts{}

Why can a external ffmpeg (/opt/vivaldi/lib/libffmpeg.so, /usr/lib/opera/libffmpeg.so, ...) manipulate youtube-dl if there is ffmpeg_location in ydl_opts{}?

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Jun 2, 2017

works well everywhere
fails when executed by browser with *-ffmpeg-codecs package INSTALLED

What else to say. Go and blame it.

Why can a external ffmpeg (/opt/vivaldi/lib/libffmpeg.so, /usr/lib/opera/libffmpeg.so, ...) manipulate youtube-dl if there is ffmpeg_location in ydl_opts{}?

I've no idea what are you trying to do and what's your code. Needless to say so far you did not even bother to provide complete log with all debug output, ffmpeg version as exposed by your env and seen by youtube-dl, etc. I neither feel like I should fortune tell it nor debug some 3rdparty software.

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