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

Use ffmpeg for Windows Video Dumping instead of VFW #3451

Merged
merged 2 commits into from
Jan 9, 2016

Conversation

RisingFog
Copy link
Member

With the ffmpeg Windows libraries cherry picked, I'm re-creating this PR. This will allow Windows to use built-in ffmpeg support to dump video in the AVI container with either the FFV1 codec or the FMP4 (MPEG4) Codec. This is equivalent to what is currently supported by Linux video dumping. This also finally provides some stability in video dumping code and combines all operating systems under a single code base.

@delroth
Copy link
Member

delroth commented Jan 6, 2016

Please rebase this PR -- it has merge conflicts according to Github.

@JMC47 please do some testing.

</Link>
<ResourceCompile>
<AdditionalIncludeDirectories>$(ExternalsDir)wxWidgets3\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ResourceCompile>
<ClCompile />

This comment was marked as off-topic.

@delroth
Copy link
Member

delroth commented Jan 7, 2016

@RisingFog Are we rendering with a lossy codec by default now? That's the only way I can explain the fifoci diffs.

@RisingFog
Copy link
Member Author

@delroth by default it's mpeg-4, but we have the option to use FFV1 (lossless) in the advanced graphics configuration, which is the same as Linux.

@delroth
Copy link
Member

delroth commented Jan 7, 2016

Ah, I see -- I never added the option to use FFV1 since it was previously unsupported. dolphin-emu/fifoci@3fdc5eb should fix that.

@dolphin-emu-bot rebuild

@delroth
Copy link
Member

delroth commented Jan 7, 2016

Alright, looks like the left side is now compressed losslessly (I can't see artifacts, at least).

Now just needs user testing and I'm fine with merging this.

@@ -615,3 +611,15 @@ void Renderer::Swap(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight, const
XFBWrited = false;
}

void Renderer::FlipImageData(u8* data, int w, int h, int pixel_width)

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

@degasus
Copy link
Member

degasus commented Jan 7, 2016

About all of those "#if defined(HAVE_LIBAV) || defined (_WIN32)", may you define the HAVE_LIBAV macro on windows, too?

@@ -150,9 +152,8 @@ class Renderer

#if defined _WIN32 || defined HAVE_LIBAV

This comment was marked as off-topic.

@JMC47
Copy link
Contributor

JMC47 commented Jan 7, 2016

Video recording is actually pretty nice with this. Smaller video sizes are especially nice. I can't load these videos into my editor, but, I think that's more a problem for me than it is a problem with the video dumping.

@delroth
Copy link
Member

delroth commented Jan 7, 2016

Why are we using fmp4? Can we use h.264 somehow? Or at least some format that's widely supported?

@RisingFog
Copy link
Member Author

@delroth fmp4 is the ffmpeg version of XviD/DivX. They should be supported by most video editors (they work for me in Adobe Premiere)

@delroth
Copy link
Member

delroth commented Jan 7, 2016

Well clearly Vegas doesn't support it. That's kind of annoying. I'd rather we use a more widely supported format.

@gamax92
Copy link

gamax92 commented Jan 7, 2016

If you're transitioning from fmp4 to x264, it would probably also help to transition away from avi containers to mp4 containers.

@RisingFog
Copy link
Member Author

The last commit now forces the XVID FourCC to replace the existing FMP4 FourCC. This should fool video editors to open it as an XviD video file instead of getting choked up by the FMP4 FourCC.

@delroth
Copy link
Member

delroth commented Jan 8, 2016

Alright. JMC, can you confirm this works?

On Fri, Jan 8, 2016 at 8:20 PM Chris Burgener notifications@github.com
wrote:

The last commit now forces the XVID FourCC to replace the existing FMP4
FourCC. This should fool video editors to open it as an XviD video file
instead of getting choked up by the FMP4 FourCC.


Reply to this email directly or view it on GitHub
#3451 (comment).

@JMC47
Copy link
Contributor

JMC47 commented Jan 8, 2016

Yep, works.

@JosJuice
Copy link
Member

JosJuice commented Jan 8, 2016

I've also tested it and can confirm that it works.

@PatrickFerry
Copy link
Contributor

Will there be a consideration for changing to ffv1 level 3 as it's multithreaded.

@RisingFog
Copy link
Member Author

@ZephyrSurfer I believe this is FFV1 level 3 by default, but I'll check on that.

@degasus
Copy link
Member

degasus commented Jan 8, 2016

@RisingFog I still want to have the HAVE_LIBAV macro on windows ;)

@delroth
Copy link
Member

delroth commented Jan 9, 2016

@degasus let's leave that for a future cleanup -- I'd like this merged ASAP.

delroth added a commit that referenced this pull request Jan 9, 2016
Use ffmpeg for Windows Video Dumping instead of VFW
@delroth delroth merged commit bf1c53a into dolphin-emu:master Jan 9, 2016
@RisingFog RisingFog deleted the libav branch January 9, 2016 00:38
@dolphin-emu-bot
Copy link
Contributor

