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

Added video download and conversion for playback in Godot #11

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

JanWerder
Copy link

I implemented a workflow for playing a video in Godot.
This currently downloads the video and converts it with ffmpeg to ogv, so Godot can play it back. This widly inefficient in both conversion speed and in filesize, but it's the only officially supported way of Godot right now. So as long as godotengine/godot-proposals#3286 doesn't finally offer a better support of more common codecs and containers, this seems to be the only way.
I've added an example and wrote a disclaimer for this solution.

src/yt_dlp.gd Outdated
@@ -173,6 +180,25 @@ class Download extends RefCounted:
var output: Array = []
OS.execute(executable, PackedStringArray(options_and_arguments), output)

if _convert_to_video && _video_format == Video.OGV:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please avoid C style syntax, prefer and.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure thing

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

Successfully merging this pull request may close these issues.

2 participants