The OGV format typically uses the Theora video codec and Vorbis audio codec, while x264 is a specific codec primarily used within the MP4 and MKV containers. To use x264 in an OGV file, you’d need to transcode the video to Theora, as OGV is a container format that doesn’t natively support x264
If you really need .ogv, use the Theora video codec as recommended by this snippet.
You do not need an extra conversion, you just need to change from libx264 to libtheora in the codec panel. After changing this you should be able to export without failing.
Do you have any specific reason to use .ogv? This is very restricting for your options and if you need just a simple video file to play on phone/laptop you should use the default .mp4 preset.
Prefer WebM over Ogg Theora if you want to use Free codecs unless I guess you are targeting something very specific still stuck on Theora. There are 3 different WebM presets with AV1 the newest and heaviest of all codecs in Shotuct. Plain old WebM preset uses the VP8 video codec, which is old, fast, and least efficient (no, I am not talking about me ;-). VP9 is in between the 2, very efficient, a little slow to encode but worth a try.
Thanks for the interest guys!
The reason I need to use .ogv is that one of my source files is that. I combine it with an .mp4 one, and the final video needs to be in .ogv again, so the game engine can handle it (because it’s a mod for a video game).