FifoCI detected that this change impacts graphical rendering. Here are the behavior differences detected by the system:

  • aeon-charge-attack on dx-win-nv: diff
  • cel-damage-lighting on dx-win-nv: diff
  • chibi-robo-fastdepth on dx-win-nv: diff
  • chibi-robo-zfighting on dx-win-nv: diff
  • custom-brawl-char on dx-win-nv: diff
  • djfny-menu on dx-win-nv: diff
  • DKCR-Char on dx-win-nv: diff
  • ea-vp6 on dx-win-nv: diff
  • ed-lighting on dx-win-nv: diff
  • fifa-street on dx-win-nv: diff
  • find-mii on dx-win-nv: diff
  • fortune-street on dx-win-nv: diff
  • fortune-street-fog on dx-win-nv: diff
  • fortune-street-white-box on dx-win-nv: diff
  • fsa-layers on dx-win-nv: diff
  • goldeneye-depth on dx-win-nv: diff
  • inverted-depth-range on dx-win-nv: diff
  • kirby-shadows on dx-win-nv: diff
  • line-width-test on dx-win-nv: diff
  • luigi-shadows on dx-win-nv: diff
  • mario-sluggers-bar on dx-win-nv: diff
  • mario-tennis-menu on dx-win-nv: diff
  • medabots-crash on dx-win-nv: diff
  • megaman-heat on dx-win-nv: diff
  • melee-depth on dx-win-nv: diff
  • melee-lighting on dx-win-nv: diff
  • mii-channel on dx-win-nv: diff
  • milotic-texture on dx-win-nv: diff
  • mini-ninjas on dx-win-nv: diff
  • mkdd-efb on dx-win-nv: diff
  • monkeyball-fuse on dx-win-nv: diff
  • mp3-bloom on dx-win-nv: diff
  • mp7-text on dx-win-nv: diff
  • mtennis-zfreeze on dx-win-nv: diff
  • my-word-coach on dx-win-nv: diff
  • nddemo-bumpmapping on dx-win-nv: diff
  • nfsu-purplerect on dx-win-nv: diff
  • nfsu-reflections on dx-win-nv: diff
  • nsmbw-coins on dx-win-nv: diff
  • nsmbw-intro on dx-win-nv: diff
  • pm-hc-jp on dx-win-nv: diff
  • puzzle-collection on dx-win-nv: diff
  • pw-black-bars on dx-win-nv: diff
  • rs2-glass on dx-win-nv: diff
  • rs2-skybox on dx-win-nv: diff
  • rs2-zfreeze on dx-win-nv: diff
  • sadx-ui on dx-win-nv: diff
  • sf-assault-flashing on dx-win-nv: diff
  • simpsons-tev on dx-win-nv: diff
  • smg2-fog on dx-win-nv: diff
  • sms-bubbles on dx-win-nv: diff
  • sms-gc on dx-win-nv: diff
  • soniccolors-mm on dx-win-nv: diff
  • sonicriderszg-gb on dx-win-nv: diff
  • spyro-bloom on dx-win-nv: diff
  • ssbm-pointsize on dx-win-nv: diff
  • ss-map on dx-win-nv: diff
  • super-sluggers-white-out on dx-win-nv: diff
  • sw3-dt on dx-win-nv: diff
  • thps3-earlyz on dx-win-nv: diff
  • thps4-shadow on dx-win-nv: diff
  • tos-invis-char on dx-win-nv: diff
  • vegas-party-depth on dx-win-nv: diff
  • xenoblade-menu on dx-win-nv: diff
  • zww-armos on dx-win-nv: diff
  • zww-water on dx-win-nv: diff
  • zww-waves on dx-win-nv: diff
  • chibi-robo-zfighting on ogl-lin-nouveau: diff
  • ed-lighting on ogl-lin-nouveau: diff
  • fortune-street on ogl-lin-nouveau: diff
  • fortune-street-white-box on ogl-lin-nouveau: diff
  • mario-sluggers-bar on ogl-lin-nouveau: diff
  • medabots-crash on ogl-lin-nouveau: diff
  • mtennis-zfreeze on ogl-lin-nouveau: diff
  • smg2-fog on ogl-lin-nouveau: failed to render
  • sms-bubbles on ogl-lin-nouveau: failed to render
  • soniccolors-mm on ogl-lin-nouveau: diff
  • sw3-dt on ogl-lin-nouveau: diff
  • tsp3-pinkgrass on ogl-lin-nouveau: diff
  • chibi-robo-zfighting on ogl-lin-radeon: diff
  • medabots-crash on ogl-lin-radeon: diff
  • monkeyball-fuse on ogl-lin-radeon: diff
  • mp3-bloom on ogl-lin-radeon: diff
  • rs2-skybox on ogl-lin-radeon: diff
  • rs2-zfreeze on ogl-lin-radeon: diff
  • sf-assault-flashing on ogl-lin-radeon: diff
  • sms-bubbles on ogl-lin-radeon: diff
  • sw3-dt on ogl-lin-radeon: diff

automated-fifoci-reporter

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