thmsbfft / oryoki

Ōryōki [応量器] is an experimental web browser with a thin interface.
http://oryoki.io/
MIT License
484 stars 32 forks source link

[camera] ffmpeg encoding crashes on odd window dimensions #1

Closed thmsbfft closed 7 years ago

thmsbfft commented 8 years ago

Happens with window size close to square? 849*809, etc. Doesn't seem to happen with a perfect square.

Error: ffmpeg exited with code 1: Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height

thmsbfft commented 8 years ago

Could be resolved by changing MP4's encoding level/profile (higher level). Need to dig into that. See: https://github.com/fluent-ffmpeg/node-fluent-ffmpeg | "level"

thmsbfft commented 8 years ago

Update: this has to do with recording using odd numbers for window dimensions – the pixel format I use in ffmpeg (yuvj420p) only allows numbers divisible by 2.

Some notes: • yuvj420p allows to have a preview in MacOs's quick view in the finder. • another format, yuvj444p, doesn't care about dimensions but doesn't allow quick view. • ProRes (the other, lossless encoding setting available) works okay on odd window sizes.

For now, better to use even numbers for window sizes to record mp4s. This is easily done using the Window Helper (CMD+ALT+M)

thmsbfft commented 7 years ago

This was fixed in 9c1f00e (release 0.0.4). Closing now.