I am converting videos with extension "flv","avi","mp4","mkv", "mpg", "wmv", "asf", "webm","mov","3gp","3gpp"
into "mp4"
for a better quality.
Command I am using:
ffmpeg -i <server_path>/g9zyy2qg54qp1l5spo2-mergedFile.webm -strict -2 -vcodec libx264 -preset slow -vb 500k -maxrate 500k -bufsize 1000k -vf 'scale=-1:480 ' -threads 0 -ab 64k -s 640x480 -movflags faststart -metadata:s:v:0 rotate=0 <server_path>/g9zyy2qg54qp1l5spo2-mergedFile7.mp4
Videos are working fine everywhere except on Windows. No Video is working on window platform. I tried playing them on firefox, opera, even downloaded them and played on media player software but didn't work at all.
Can you please tell me codecs I should use that make the videos play on windows as well?
FFmpeg can input most container formats natively, including MP4, . ts, MOV, AVI, Y4M, MKV, and many others. This is the output file. No switch necessary; just the file name.
Ffmpeg stands for Fast Forward MPEG. It's an opensource software project for working with audio and video. It is command-line based and lets you handle video, audio, multimedia files, and streams.
My video gets played in Windows 10 after adding parameters about pix_fmt and resolution (width and height should be even number):
ffmpeg -i temp-%d.png -c:v libx264 -strict -2 -preset slow -pix_fmt yuv420p -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" -f mp4 output.mp4
Use
"ffmpeg -i {$audioFile} -i {$videoFile} -map 1:0 -map 0:0 -strict -2 -vcodec libx264 -preset slow -vb 500k -maxrate 500k -bufsize 1000k -vf 'scale=-1:480 ' -threads 0 -ab 64k -s 640x480 -movflags +faststart -metadata:s:v:0 rotate=0 -fflags +genpts <server_path>/g9zyy2qg54qp1l5spo2-mergedFile7.mp4
(this uses the original command in your question)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With