MAMEWorld >> Programming
Previous thread Previous  View all threads Index   Next thread Next   Threaded Mode Threaded  

Pages: 1

Digitalghost
MAMEHub Creator
Reged: 06/15/10
Posts: 67
Loc: California, USA
Send PM


WebM support
#310754 - 06/24/13 05:26 PM


Hey all,

One of the things I added in the MAMEHub fork of MAME was WebM video recording. WebM is of similar quality as mpeg-4 but completely open source and patent-free.

The WebM encoder runs in a separate pool of threads and throttles quality so that it can complete a frame before the next frame is requested. If you have a single-core machine, you will suffer a pretty major performance hit, but anyone with dual core or higher should be able to record mid-quality videos. People with a quad-core or better can record high-quality, compressed videos without sacrificing performance.

Here's an example of a webm video that was recording while playing with no loss in framerate: http://www.youtube.com/watch?v=lHtkvSZwUO4

IMHO This feature should go into the core MAME build. Feel free to merge upstream from https://github.com/MisterTea/MAMEHub or let me know and I can do it myself.

Edited by Digitalghost (06/24/13 05:27 PM)



Check out MAMEHub here: http://www.mamehub.info/



R. Belmont
Cuckoo for IGAvania
Reged: 09/21/03
Posts: 9713
Loc: ECV-197 The Orville
Send PM


Re: WebM support new [Re: Digitalghost]
#310767 - 06/24/13 10:05 PM


I am way, way ahead of you, even though I think WebM is horrible. (It's only "patent-free" because Google threw a few billion at MPEG-LA, for instance).



Digitalghost
MAMEHub Creator
Reged: 06/15/10
Posts: 67
Loc: California, USA
Send PM


Re: WebM support new [Re: R. Belmont]
#310824 - 06/26/13 09:20 AM


> I am way, way ahead of you, even though I think WebM is horrible. (It's only
> "patent-free" because Google threw a few billion at MPEG-LA, for instance).

Who cares why it's patent-free? The quality is similar to mpeg-4 and it's open-source.

If you are thinking of ogg theora, think again: Most modern browsers natively support webm, but not theora. This means people will have to download a separate plugin or another program to play videos they record. Also, I don't believe theora is supported by youtube, but I could be wrong there. Also, the quality of theora is significantly worse.



Check out MAMEHub here: http://www.mamehub.info/



R. Belmont
Cuckoo for IGAvania
Reged: 09/21/03
Posts: 9713
Loc: ECV-197 The Orville
Send PM


Re: WebM support new [Re: Digitalghost]
#310875 - 06/27/13 01:54 PM


> Who cares why it's patent-free? The quality is similar to mpeg-4 and it's
> open-source.

I find the quality closer to mpeg-2, which is in line with the x264 team's measurements. I do actually care about quality in addition to the other attributes, which is why I never boarded the Theora hype wagon. I'm hoping VP9 will actually be credible, but I haven't seen enough demos to tell.

In the meantime, working code trumps a lot of things with MAME, so your stuff is in.



R. Belmont
Cuckoo for IGAvania
Reged: 09/21/03
Posts: 9713
Loc: ECV-197 The Orville
Send PM


Re: WebM support new [Re: R. Belmont]
#310926 - 06/29/13 06:51 PM


BTW, is there some reason you install SDL the wrong way on Mac OS X? The MAME code really prefers you to drag the Framework into the right folder and then it works automatically with a lot fewer command line switches.



Digitalghost
MAMEHub Creator
Reged: 06/15/10
Posts: 67
Loc: California, USA
Send PM


Re: WebM support new [Re: R. Belmont]
#310945 - 06/30/13 04:52 PM


> BTW, is there some reason you install SDL the wrong way on Mac OS X? The MAME code
> really prefers you to drag the Framework into the right folder and then it works
> automatically with a lot fewer command line switches.

Is there documentation which says to do this? I don't see any reference to doing that here: http://www.mamedev.org/devwiki/index.php?title=How_MAME_Works



Check out MAMEHub here: http://www.mamehub.info/



Digitalghost
MAMEHub Creator
Reged: 06/15/10
Posts: 67
Loc: California, USA
Send PM


Re: WebM support new [Re: R. Belmont]
#310946 - 06/30/13 04:54 PM


> > Who cares why it's patent-free? The quality is similar to mpeg-4 and it's
> > open-source.
>
> I find the quality closer to mpeg-2, which is in line with the x264 team's
> measurements. I do actually care about quality in addition to the other attributes,
> which is why I never boarded the Theora hype wagon. I'm hoping VP9 will actually be
> credible, but I haven't seen enough demos to tell.
>
> In the meantime, working code trumps a lot of things with MAME, so your stuff is in.

Cool, please stay up to date with github because I've already found two bugs:

1) Video sizes weren't multiples of 16
2) custom assembly crashes on 64-bit.

I have a fix for 1, and a fix for 2 is coming.



Check out MAMEHub here: http://www.mamehub.info/



drewcifer
One bad Mutha-(shut yo' mouth!)
Reged: 07/01/04
Posts: 428
Loc: Sweden
Send PM


Re: WebM support new [Re: Digitalghost]
#310947 - 06/30/13 05:06 PM


> > BTW, is there some reason you install SDL the wrong way on Mac OS X? The MAME code
> > really prefers you to drag the Framework into the right folder and then it works
> > automatically with a lot fewer command line switches.
>
> Is there documentation which says to do this? I don't see any reference to doing that
> here: http://www.mamedev.org/devwiki/index.php?title=How_MAME_Works

I'm guessing it's here, on the official SDL MAME message board?
http://forums.bannister.org/ubbthreads.php?ubb=showflat&Number=58897#Post58897



R. Belmont
Cuckoo for IGAvania
Reged: 09/21/03
Posts: 9713
Loc: ECV-197 The Orville
Send PM


Re: WebM support new [Re: Digitalghost]
#310957 - 07/01/13 02:42 AM


> Cool, please stay up to date with github because I've already found two bugs:

I attempted to integrate it and Micko and I made the decision to abort.

1) The code requires a horrifying soup of compiler options to build -Wall, and it gets worse when you include Clang and MSVC++ builds, both of which are routinely done by devs and users.
2) There's no plain C version of WebM to fulfill NOASM=1 builds.
3) It pulls in Boost, which is larger than all of MAME.
4) The WebM code isn't much like what Google ships, which set off alarm bells.
5) The YASM requirement is a blocker until they ship a packaged installer for OS X. MAME is currently easier to compile on OS X than on any other operating system when you follow my instructions and install SDL as a framework, and disrupting that is not acceptable.

Almost none of this is your fault (it's primarily Google's), but we're going to pursue alternate methods of logging compressed videos.



R. Belmont
Cuckoo for IGAvania
Reged: 09/21/03
Posts: 9713
Loc: ECV-197 The Orville
Send PM


Re: WebM support new [Re: Digitalghost]
#310958 - 07/01/13 02:43 AM


> Is there documentation which says to do this? I don't see any reference to doing that
> here: http://www.mamedev.org/devwiki/index.php?title=How_MAME_Works

Authoritative non-Windows compile documentation is found on forums.bannister.org in the relevant sticky posts.



Digitalghost
MAMEHub Creator
Reged: 06/15/10
Posts: 67
Loc: California, USA
Send PM


Re: WebM support new [Re: R. Belmont]
#310999 - 07/03/13 03:10 AM


> > Cool, please stay up to date with github because I've already found two bugs:
>
> I attempted to integrate it and Micko and I made the decision to abort.
>
> 1) The code requires a horrifying soup of compiler options to build -Wall, and it
> gets worse when you include Clang and MSVC++ builds, both of which are routinely done
> by devs and users.

Any compiler options can be moved into a common header file that only the webm codes knows about.

> 2) There's no plain C version of WebM to fulfill NOASM=1 builds.

Incorrect, you can enable the plain C version by setting all of the HAVE_* and ARCH_* defines to 0 in vpx_config.h

> 3) It pulls in Boost, which is larger than all of MAME.

It only needs boost::thread. You can replace this with any threading library (there's probably already one in mame, although I couldn't find it)

> 4) The WebM code isn't much like what Google ships, which set off alarm bells.

It's exactly what google ships, but it's over 2 years old. Replacing with a more recent version would be great for both of us, and shouldn't cause any issues.

> 5) The YASM requirement is a blocker until they ship a packaged installer for OS X.
> MAME is currently easier to compile on OS X than on any other operating system when
> you follow my instructions and install SDL as a framework, and disrupting that is not
> acceptable.

See (2)

>
> Almost none of this is your fault (it's primarily Google's), but we're going to
> pursue alternate methods of logging compressed videos.

This makes it my fault. Let me know if you still can't move forward.



Check out MAMEHub here: http://www.mamehub.info/


Pages: 1

MAMEWorld >> Programming
Previous thread Previous  View all threads Index   Next thread Next   Threaded Mode Threaded  

Extra information Permissions
Moderator:  Pi 
0 registered and 3 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 3195