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

[0.4.1] Fails to record webm with "Error: Can't write header!" #779

Open hartwork opened 4 years ago

hartwork commented 4 years ago

Any ideas what I might be doing wrong?

[PageRecord::StartPage] Starting page ...
[PageRecord::StartPage] Started page.
[PageRecord::StartInput] Starting input ...
[X11Input::Init] Using X11 shared memory.
[PageRecord::StartInput] Started input.
[X11Input::InputThread] Input thread started.
[PageRecord::StopInput] Stopping input ...
[X11Input::~X11Input] Stopping input thread ...
[X11Input::InputThread] Input thread stopped.
[PageRecord::StopInput] Stopped input.
[PageRecord::StartOutput] Starting output ...
[Muxer::Init] Using format webm (WebM).
[Muxer::AddStream] Using codec libx264 (libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10).
[VideoEncoder::PrepareStream] Using pixel format nv12.
[BaseEncoder::EncoderThread] Encoder thread started.
[Muxer::Start] Error: Can't write header!
[BaseEncoder::~BaseEncoder] Stopping encoder thread ...
[BaseEncoder::EncoderThread] Encoder thread stopped.
[PageRecord::StartOutput] Error: Something went wrong during initialization.

Best, Sebastian

MaartenBaert commented 4 years ago

Please post the corresponding complete log (including internal messages) from ~/.logs. Or upgrade to version 0.4.1 which displays internal errors in the GUI log window as well.

hartwork commented 4 years ago

Hi!

I don't have a ~/.logs/ folder it seems. Could it be called differently?

# find ~/.ssr/ | sed "s,${USER},user,g"
/home/user/.ssr/
/home/user/.ssr/settings.conf
/home/user/.ssr/output-profiles
/home/user/.ssr/logs
/home/user/.ssr/logs/log-2017-09-13_22.01.51.txt
/home/user/.ssr/input-profiles

PS: I seems like my distro does have 0.4.1 by now, let me give it a try.

hartwork commented 4 years ago

This is from 0.4.1 now. I guess the "libx264" lines are what you are looking for?

[PageRecord::StartPage] Starting page ...
[PageRecord::StartPage] Started page.
[PageRecord::StartOutput] Starting output ...
[Muxer::Init] Using format webm (WebM).
[Muxer::AddStream] Using codec libx264 (libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10).
[VideoEncoder::PrepareStream] Using pixel format nv12.
[libx264 @ 0x56182eb088e0] using SAR=1/1
[libx264 @ 0x56182eb088e0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 0x56182eb088e0] profile Progressive High, level 1.2, 4:2:0, 8-bit
[libx264 @ 0x56182eb088e0] 264 - core 157 - H.264/MPEG-4 AVC codec - Copyleft 2003-2019 - http://www.videolan.org/x264.html - options: cabac=1 ref=1 deblock=1:0:0 analyse=0x3:0x3 me=dia subme=1 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=4 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=1 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 pb_ratio=1.30 aq=1:1.00
[webm @ 0x56182ea71c90] Only VP8 or VP9 or AV1 video and Vorbis or Opus audio and WebVTT subtitles are supported for WebM.
[Muxer::Start] Error: Can't write header!
[BaseEncoder::~BaseEncoder] Stopping encoder thread ...
[BaseEncoder::EncoderThread] Encoder thread started.
[BaseEncoder::EncoderThread] Encoder thread stopped.
[PageRecord::StartOutput] Error: Something went wrong during initialization.
MaartenBaert commented 4 years ago

Yes I meant ~/.ssr/logs. The relevant error is this:

[webm @ 0x56182ea71c90] Only VP8 or VP9 or AV1 video and Vorbis or Opus audio and WebVTT subtitles are supported for WebM.

You've selected a codec (H.264) that is incompatible with the chosen container (WebM). Try using the MKV container instead.

hartwork commented 4 years ago

I see — thank you! I picked MP4 and now things work. I completely overlooked it. I scanned through the options looking for important ones and missed that part.

Any chance the selection of an unsupported codec could be made to block the continue button?

Looking at #379, I think @lightonflux had the exact same problem.

MaartenBaert commented 4 years ago

MP4 is a bad idea, see #221. I said MKV for a reason ;).

hartwork commented 4 years ago

I will keep it in mind, thanks.

And thanks for sharing ssr as software libre. It's a great gift to the community. :pray: