MaartenBaert / ssr

SimpleScreenRecorder, a screen recorder for Linux
http://www.maartenbaert.be/simplescreenrecorder/
GNU General Public License v3.0
2.59k stars 290 forks source link

"Specified pix_fmt is not supported" Error trying to record in x264 #110

Open cartman-2000 opened 10 years ago

cartman-2000 commented 10 years ago

I get this error while trying to record with x264, I've tried both libav and ffmpeg on my computer and both do the same.

I'm running gentoo as my OS.

Output in the console after hitting the record button(this is with livav installed.). ==================== Starting SSR ==================== SimpleScreenRecorder: 0.1.2 Qt: header 4.8.5, lib 4.8.5 libavformat: header 54.20.3, lib 54.20.3 libavcodec: header 54.35.0, lib 54.35.0 libavutil: header 52.3.0, lib 52.3.0 libswscale: header 2.1.1, lib 2.1.1 [DetectCPUFeatures] CPU features: mmx sse sse2 sse3 ssse3 sse4_1 sse4_2 avx [FastScaler::FastScaler] BGRA to YUV420 converter: SSSE3 [PageRecord::PageStart] Starting page ... [PageRecord::PageStart] Started page. [PageRecord::RecordStart] Starting recording ... [Muxer::Init] Using format matroska (Matroska). [BaseEncoder::CreateCodec] Using codec libx264 (libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10). [libx264 @ 0xd88020] Specified pix_fmt is not supported [BaseEncoder::CreateCodec] Error: Can't open codec! [PageRecord::RecordStart] Error: Something went wrong during initialization.

Same output but with ffmpeg installed. ==================== Starting SSR ==================== SimpleScreenRecorder: 0.1.2 Qt: header 4.8.5, lib 4.8.5 libavformat: header 54.63.104, lib 54.63.104 libavcodec: header 54.92.100, lib 54.92.100 libavutil: header 52.18.100, lib 52.18.100 libswscale: header 2.2.100, lib 2.2.100 [DetectCPUFeatures] CPU features: mmx sse sse2 sse3 ssse3 sse4_1 sse4_2 avx [FastScaler::FastScaler] BGRA to YUV420 converter: SSSE3 [PageRecord::PageStart] Starting page ... [PageRecord::PageStart] Started page. [PageRecord::RecordStart] Starting recording ... [Muxer::Init] Using format matroska (Matroska). [BaseEncoder::CreateCodec] Using codec libx264 (libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10). [libx264 @ 0xc5baf0] Specified pixel format yuv420p is invalid or not supported [BaseEncoder::CreateCodec] Error: Can't open codec! [PageRecord::RecordStart] Error: Something went wrong during initialization.

Edit: it fails to work if you have x264 configured with 10bit encoding support.

MaartenBaert commented 10 years ago

SSR always uses YUV420 (8-bit), so you should configure x264 in such a way that it supports that. I've never tried to compile it with 10-bit support, maybe doing so disables 8-bit support?

cartman-2000 commented 10 years ago

That seems to be the case, compiling x264 encoder with 10bit encoding disables 8bit encoding.