-
Notifications
You must be signed in to change notification settings - Fork 2
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
Issue with the ffmpeg patch #1
Comments
Well, first we are using this repository to build yt-dlp for youtubedl-android which requires us to make a patch for it to work properly. Before we switch to yt-dlp we were using youtubedl-lazy to build youtube-dl I think we don't need to use If this can be done it would be better if yt-dlp handles these files rather than making patches to these files whenever they are modified.
|
Alright, Let me see exactly how this can be implemented, and I'll get back to you. For testing purposes, is there anywhere I can get the |
If I understood correctly, We don't need to create I have applied the patch diff --git a/yt_dlp/postprocessor/ffmpeg.py b/yt_dlp/postprocessor/ffmpeg.py
index 45f7ab32e..8d1fc497c 100644
--- a/yt_dlp/postprocessor/ffmpeg.py
+++ b/yt_dlp/postprocessor/ffmpeg.py
@@ -106,7 +106,7 @@ def _determine_executables(self):
location = self.get_param('ffmpeg_location', self._ffmpeg_location.get())
if location is None:
- return {p: p for p in programs}
+ return {'ffmpeg': 'libffmpeg.bin.so', 'ffprobe': 'libffprobe.bin.so'}
if not os.path.exists(location):
self.report_warning(f'ffmpeg-location {location} does not exist! Continuing without ffmpeg') here we check if the patch work fine.
Run this command in
Now we have Let's try again
Success |
Is there any reason the filename is |
You're right, the name should start with Anyway, I'm pretty sure if it's named like that then no problem I tested it and it works diff --git a/yt_dlp/postprocessor/embedthumbnail.py b/yt_dlp/postprocessor/embedthumbnail.py
index 606d90d3d..4fb272d85 100644
--- a/yt_dlp/postprocessor/embedthumbnail.py
+++ b/yt_dlp/postprocessor/embedthumbnail.py
@@ -139,7 +139,7 @@ def run(self, info):
if not success:
success = True
atomicparsley = next((
- x for x in ['AtomicParsley', 'atomicparsley']
+ x for x in ['libatomicparsley.so', 'AtomicParsley', 'atomicparsley']
if check_executable(x, ['-v'])), None)
if atomicparsley is None:
self.to_screen('Neither mutagen nor AtomicParsley was found. Falling back to ffmpeg') also for ffmpeg diff --git a/yt_dlp/postprocessor/ffmpeg.py b/yt_dlp/postprocessor/ffmpeg.py
index 1f179c145..a098ff281 100644
--- a/yt_dlp/postprocessor/ffmpeg.py
+++ b/yt_dlp/postprocessor/ffmpeg.py
@@ -106,7 +106,7 @@ def _determine_executables(self):
location = self.get_param('ffmpeg_location', self._ffmpeg_location.get())
if location is None:
- return {p: p for p in programs}
+ return {'ffmpeg': 'libffmpeg.so', 'ffprobe': 'libffprobe.so'}
if not os.path.exists(location):
self.report_warning(f'ffmpeg-location {location} does not exist! Continuing without ffmpeg') If this is supported and added to yt-dlp I can make the change to youtubedl-android |
This is what I have in mind for the yt-dlp patch: yt-dlp/yt-dlp@master...pukkandan:yt-dlp-dev:features/detect-so The situation with atomicparsley is trivial. I basically just copied over your patch. For ffmpeg, youtube-dl-android will need to pass From my understanding, passing ffmpeg-location is a single line change here. If there is any difficulty with it, let me know |
It looks good, I have created yt_dlp.zip from your branch features/detect-so
I have set the ffmpe location yausername/youtubedl-android@master...xibr:youtubedl-android:set-ffmpeg-location
You mean this patch [ffmpeg] Smarter detection of ffprobe filename? I will test it and get back to you. Finally we will need a file yt_dlp.zip like in this page https://github.com/xibr/ytdlp-lazy/releases/tag/2022.08.08 Which will be used directly from yt-dlp release page instead of using our repo, What do you think? diff --git a/library/src/main/java/com/yausername/youtubedl_android/YoutubeDLUpdater.java b/library/src/main/java/com/yausername/youtubedl_android/YoutubeDLUpdater.java
index 74b79a1..5945c5d 100644
--- a/library/src/main/java/com/yausername/youtubedl_android/YoutubeDLUpdater.java
+++ b/library/src/main/java/com/yausername/youtubedl_android/YoutubeDLUpdater.java
@@ -22,7 +22,7 @@ class YoutubeDLUpdater {
private YoutubeDLUpdater() {
}
- private static final String releasesUrl = "https://api.github.com/repos/xibr/ytdlp-lazy/releases/latest";
+ private static final String releasesUrl = "https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest";
private static final String youtubeDLVersionKey = "youtubeDLVersion";
static UpdateStatus update(Context appContext) throws IOException, YoutubeDLException { |
Either name will work for ffmpeg/ffprobe. The
Yes. I can merge it as soon as you give ok
Can you not unzip the |
That's good. I tried it with the
And this was downloaded from the yt-dlp releases page
Our code can not unzip the yt-dlp binary, here the code ZipUtils.java, But I have an idea and we run
The above output was running by this method. |
merged yt-dlp/yt-dlp@8420a4d |
Thank you for your interest in this and thank you for your hard work on yt-dlp. |
The current ffmpeg patch changes
self.basename
. But there are parts of the code that checks.basename == 'ffmpeg'
to differentiate ffmpeg from avconv. A more appropriate patch would be:Or, if you wish to support
--ffmpeg-location
for theso
files, this should work insteadOn a related note, do you think it makes sense for yt-dlp itself to handle the
so
files? The atomicparsley patch is simple enough to be directly added to yt-dlp without any issues. Some extra work will have to be done in case of ffmpeg, but I believe it is also not too hardThe text was updated successfully, but these errors were encountered: