> It actually fails to do what I want here and download h264 content so I have it re-encoded
I struggled with that myself (yt-dlp documentation could use some work). What's currently working for me is:
yt-dlp -f "bestvideo[width<800][vcodec~='^(avc|h264)']+bestaudio[acodec~='^((mp|aa))']"