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

FFmpeg based playback #1913

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

FFmpeg based playback #1913

wants to merge 11 commits into from

Conversation

a1batross
Copy link
Member

@a1batross a1batross commented Dec 8, 2024

  • RenderAPI extension
  • API demo
  • Improving performance, if needed? Perfectly plays 2K video in software, on my side.
  • Setting up builds (Windows build is complicated but nothing impossible)
  • Splitting AVI player into a standalone library, making FFmpeg depdendency optional, for those who might not want to ship it.
  • Moving audio playback to AVI_Think. We probably can manually call S_RawSamples before rejecting it by timestamp.
  • Seeking
  • Add Sam Lantinga (SDL3/test/testffmpeg.c) and FTEQW (plugins/avplug/avdecode.c) developers to copyright notice for a good explanation for what exactly I must do.
  • Fix audio synchronization
  • Fix buffer leaking
  • Restore cls.state != ca_active in SCR_DrawFPS.

@SNMetamorph
Copy link
Member

Script for configuring/building:

set PKG_CONFIG_PATH=D:\ffmpeg-N-118030-g550c662a1f-win64-gpl-shared\lib\pkgconfig
set PATH=D:\pkgconf\;%PATH%

cd xash3d-fwgs
./waf configure --sdl2=../_deps/SDL2 --enable-ffmpeg -8 install --destdir=D:\xashstuff\xash3d-fwgs-x64

Required files:

@a1batross a1batross force-pushed the avi branch 7 times, most recently from dd6c96e to a471c30 Compare December 12, 2024 23:57
…ffmpeg-based player.

This intentionally will not build without --enable-ffmpeg for now.

We add new functions to the RenderAPI called AVI_Think and AVI_SetParm. Game
developer is supposed to call AVI_Think each frame and set video playback
parameters through AVI_SetParm function.

What's tested:
* Intro cinematics.
* Looping videos.
* Playing back an hour long video.
* API extension (PrimeXT's avi branch at https://github.com/a1batross/PrimeXT).

What's broken:
* There is no way to seek a video file, only rewind to the start.
…ons in their projects helped me to understand the ffmpeg API
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