kniEngine / kni

KNI is a cross-platform C# game framework.
Other
98 stars 5 forks source link

Transcode Video files #1480

Open nkast opened 1 month ago

nkast commented 1 month ago

The current VideoProcessor copies the video assets as-is. This is because XNA only supported .WMV, and video was implemented only on WindowsDX and UAP so far.

We need the VideoProcessor to transcode videos to other formats, based on the target platform, and also keep bitrate, frames, etc within a suitable range. SongProcessor is already transcoding songs into WMA, MP3, OGG/vorbis, AAC. *[1]

We need to decide what formats to choose and for which platforms. e.g. .3gp is a safe bet for Android, but we might ignore older devices and choose a format common to most platforms with better compression rates, like mp4 or WebM.

*[1] https://github.com/kniEngine/kni/blob/e2c630cfd0f7499f79fc67be2a4e52a668714767/src/Xna.Framework.Content.Pipeline.Audio/Audio/DefaultAudioProfile.cs#L45C40-L55