0

I am using ffmpeg-python to convert an hevc mkv file to an h264 mp4. This is the relevant code:

ffmpeg.input(video_file).output(out_name, vcodec='libx264', **{'pix_fmt': 'yuv420p'}).run()

Yet after converting the file, the resulting mp4 will only play in certain media players. Here is the result of running ffprobe on the mp4:

ffprobe output

I know this should be possible, so does anyone have an idea of why it isn't playing in older/more standard media players?

2
  • 1
    Possibly, the 6 channels in the audio. Add the CLI option -ac 2 and check.
    – Gyan
    Oct 18, 2022 at 11:57
  • @Gyan Wow, this worked! I never would have even thought to try this! If you want to give this as an answer then I'll accept it. Thank you so much!
    – Bob Smith
    Oct 19, 2022 at 10:12

1 Answer 1

2

Legacy media players like Windows Media Player may be finicky about the files they will accept. In this case, it looks like the audio channel count of 6 is too high.

Add the CLI option -ac 2 and check.

1
  • To be clear, the "Movies & TV" app, which was added in Windows 10, also was not able to play the video with 6 audio channels. Either way, thanks a lot for the help :)
    – Bob Smith
    Oct 21, 2022 at 5:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.