Skip to content

Commit

Permalink
fixed audio file picker which wasn't allowing to select a file in dir…
Browse files Browse the repository at this point in the history
…ectory
  • Loading branch information
sasmaster committed Feb 24, 2024
1 parent 42f53a5 commit 6849702
Show file tree
Hide file tree
Showing 9 changed files with 135 additions and 23 deletions.
13 changes: 13 additions & 0 deletions .vsconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"version": "1.0",
"components": [
"Microsoft.Net.Component.4.6.2.TargetingPack",
"Microsoft.VisualStudio.Component.VC.14.36.17.6.x86.x64",
"Microsoft.VisualStudio.Component.VC.Tools.x86.x64",
"Microsoft.VisualStudio.Component.Windows10SDK.22000",
"Microsoft.VisualStudio.Workload.CoreEditor",
"Microsoft.VisualStudio.Workload.ManagedDesktop",
"Microsoft.VisualStudio.Workload.NativeDesktop",
"Microsoft.VisualStudio.Workload.NativeGame"
]
}
18 changes: 16 additions & 2 deletions Config/DefaultEngine.ini
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@


[/Script/EngineSettings.GameMapsSettings]
GameDefaultMap=/Engine/Maps/Templates/Template_Default.Template_Default

GameDefaultMap=/Game/DefaultTest.DefaultTest
EditorStartupMap=/Game/DefaultTest.DefaultTest

[/Script/HardwareTargeting.HardwareTargetingSettings]
TargetedHardwareClass=Desktop
Expand All @@ -15,3 +15,17 @@ AppliedDefaultGraphicsPerformance=Maximum
+ActiveGameNameRedirects=(OldGameName="/Script/TP_Blank",NewGameName="/Script/VideoEncoderUE")
+ActiveClassRedirects=(OldClassName="TP_BlankGameModeBase",NewClassName="VideoEncoderUEGameModeBase")

[/Script/AndroidFileServerEditor.AndroidFileServerRuntimeSettings]
bEnablePlugin=True
bAllowNetworkConnection=True
SecurityToken=7508CD974E0ECB4F405EC08B23456F9F
bIncludeInShipping=False
bAllowExternalStartInShipping=False
bCompileAFSProject=False
bUseCompression=False
bLogFiles=False
bReportStats=False
ConnectionType=USBOnly
bUseManualIPAddress=False
ManualIPAddress=

86 changes: 86 additions & 0 deletions Config/DefaultInput.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
[/Script/Engine.InputSettings]
-AxisConfig=(AxisKeyName="Gamepad_LeftX",AxisProperties=(DeadZone=0.25,Exponent=1.f,Sensitivity=1.f))
-AxisConfig=(AxisKeyName="Gamepad_LeftY",AxisProperties=(DeadZone=0.25,Exponent=1.f,Sensitivity=1.f))
-AxisConfig=(AxisKeyName="Gamepad_RightX",AxisProperties=(DeadZone=0.25,Exponent=1.f,Sensitivity=1.f))
-AxisConfig=(AxisKeyName="Gamepad_RightY",AxisProperties=(DeadZone=0.25,Exponent=1.f,Sensitivity=1.f))
-AxisConfig=(AxisKeyName="MouseX",AxisProperties=(DeadZone=0.f,Exponent=1.f,Sensitivity=0.07f))
-AxisConfig=(AxisKeyName="MouseY",AxisProperties=(DeadZone=0.f,Exponent=1.f,Sensitivity=0.07f))
-AxisConfig=(AxisKeyName="Mouse2D",AxisProperties=(DeadZone=0.f,Exponent=1.f,Sensitivity=0.07f))
+AxisConfig=(AxisKeyName="Gamepad_LeftX",AxisProperties=(DeadZone=0.250000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="Gamepad_LeftY",AxisProperties=(DeadZone=0.250000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="Gamepad_RightX",AxisProperties=(DeadZone=0.250000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="Gamepad_RightY",AxisProperties=(DeadZone=0.250000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="MouseX",AxisProperties=(DeadZone=0.000000,Sensitivity=0.070000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="MouseY",AxisProperties=(DeadZone=0.000000,Sensitivity=0.070000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="Mouse2D",AxisProperties=(DeadZone=0.000000,Sensitivity=0.070000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="MouseWheelAxis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="Gamepad_LeftTriggerAxis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="Gamepad_RightTriggerAxis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="Gamepad_Special_Left_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="Gamepad_Special_Left_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="Vive_Left_Trigger_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="Vive_Left_Trackpad_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="Vive_Left_Trackpad_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="Vive_Right_Trigger_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="Vive_Right_Trackpad_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="Vive_Right_Trackpad_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="MixedReality_Left_Trigger_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="MixedReality_Left_Thumbstick_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="MixedReality_Left_Thumbstick_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="MixedReality_Left_Trackpad_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="MixedReality_Left_Trackpad_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="MixedReality_Right_Trigger_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="MixedReality_Right_Thumbstick_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="MixedReality_Right_Thumbstick_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="MixedReality_Right_Trackpad_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="MixedReality_Right_Trackpad_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="OculusTouch_Left_Grip_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="OculusTouch_Left_Trigger_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="OculusTouch_Left_Thumbstick_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="OculusTouch_Left_Thumbstick_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="OculusTouch_Right_Grip_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="OculusTouch_Right_Trigger_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="OculusTouch_Right_Thumbstick_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="OculusTouch_Right_Thumbstick_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="ValveIndex_Left_Grip_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="ValveIndex_Left_Grip_Force",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="ValveIndex_Left_Trigger_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="ValveIndex_Left_Thumbstick_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="ValveIndex_Left_Thumbstick_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="ValveIndex_Left_Trackpad_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="ValveIndex_Left_Trackpad_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="ValveIndex_Left_Trackpad_Force",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="ValveIndex_Right_Grip_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="ValveIndex_Right_Grip_Force",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="ValveIndex_Right_Trigger_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="ValveIndex_Right_Thumbstick_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="ValveIndex_Right_Thumbstick_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="ValveIndex_Right_Trackpad_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="ValveIndex_Right_Trackpad_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
+AxisConfig=(AxisKeyName="ValveIndex_Right_Trackpad_Force",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
bAltEnterTogglesFullscreen=True
bF11TogglesFullscreen=True
bUseMouseForTouch=False
bEnableMouseSmoothing=True
bEnableFOVScaling=True
bCaptureMouseOnLaunch=True
bEnableLegacyInputScales=True
bEnableMotionControls=True
bFilterInputByPlatformUser=False
bEnableInputDeviceSubsystem=True
bShouldFlushPressedKeysOnViewportFocusLost=True
bEnableDynamicComponentInputBinding=True
bAlwaysShowTouchInterface=False
bShowConsoleOnFourFingerTap=True
bEnableGestureRecognizer=False
bUseAutocorrect=False
DefaultViewportMouseCaptureMode=CapturePermanently_IncludingInitialMouseDown
DefaultViewportMouseLockMode=LockOnCapture
FOVScale=0.011110
DoubleClickTime=0.200000
DefaultPlayerInputClass=/Script/EnhancedInput.EnhancedPlayerInput
DefaultInputComponentClass=/Script/EnhancedInput.EnhancedInputComponent
DefaultTouchInterface=/Engine/MobileResources/HUD/DefaultVirtualJoysticks.DefaultVirtualJoysticks
-ConsoleKeys=Tilde
+ConsoleKeys=Tilde

Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ UMP4MoviePipelineVideoOutput::Initialize_GameThread(const FString& InFileName, F
//of the engine executables which we don't want


if (!AudioFilePath.Path.IsEmpty())
if (!AudioFilePath.FilePath.IsEmpty())
{
mFFMPEGOptions.audioFilePath = FPaths::ConvertRelativePathToFull(AudioFilePath.Path);
mFFMPEGOptions.audioFilePath = FPaths::ConvertRelativePathToFull(AudioFilePath.FilePath);
}
mFFMPEGOptions.videoWidth = InResolution.X;
mFFMPEGOptions.videoHeight = InResolution.Y;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ class VIDEOENCODER_API UMP4MoviePipelineVideoOutput : public UMoviePipelineVideo
//FString AudioFilePath;

UPROPERTY(BlueprintReadWrite,EditAnywhere, Category = Settings)
FDirectoryPath AudioFilePath;

FFilePath AudioFilePath;
};


32 changes: 15 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,31 @@
# MP4ExporterUE4

MP4 Video exporter plugin for Unreal Movie Render Queue.
The plugin allows encoding the animation in the RenderQueue into mp4,with optional AAC audio track.
# MP4Exporter for Unreal Engine 4/5
LibAV based MP4 Video exporter plugin for Unreal Movie Render Queue. Supports Unreal Engine 4.27 and 5.3.
The plugin allows encoding sequencer animation via RenderQueue into mp4 video,with optional AAC audio track.
The plugin can be used in editor as well as in runtime builds.
The plugin is still pretty raw,I have been developing it as a part of a bigger project I have been working on.
Any feedbacks,feature requests,bug reports are much welcomed,but I cannot gurantee fast addressing of those.

Any feedbacks,feature requests,bug reports are welcomed.

## Supported platforms

All the source code is provided here and completely portable to any platform supported by Unreal Engine.I tested only on Windows.


## Dependencies
The following libav libraries are linked dynamically with this plugin's source code: avcodec-58.dll,avformat-58.dll,avutil-56.dll,swscale-5.dll,swresample-3.dll
The encoding/multiplexing logic that uses the above libraries resides in 2 .c files, which are provided separately on request (contact me via info at codeartworks dot com): ca_videoencoder.h,ca_videoencoder.c
These two files have been precompiled with MSVC 2019 for 64bit target into static librariy which is linked with UE4 plugin of the example project. I will upload those later as the code requires a good cleanup.
The encoding/multiplexing logic that uses the above libraries resides in 2 .c files: ca_videoencoder.h,ca_videoencoder.c
These two files were precompiled with MSVC 2019 for 64bit target into static librariy which is optionally provided and can be linked
with the plugin instead of the source files.


## Usage

1. All the libav shared libs are provided as bin.zip file in 'Plugins\VideoEncoder\Source\ThirdParty\ffmpeg' directory. Unzip it in the same location so that all the files end up in 'bin' folder.
2. Right click VideoEncoderUE.uproject and press 'Generate Visual Studio project files'. VS 2017,2019 should work fine,but let me know if there is a problem.
3. Compile the solution,make sure the shared libs (DLL files) are put into the same location where your project executable file is, then launch the UE4 test project either via VS or via the launcher file.
2. Right click VideoEncoderUE.uproject and press 'Generate Visual Studio project files'. VS 2017,2019,2022 should work fine,but let me know if there is a problem.
3. Compile the solution,make sure the shared libs (DLL files) are put into the same location where your project executable file is, then launch the engine test project either via VS or via the launcher file.
4. From now on I assume you know how to create level sequence and setup the movie render queue. The test project contains a preset for the exporter:

![MP4 exporter preset](/Docs/p1.JPG)

5. The MP4 exporter's interface at this point of time is very simple.It allows the user to provide the bitrate (in bits),which is very important for the video quality. You may check YOUTUBE resolution/bitrate reference table for recommended bitrates. And the optional audio file location is provided,so one can add a soundtrack to the encoded movie queue. The audio file must be provided in AAC format.
5. The MP4 exporter's interface at this point of time is very simple.It allows the user to provide the bitrate (in bits),which is very important for the video quality.
You may check YOUTUBE resolution/bitrate reference table for recommended bitrates. And the optional audio file location is provided,so one can add a soundtrack to the encoded movie queue.
The audio file must be provided in AAC format. Support for WAV and MP3 are on TODO list

![MP4 exporter settings](/Docs/p2.JPG)

Expand All @@ -41,11 +39,11 @@ The plugin contains a code which links with LIBAV project so all the relevant li
This software uses libraries from the Libav project under the LGPLv2.1 or GPL v2 or later, depending what kind of LIBAV libraries you
are planning to use in your project. This specific version is linked with LIBAV libraries compiled with --enable-gpl on. In case you
decide to use this project as is then GPL license is in force instead of LGPL.
Please check [HERE](https://libav.org/legal/) the LIBAV license comppilance terms & conditions before you decide to sell and disitrbute your UE4
project with this plugin. Also note that UE4 marketplace forbids distribution of plugins with LGPL/GPL licensing types.
Please check [HERE](https://libav.org/legal/) the LIBAV license comppilance terms & conditions before you decide to sell and disitrbute your UE
project with this plugin. Also note that Unreal marketplace forbids distribution of plugins with LGPL/GPL licensing types.
I strongly recomend consulting with a lawyer if you mean to sell or distribute your own project along with this code.

Any Epic Games / UnrealEngine related code is covered under license outlined in EpicGames UE4 EULA.
Any Epic Games / UnrealEngine related code is covered under license outlined in EpicGames Unreal Engine EULA.



Expand Down
2 changes: 1 addition & 1 deletion VideoEncoderUE.uproject
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"FileVersion": 3,
"EngineAssociation": "4.27",
"EngineAssociation": "5.3",
"Category": "",
"Description": "",
"Modules": [
Expand Down
Binary file added soundtracks/annihilation-logo.aac
Binary file not shown.

0 comments on commit 6849702

Please sign in to comment.