diff --git a/aegisub/video_provider_ffmpegsource.cpp b/aegisub/video_provider_ffmpegsource.cpp
index cb5f816009822fedb09313dd326a50986e588b25..5578e620b79f2380fb201613aae4f243fdeaf30e 100644
--- a/aegisub/video_provider_ffmpegsource.cpp
+++ b/aegisub/video_provider_ffmpegsource.cpp
@@ -40,6 +40,7 @@
 #include "video_provider_ffmpegsource.h"
 #include "video_context.h"
 #include "options.h"
+#include "aegisub_endian.h"
 
 
 ///////////////
@@ -217,13 +218,18 @@ const AegiVideoFrame FFmpegSourceVideoProvider::GetFrame(int _n, int FormatType)
 
 	// this is what we'll return eventually
 	AegiVideoFrame &DstFrame = CurFrame;
+	
+	bool big_endian = Endian::BigToMachine((int)1)==(int)1;
 
 	// choose output format
-	if (FormatType & FORMAT_RGB32) {
+	if (FormatType & FORMAT_RGB32 && big_endian) {
+		DstFormat		= FFMS_PIX_FMT_BGR32_1;
+		DstFrame.format	= FORMAT_RGB32;
+	} else if (FormatType & FORMAT_RGB32 && !big_endian) {
 		DstFormat		= FFMS_PIX_FMT_RGB32;
 		DstFrame.format	= FORMAT_RGB32;
 	} else if (FormatType & FORMAT_RGB24) {
-		DstFormat		= FFMS_PIX_FMT_RGB24;
+		DstFormat		= FFMS_PIX_FMT_BGR24;
 		DstFrame.format	= FORMAT_RGB24;
 	} else if (FormatType & FORMAT_YV12) {
 		DstFormat		= FFMS_PIX_FMT_YUV420P; // may or may not work
diff --git a/aegisub/video_provider_lavc.cpp b/aegisub/video_provider_lavc.cpp
index 4eb7aa69992e3b194613c0bed3fba4a73402669d..b11bbb69f3512b2ffd937d764e64d0a37190a6b6 100644
--- a/aegisub/video_provider_lavc.cpp
+++ b/aegisub/video_provider_lavc.cpp
@@ -283,7 +283,7 @@ const AegiVideoFrame LAVCVideoProvider::GetFrame(int n,int formatType) {
 		int w = codecContext->width;
 		int h = codecContext->height;
 		PixelFormat srcFormat = codecContext->pix_fmt;
-		PixelFormat dstFormat = PIX_FMT_RGB32;
+		PixelFormat dstFormat = PIX_FMT_BGRA;
 
 		// Allocate RGB32 buffer
 		if(!sws_context) //first frame