yt-dlp-kivy icon indicating copy to clipboard operation
yt-dlp-kivy copied to clipboard

Cannot find ffmpeg or avconv

Open PacoBell opened this issue 3 years ago • 4 comments

The app can't seem to find an installation of ffmpeg or avconv and fails. It also can't seem to write to my phone's /sdcard directory, which definitely exists.

IMG_20200718_145622

PacoBell avatar Jul 18 '20 22:07 PacoBell

YouTube-DL try to find a ffmpeg binary as it detects several formats for the video and will need to merge them at post processing. I dont know how android handle it's path to call a binary like a linux or windows system, or if it is even possible (maybe with termux ? )

The video can still be download by enable the ignore error in the settings menu.

There are a lot of YouTube-DL options for preferred format that the app do not yet handle, having a setting to download a single format without post processing will probably be the best option.

The sdcard error is just a side effect of the previous error as nothing was downloaded.

odrevet avatar Jul 19 '20 06:07 odrevet

I installed ffmpeg via termux but the error remains, the app cannot found ffmpeg. I do not close the issu in case someone has a solution.

As an alternative solution, the format can now be selected before the download. If the selected format do not require post processing, like DASH encoded video then we can still download videos.

odrevet avatar Jul 21 '20 19:07 odrevet

The latest version of termux allow to run command from another apps with proper authorizations : https://github.com/termux/termux-app/issues/804#issuecomment-653622200

odrevet avatar Jul 28 '20 18:07 odrevet

need to patch youtube-dl systemcal to ffmpeg with

from jnius import cast from jnius import autoclass

PythonActivity = autoclass('org.kivy.android.PythonActivity') Intent = autoclass('android.content.Intent') intent = Intent() intent.setClassName("com.termux", "com.termux.app.RunCommandService"); intent.setAction("com.termux.RUN_COMMAND") intent.putExtra("com.termux.RUN_COMMAND_PATH", "/data/data/com.termux/files/usr/bin/ffmpeg") currentActivity = cast('android.app.Activity', PythonActivity.mActivity) currentActivity.startService(intent)

odrevet avatar Jul 29 '20 18:07 odrevet