I am trying to create a script that will convert my .360 videos into 360 MP4 format, but it does not seem to work properly. When I scroll through the video, it looks like I am in a black hole or like I am moving with “warp speed” 🙂
Can anyone help me with the parameters? The goal is to convert them using ffmpeg instead of the traditional export from GoPro Player.
Here is the Python script so far:
`import os
import subprocess
# Define the root directory to start from and the path to ffmpeg
root_path = r"C:Videos"
ffmpeg_path = r"C:Programsffmpegbinffmpeg.exe"
for root, dirs, files in os.walk(root_path):
for file in files:
if file.endswith(".360"):
full_path = os.path.join(root, file)
output_file = full_path.replace('.360', '.mp4')
subprocess.run([
ffmpeg_path, '-y', '-i', full_path,
'-vf', 'v360=input_stereo=mono:output=equirect:interp=linear',
'-c:v', 'libx264', '-crf', '23', '-preset', 'fast',
'-pix_fmt', 'yuv420p',
'-map_metadata', '0',
'-metadata:s:v', 'stereo_mode=mono',
'-metadata', 'projection=equirectangular',
'-an',
'-vf', 'scale=3840:2160',
output_file
])
print(f"Converted: {output_file}")
print("All video conversions complete.")`
I tried the script above, but the export quality was not what I needed. The video is distorted, so I need a way to automate the export of many videos from .360 to .mp4. The native GoPro Player app has a functionality for batch export, but it constantly crashes.
Curious_Mate is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.