ammen99 / wf-recorder

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

audio recording for long time (30min+) causes audio drift

hholst80 opened this issue · comments

I noticed that I get rather OK audio to video correlation (no latency/drift between video and audio frame). However, after recording for >30 min I noticed there is a very visual/audible drift. Maybe not as much as 1 second, but more than 500ms. Is this something well/better understood by someone here and can assist with how to debug this?

This is how I am launching wf-recorder:

$ wf-recorder -a -F scale=1920:-1 -Cac3
selected region 0,0 0x0
Setting codec option: crf=20
Setting codec option: preset=ultrafast
Setting codec option: tune=zerolatency
Using video filter: scale=1920:-1
[libx264 @ 0x7f6f84003e40] using SAR=1/1
[libx264 @ 0x7f6f84003e40] MB rate (8160000000) > level limit (16711680)
[libx264 @ 0x7f6f84003e40] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x7f6f84003e40] profile High 4:4:4 Predictive, level 6.2, 4:4:4, 8-bit
[libx264 @ 0x7f6f84003e40] 264 - core 157 - H.264/MPEG-4 AVC codec - Copyleft 2003-2018 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=6 threads=4 lookahead_threads=4 sliced_threads=1 slices=4 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=20.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0
Setting codec option: crf=20
Setting codec option: preset=ultrafast
Setting codec option: tune=zerolatency
Choosing sample format fltp for audio codec ac3
Output #0, matroska, to 'recording.mkv':
  Stream #0:0: Video: h264 (libx264), yuv444p(pc), 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1
  Stream #0:1: Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
Using PulseAudio device: default
kkkkkkkkkkkk[libx264 @ 0x7f6f84003e40] frame I:2     Avg QP:14.50  size:374830
[libx264 @ 0x7f6f84003e40] frame P:257   Avg QP:14.68  size:  1741
[libx264 @ 0x7f6f84003e40] mb I  I16..4: 100.0%  0.0%  0.0%
[libx264 @ 0x7f6f84003e40] mb P  I16..4:  0.2%  0.0%  0.0%  P16..4:  0.8%  0.0%  0.0%  0.0%  0.0%    skip:99.0%
[libx264 @ 0x7f6f84003e40] coded y,u,v intra: 29.7% 12.0% 10.2% inter: 0.4% 0.1% 0.1%
[libx264 @ 0x7f6f84003e40] i16 v,h,dc,p: 58% 32%  7%  2%
[libx264 @ 0x7f6f84003e40] kb/s:36972292.00
...

with ffmpeg, you'd solve this with the option -async 1, but idk how to do it with libav*