Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> the first result for "convert video to MP4 with ffmpeg" would produce files not playable by Quicktime on Mac, you needed to pass in some other codec argument to make it work. So even ffmpeg is not a panacea for technical folks.

MP4 files use the MPEG-4 container format. It’s confusing at first why a .mp4 file would play somewhere and elsewhere not, until one looks into the difference of a container format and a video codec. After one learns that, one will be in a better position to find the right arguments to use for ffmpeg to produce a video file that is playable on some of one’s own different devices.

For me, to host videos on my website, I found it better to offload the task of converting formats to a self hosted PeerTube instance, rather than keeping scripts to transcode to multiple formats with different parameters on my own. I believe PeerTube also uses ffmpeg for this.



I think I did understand that when it comes to MKVs since it was popular for anime precisely because of its support for newer x265 codecs. So there is some connection between container and codec, in that not all containers support all codecs. I would also assume since x264 is dated at this point and been around a long time that there would be universal support for those supported codecs but that clearly isn't the case.

In any event, it's unexpected that the default configuration of ffmpeg produces an MP4 unplayable on Mac. Looks like "pix_fmt yuv420p" is what's needed.

Side note I'm remembering now why I needed to do this, some dev tooling produces WebP video files which can't be uploaded everywhere.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: