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

[Feature] Add gif output #704

Open
Sleeping-Donut opened this issue Feb 7, 2025 · 4 comments
Open

[Feature] Add gif output #704

Sleeping-Donut opened this issue Feb 7, 2025 · 4 comments
Labels
enhancement New feature or request

Comments

@Sleeping-Donut
Copy link

Describe the feature

Adding gif output type would be useful and is supported by yt-dlp using exec to pipe the output from yt-dlp to ffmpeg where it can be converted to a high quality gif.

Reason for adding

Currently another program would be required to convert the video from YTDLnis to a gif when this could be a seamless experience if included as an option within the download menu

Example(s)

No response

Additional context

No response

@Sleeping-Donut Sleeping-Donut added the enhancement New feature or request label Feb 7, 2025
@deniscerri
Copy link
Owner

The app doesn't support --exec. Since it doesnt have an actual terminal behind it but a layer that keeps yt-dlp running through termux packages. You could ask youtubedl-android developers for insight

@deniscerri
Copy link
Owner

@Sleeping-Donut is there an yt-dlp command example that can convert to gif?

@Sleeping-Donut
Copy link
Author

Sleeping-Donut commented Feb 17, 2025

Using exec:

yt-dlp --exec 'ffmpeg -y -i {} -vf "fps=12,scale=320:-1:flags=lanczos,split[s0][s1]; [s0] palettegen [pal]; [s1] [pal] paletteuse" "$(basename {} .mp4).gif"' <video_URL>

But no idea how that'd be managed without the --exec

@deniscerri
Copy link
Owner

Due to how yt-dlp is embedded in the application, --exec is not possible as there isnt an actual shell inside the app. But yt-dlp supports --ppa arguments
like how the app currently uses it to crop the thumbnail to square.
If you manage to achieve it with ppa let me know

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants