Reimplement PlayMovie using FFMPEG/libavcodec

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is ON
[img] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Reimplement PlayMovie using FFMPEG/libavcodec

Re: Reimplement PlayMovie using FFMPEG/libavcodec

by HAL9000 » Wed Apr 04, 2018 1:16 pm

RoQ would be a nice feature to have, I had to create animated MD3 model with texture frames on it for my project's intro animation(map), and sync audio to it. It was a nightmare to sync it to the framerate.

Re: Reimplement PlayMovie using FFMPEG/libavcodec

by Graf Zahl » Wed Apr 04, 2018 1:08 pm

Rachael wrote:
wildweasel wrote:Someone was saying, some time ago, that RoQ might work for ZDoom's purposes...though I have no idea how feasible an implementation would even be, I've never worked with the encoder before, and adopting a semi-proprietary format from a completely different engine might throw even more burden on ZDoom (look at the headaches we're already having with MD3s).
This might be the only solution to this. How big is the rendering engine? If it's fairly small I wouldn't mind something like this.
Agreed. Libavcodec is definitely not an option.

Re: Reimplement PlayMovie using FFMPEG/libavcodec

by Chris » Wed Apr 04, 2018 12:50 pm

RockstarRaccoon wrote:Like I said, it doesn't have to come standard, just allow users to optionally have a library on hand...
It still needs to be there to build support for when compiling. The way libavformat/libavcodec work, they can't be optionally loaded at run-time, and having some peoples' builds support video playback and others not because it was a hassle to set up properly could be a problem.

Re: Reimplement PlayMovie using FFMPEG/libavcodec

by Rachael » Wed Apr 04, 2018 9:32 am

wildweasel wrote:Someone was saying, some time ago, that RoQ might work for ZDoom's purposes...though I have no idea how feasible an implementation would even be, I've never worked with the encoder before, and adopting a semi-proprietary format from a completely different engine might throw even more burden on ZDoom (look at the headaches we're already having with MD3s).
This might be the only solution to this. How big is the rendering engine? If it's fairly small I wouldn't mind something like this.

Re: Reimplement PlayMovie using FFMPEG/libavcodec

by wildweasel » Wed Apr 04, 2018 9:01 am

RockstarRaccoon wrote:
wildweasel wrote:adopting a semi-proprietary format from a completely different engine might throw even more burden on ZDoom (look at the headaches we're already having with MD3s).
Could you elaborate on this? I wasn't aware there were issues...
The main problem - aside from the known limitations of MD3 as a format - is that a reliable export pipeline to such a format is getting harder and harder to setup lately, considering that a lot of the programs that used to be in common use back when Quake 3 was a new thing are no longer so easy to obtain/install/run on modern machines.

The same goes for the RoQ format - as nice as it'd be to have one single format for movies, there is only one encoder for it, and it probably already has a very limited set of video formats that it can detect and convert from. In the future, when the commonly-used video editors drop support for those formats in favor of whatever compression algorithm works better 10, 5, or even 2 years from now, what will the budding ZDoom movie-maker do? Hang on to the programs that still work until those stop being usable on the computers of the day? The rendering pipeline would only get worse over time.

Re: Reimplement PlayMovie using FFMPEG/libavcodec

by RockstarRaccoon » Wed Apr 04, 2018 8:51 am

Chris wrote:In theory you could build a version of avformat/avcodec that only supported open royalty-free codecs (theora, webm). But that could be a pain to get set up for people building GZDoom, and the library sizes may still be rather large.
Like I said, it doesn't have to come standard, just allow users to optionally have a library on hand...
wildweasel wrote:adopting a semi-proprietary format from a completely different engine might throw even more burden on ZDoom (look at the headaches we're already having with MD3s).
Could you elaborate on this? I wasn't aware there were issues...

Re: Reimplement PlayMovie using FFMPEG/libavcodec

by Chris » Mon Apr 02, 2018 4:10 pm

In theory you could build a version of avformat/avcodec that only supported open royalty-free codecs (theora, webm). But that could be a pain to get set up for people building GZDoom, and the library sizes may still be rather large. And there's the issue that FFmpeg has a habit of changing its API whenever something looks at it funny. It's unfortunate that it's the only real means for proper video decoding that doesn't involve directly embedding reference decoder libraries and dealing with their individual quirks (something FFmpeg does do relatively well is compartmentalize individual aspects of codecs, so individual decoders can share common code, and transparently fixing up out-of-order frame decoding, where frames are presented in a different order than they're decoded).

Re: Reimplement PlayMovie using FFMPEG/libavcodec

by wildweasel » Mon Apr 02, 2018 12:18 pm

Someone was saying, some time ago, that RoQ might work for ZDoom's purposes...though I have no idea how feasible an implementation would even be, I've never worked with the encoder before, and adopting a semi-proprietary format from a completely different engine might throw even more burden on ZDoom (look at the headaches we're already having with MD3s).

Re: Reimplement PlayMovie using FFMPEG/libavcodec

by Rachael » Mon Apr 02, 2018 12:17 pm

The only way I can see this working is if GZDoom externalizes the work to either some sort of HTML or media toolkit that would not be included in GZDoom, itself. Otherwise, it really is not worth pulling in AV libraries to pull this off. I'm really not interested in tripling the size of GZDoom's distribution for a feature that will see niche use at best.

And then you have to be careful with including videos in your mod - because obviously not all formats will always be supported.

Re: Reimplement PlayMovie using FFMPEG/libavcodec

by Graf Zahl » Mon Apr 02, 2018 12:02 pm

The old implementation was never used. It was Windows only, had its share of massive problems and finally went poof when the Direct3D backend turned out to be incompatible with that crusty old code.

Regarding file size, this possibly is more suitable for full games, not for Doom mods.

Re: Reimplement PlayMovie using FFMPEG/libavcodec

by Kinsie » Mon Apr 02, 2018 11:29 am

Did any mods even attempt to use the old implementation back in the day? I know Skulltag threatened to at some point, but that's all I've heard.

Granted, this is before everyone and their dog considered themselves Video Production Experts...

EDIT: In addition, the file size considerations would probably make video file usage about as popular around here as careless use of MP3/OGG music.

Re: Reimplement PlayMovie using FFMPEG/libavcodec

by RockstarRaccoon » Mon Apr 02, 2018 11:23 am

Maybe add optional support for a livavcodec.dll or whatever, like with the openAL / Fmod stuff?

Re: Reimplement PlayMovie using FFMPEG/libavcodec

by Graf Zahl » Mon Apr 02, 2018 11:21 am

Not only that, these libraries are also normally huge because the codecs are so complex. In VLC the libavcodec plugin is a hefty 14 MB alone, and it's only one of many.

Re: Reimplement PlayMovie using FFMPEG/libavcodec

by dpJudas » Mon Apr 02, 2018 11:17 am

The main problem with video playback is that it is patented to hell.

Reimplement PlayMovie using FFMPEG/libavcodec

by RockstarRaccoon » Mon Apr 02, 2018 11:15 am

I'm not entirely sure how difficult something like this would be, but I think it would be cool if someone could add, say, the prerendered cutscenes from the console version of Hexen, or maybe make a live action video for breifings, or maybe a video for the opening of a standalone game.

I know https://zdoom.org/wiki/PlayMovie hasn't been implemented for a while, and I'm wondering if it could be reimplemented with an open source library like libavcodec...

Top