FYI: mkv to mp4 for XBox 360 System Video Player Script

Come up with a useful post-processing script? Share it here!
Post Reply
lovol2
Newbie
Newbie
Posts: 1
Joined: February 23rd, 2013, 5:15 pm

FYI: mkv to mp4 for XBox 360 System Video Player Script

Post by lovol2 »

Hi Everyone. Just been customising this to convert files using ffmpeg. The output works with full surround sound on my XBox 360 connected via optical to my Sounds System/DVD Player.

thought I'd share and hope it helps someone. I did copy another script on here for 'base', no point in re-inventing the wheel from scratch!

Code: Select all

 @ECHO OFF
ECHO.
ECHO Begin SABPostProccessVideo - Convert mkv to mp4 works on xbox360 using System video Player perfeclty...
ECHO.

REM Change these variables to match your system
SET FFMPEG=C:\ffmpeg\bin\ffmpeg.exe
SET OldFormat=mkv
SET NewFormat=mp4
REM You shouldn't need to edit anything below here

ECHO Looking in "%~1" for %OldFormat% files...
ECHO Using %FFMPEG% to convert %OldFormat% to %NewFormat%...
ECHO These are the files to convert
for %%i IN ("%~1\*.%OldFormat%") DO (ECHO "%%i")
ECHO Starting Conversion (If there are any files)
for %%i IN ("%~1\*.%OldFormat%") DO (%FFMPEG% -y -ss 00:00:00 -threads 6 -i "%%i" -vcodec copy -f mp4 -strict experimental -acodec copy "%%i.%NewFormat%")

REM Pause for 5 seconds once processing is complete to let things settle a bit
PING 192.168.1.250 -n 1 -w 5000 >NUL

REM This part checks to see if the old format files were converted to new format
ECHO Checking for new format files in %~1
IF EXIST "%~1\*.%NewFormat%" (
ECHO Found %NewFormat% in folder!
ECHO Deleting old files then
ECHO.
ECHO Pause for 5 seconds before trying to delete files
PING 192.168.1.250 -n 1 -w 5000 >NUL
ECHO Delete %OldFormat% files from source directory
del /Q /S /F "%~1\*.%OldFormat%"
) ELSE (
ECHO DID NOT find %NewFormat% in folder!
ECHO so, erm, not doing anything now, you can keep your %NewFormat% and do it yourself!
)
amoodyic87
Newbie
Newbie
Posts: 1
Joined: September 11th, 2014, 4:31 pm

Re: FYI: mkv to mp4 for XBox 360 System Video Player Script

Post by amoodyic87 »

Thanks for providing this script it rocks. I was wondering if there was a way to tweak to export the encoded mp4 file to a new location.
Post Reply