Skip to content

Instantly share code, notes, and snippets.

@BenMcLean
Last active May 27, 2022 15:18
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BenMcLean/5a32f0ca1c3eb23e7c6b44e9fb8a6011 to your computer and use it in GitHub Desktop.
Save BenMcLean/5a32f0ca1c3eb23e7c6b44e9fb8a6011 to your computer and use it in GitHub Desktop.
Uses https://ffmpeg.org/ to tag a video file as being SBS 3D. Just drag+drop the video file onto this batch file in same folder with ffmpeg.exe
@ECHO OFF
cd %~dp0
ffmpeg.exe -i "%~1" -c:v copy -c:a aac -af "pan=stereo|FL=0.5*FC+0.707*FL+0.707*BL+0.5*LFE|FR=0.5*FC+0.707*FR+0.707*BR+0.5*LFE,volume=1.660156" -metadata:s:v:0 stereo_mode=1 "%~n1_half_2x1.mp4"
echo Output file is: "%~n1_half_2x1.mp4"
@PAUSE
@ECHO OFF
cd %~dp0
ffmpeg.exe -i "%~1" -c:v copy -c:a aac -metadata:s:v:0 stereo_mode=1 "%~n1_half_2x1.mp4"
echo Output file is: "%~n1_half_2x1.mp4"
@PAUSE
@ECHO OFF
cd %~dp0
ffmpeg -i %1 -vcodec libx264 -x264opts frame-packing=3 "%~n13D%~x1"
echo Output file is: "%~n13D%~x1"
@PAUSE
@ECHO OFF
cd %~dp0
ffmpeg -i %1 -c copy -metadata:s:v:0 stereo_mode=1 "%~n13D%~x1"
echo Output file is: "%~n13D%~x1"
@PAUSE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment