JuliaIO / VideoIO.jl

Reading and writing of video files in Julia via ffmpeg
https://juliaio.github.io/VideoIO.jl/stable
Other
125 stars 53 forks source link

libx264 being noisy and ignoring loglevel #390

Closed IanButterworth closed 1 year ago

IanButterworth commented 1 year ago

We shouldn't be seeing any of this because of https://github.com/JuliaIO/VideoIO.jl/blob/cac77da5451504eb0092717f6aae1804078d8ad8/src/VideoIO.jl#L127

┌ VideoIO [d6d074c3-1acf-5d4c-9a43-ef38773959a2]
│  [libx264 @ 0x1e0f5c0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
│  [libx264 @ 0x1e0f5c0] profile High, level 1.0, 4:0:0, 8-bit
│  [libx264 @ 0x1e0f5c0] 264 - core 163 - H.264/MPEG-4 AVC codec - Copyleft 2003-2021 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=0 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=1 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=2 keyint=250 keyint_min=24 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
│  [libx264 @ 0x1e0f5c0] frame I:2     Avg QP:32.50  size:    92
│  [libx264 @ 0x1e0f5c0] frame P:8     Avg QP:33.88  size:    99
│  [libx264 @ 0x1e0f5c0] mb I  I16..4:  0.0%  0.0% 100.0%
│  [libx264 @ 0x1e0f5c0] mb P  I16..4:  0.0%  0.0% 100.0%  P16..4:  0.0%  0.0%  0.0%  0.0%  0.0%    skip: 0.0%
│  [libx264 @ 0x1e0f5c0] 8x8 transform intra:0.0%
│  [libx264 @ 0x1e0f5c0] coded y intra: 100.0%
│  [libx264 @ 0x1e0f5c0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 26% 23% 27%  5%  2%  2%  4%  4%  6%
│  [libx264 @ 0x1e0f5c0] i8c dc,h,v,p: 100%  0%  0%  0%
│  [libx264 @ 0x1e0f5c0] Weighted P-Frames: Y:0.0%
│  [libx264 @ 0x1e0f5c0] kb/s:18.68
│  [libx264 @ 0x28af9c0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
│  [libx264 @ 0x28af9c0] profile High 4:4:4 Predictive, level 1.0, 4:4:4, 8-bit
│  [libx264 @ 0x28af9c0] 264 - core 163 - H.264/MPEG-4 AVC codec - Copyleft 2003-2021 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=4 threads=1 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=2 keyint=250 keyint_min=24 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
│  [libx264 @ 0x28af9c0] frame I:1     Avg QP:34.00  size:    86
│  [libx264 @ 0x28af9c0] frame P:9     Avg QP:33.78  size:   102
│  [libx264 @ 0x28af9c0] mb I  I16..4:  0.0%  0.0% 100.0%
│  [libx264 @ 0x28af9c0] mb P  I16..4:  0.0%  0.0% 100.0%  P16..4:  0.0%  0.0%  0.0%  0.0%  0.0%    skip: 0.0%
│  [libx264 @ 0x28af9c0] 8x8 transform intra:0.0%
│  [libx264 @ 0x28af9c0] coded y,u,v intra: 100.0% 0.0% 0.0%
│  [libx264 @ 0x28af9c0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 26% 22% 28%  4%  1%  4%  4%  4%  7%
│  [libx264 @ 0x28af9c0] Weighted P-Frames: Y:0.0% UV:0.0%
│  [libx264 @ 0x28af9c0] kb/s:19.32
└  
giordano commented 1 year ago

For future reference, the problem was that https://github.com/JuliaIO/VideoIO.jl/blob/cac77da5451504eb0092717f6aae1804078d8ad8/src/VideoIO.jl#L127 is inside the __init__ function, but that's not run during precompilation of the package, so we have to silence also the precompilation block itself.