ammen99 / wf-recorder

MIT License
875 stars 62 forks source link

Default settings not playing on Safari on iOS #278

Closed markstos closed 1 month ago

markstos commented 1 month ago

Details are here: https://forum.ghost.org/t/mp4-video-not-playing-on-safari-on-ios-works-on-desktop/50281

wf-recorder generated an MP4 file with a h264 "Constrained Baseline" profile. This didn't play in Safari on iOS, but after re-encoding the file with "High" profile, it worked.

Re-encoding the files with ffmpeg -i in.mp4 out.mp4 not only resolved the compatibility issue, but the file sizes shrank by more than half.

I'm not sure if this default compatibility or file size is a priority or not.

soreau commented 1 month ago

What version of wf-recorder are you using? The latest release should produce videos that are web friendly by default.

markstos commented 1 month ago

That was with 0.5.0, the latest release.

soreau commented 1 month ago

What command and options are you using to record? You can also pass parameters to the codec with -p. See --help.

markstos commented 1 month ago

Only an option to select an output and write to an .mp4 file. No audio.

soreau commented 1 month ago

Only an option to select an output and write to an .mp4 file. No audio.

Does it make a difference if you try .mkv?

soreau commented 1 month ago

I tried this myself and it seems when I use -c h264_vaapi, the output profile is automatically 'High'.

soreau commented 1 month ago

Another way is to use -ppreset=superfast -pvprofile=high -plevel=4.0 with libx264. However you probably want to use h264_vaapi if you can, since this saves cpu resources by offloading encoding to the gpu. Closing for now, since there are ways to use High profile with wf-recorder.