Untitled

 avatar
unknown
plain_text
5 months ago
380 B
2
Indexable
import subprocess

def convert_yuv_to_mp4(input_file, output_file, width=768, height=432):
    command = [
        'ffmpeg',
        '-s', f'{width}x{height}',
        '-pix_fmt', 'yuv420p',
        '-i', input_file,
        '-c:v', 'libx264',
        output_file
    ]
    subprocess.run(command)

# Convert bs1_25fps.yuv to MP4
convert_yuv_to_mp4('bs1_25fps.yuv', 'output.mp4')
Editor is loading...
Leave a Comment