https://chat.mistral.ai/work/8ce2a02c-813b-4b0a-be1b-5d2b50d60de6
seems complicated.
https://chatgpt.com/share/6ac14818-9054-83eb-b46d-35d2238a7a93
https://chatgpt.com/share/6ac14929-712c-83eb-a9fd-c537e5df4f80
does not help.
https://claude.ai/share/a3b9f533-1c39-4bae-94f3-6c167b41cdeb
- *Overlay or concat producing black*
- *Freeze a specific frame in the middle*
may help.
seems to work fine both for video and audio.
That is audio kept as is and black segments correctly retain last non-black frame and does not misbehave as the proposed Claude proposal when being back to mainly black launcher was faulty due to average and threshold not being as low as possible.
<details>
<summary>Bash script:</summary>
```bash
in=c.mp4
fps=$(ffprobe -v error -select_streams v:0 -of csv=p=0 -show_entries stream=r_frame_rate "$in")
ffmpeg -i "$in" -vf "signalstats,metadata=mode=select:key=lavfi.signalstats.YMAX:value=17:function=greater,fps=fps=$fps:start_time=0" -c:v libx265 -crf 18 -preset medium -pix_fmt yuv420p -c:a copy output.mp4
```
</details>
<details>
<summary>Output:</summary>
```
ffmpeg version 7.1.5-0+deb13u1 Copyright (c) 2000-2026 the FFmpeg developers
built with gcc 14 (Debian 14.2.0-19)
configuration: --prefix=/usr --extra-version=0+deb13u1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --disable-libmfx --disable-omx --enable-gnutls --enable-libaom --enable-libass --enable-libbs2b --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libglslang --enable-libgme --enable-libgsm --enable-libharfbuzz --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-openal --enable-opencl --enable-opengl --disable-sndio --enable-libvpl --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-ladspa --enable-libbluray --enable-libcaca --enable-libdvdnav --enable-libdvdread --enable-libjack --enable-libpulse --enable-librabbitmq --enable-librist --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libx264 --enable-libzmq --enable-libzvbi --enable-lv2 --enable-sdl2 --enable-libplacebo --enable-librav1e --enable-pocketsphinx --enable-librsvg --enable-libjxl --enable-shared
libavutil 59. 39.100 / 59. 39.100
libavcodec 61. 19.101 / 61. 19.101
libavformat 61. 7.103 / 61. 7.103
libavdevice 61. 3.100 / 61. 3.100
libavfilter 10. 5.100 / 10. 5.100
libswscale 8. 3.100 / 8. 3.100
libswresample 5. 3.100 / 5. 3.100
libpostproc 58. 3.100 / 58. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'c.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf61.7.103
Duration: 00:00:15.68, start: 0.000000, bitrate: 533 kb/s
Stream #0:0[0x1](und): Video: h264 (High 4:4:4 Predictive) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 1080x2340 [SAR 1:1 DAR 6:13], 434 kb/s, 13.72 fps, 13.72 tbr, 16240 tbn (default)
Metadata:
handler_name : VideoHandler
vendor_id : [0][0][0][0]
Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 94 kb/s (default)
Metadata:
handler_name : SoundHandler
vendor_id : [0][0][0][0]
File 'output.mp4' already exists. Overwrite? [y/N] y
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> hevc (libx265))
Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
x265 [info]: HEVC encoder version 4.1+1-1d117be
x265 [info]: build info [Linux][GCC 14.2.0][64 bit] 8bit+10bit+12bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
x265 [info]: Main profile, Level-5 (Main tier)
x265 [info]: Thread pool created using 16 threads
x265 [info]: Slices : 1
x265 [info]: frame threads / pool features : 4 / wpp(37 rows)
x265 [info]: Coding QT: max CU size, min CU size : 64 / 8
x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra
x265 [info]: ME / range / subpel / merge : hex / 57 / 2 / 3
x265 [info]: Keyframe min / max / scenecut / bias : 13 / 250 / 40 / 5.00
x265 [info]: Lookahead / bframes / badapt : 20 / 4 / 2
x265 [info]: b-pyramid / weightp / weightb : 1 / 1 / 0
x265 [info]: References / ref-limit cu / depth : 3 / off / on
x265 [info]: AQ: mode / str / qg-size / cu-tree : 2 / 1.0 / 32 / 1
x265 [info]: Rate Control / qCompress : CRF-18.0 / 0.60
x265 [info]: tools: rd=3 psy-rd=2.00 early-skip rskip mode=1 signhide tmvp
x265 [info]: tools: b-intra strong-intra-smoothing lslices=8 deblock sao
Output #0, mp4, to 'output.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf61.7.103
Stream #0:0(und): Video: hevc (hev1 / 0x31766568), yuv420p(tv, bt709, progressive), 1080x2340 [SAR 1:1 DAR 6:13], q=2-31, 13.72 fps, 16240 tbn (default)
Metadata:
handler_name : VideoHandler
vendor_id : [0][0][0][0]
encoder : Lavc61.19.101 libx265
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 94 kb/s (default)
Metadata:
handler_name : SoundHandler
vendor_id : [0][0][0][0]
frame= 12 fps= 12 q=19.1 size= 0KiB time=00:00:00.72 bitrate= 0.5kbits/frame= 38 fps= 25 q=24.0 size= 0KiB time=00:00:02.62 bitrate= 0.1kbits/frame= 38 fps= 19 q=24.0 size= 0KiB time=00:00:02.62 bitrate= 0.1kbits/frame= 60 fps= 24 q=17.5 size= 256KiB time=00:00:04.22 bitrate= 496.0kbits/frame= 101 fps= 34 q=21.0 size= 256KiB time=00:00:07.21 bitrate= 290.6kbits/frame= 132 fps= 38 q=21.0 size= 256KiB time=00:00:09.47 bitrate= 221.3kbits/frame= 157 fps= 39 q=22.0 size= 256KiB time=00:00:11.30 bitrate= 185.6kbits/frame= 177 fps= 39 q=20.9 size= 256KiB time=00:00:12.75 bitrate= 164.4kbits/[out#0/mp4 @ 0x55d93a775300] video:368KiB audio:180KiB subtitle:0KiB other streams:0KiB global headers:2KiB muxing overhead: 2.352386%
frame= 215 fps= 44 q=24.0 Lsize= 561KiB time=00:00:15.52 bitrate= 296.1kbits/s speed=3.18x
x265 [info]: frame I: 1, Avg QP:17.87 kb/s: 5849.36
x265 [info]: frame P: 75, Avg QP:20.52 kb/s: 391.78
x265 [info]: frame B: 139, Avg QP:23.37 kb/s: 43.22
x265 [info]: Weighted P-Frames: Y:6.7% UV:4.0%
encoded 215 frames in 4.78s (44.97 fps), 191.81 kb/s, Avg QP:22.35
```
</details>
seems to work fine both for video and audio.
That is audio kept as is and black segments correctly retain last non-black frame and does not misbehave as the proposed Claude proposal when being back to mainly black launcher was faulty due to average and threshold not being as low as possible.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Would help Benjamin_Loison/Voice_assistant/issues/57.
Related to #3.
DuckDuckGo and Google search ffmpeg keep last frame of following one is black.
The Super User question 1795530 may help.
https://chat.mistral.ai/work/8ce2a02c-813b-4b0a-be1b-5d2b50d60de6
seems complicated.
https://chatgpt.com/share/6ac14818-9054-83eb-b46d-35d2238a7a93
https://chatgpt.com/share/6ac14929-712c-83eb-a9fd-c537e5df4f80
does not help.
https://claude.ai/share/a3b9f533-1c39-4bae-94f3-6c167b41cdeb
may help.
I could proceed in Python frame by frame alternatively, but I suspect that it would be inefficient.
Shotcut Fairphone 4 LineageOS 23.2 export:
Output:
https://chat.mistral.ai/work/b15c2974-582b-4cd1-98d0-23f954851ed9
https://chatgpt.com/share/6ad1373c-0308-83eb-a5f1-76a92bf60e4f
https://claude.ai/share/1b90b366-89ff-4935-a16e-148af0f6f8b4
Wikipedia: Luma (video) (1351363170)
DuckDuckGo search YAVG and YAVG brightness.
https://ayosec.github.io/ffmpeg-filters-docs/4.1/Filters/Video/signalstats.html
Bash script:
Output:
seems to work fine both for video and audio.
That is audio kept as is and black segments correctly retain last non-black frame and does not misbehave as the proposed Claude proposal when being back to mainly black launcher was faulty due to average and threshold not being as low as possible.
Being 3 times faster than the recording seems fast enough on my Debian 13 GNOME Framework 13.
is unclear.
-c:v libx265is again necessary to play in VLC.Output:
Bash script:
seems to behave identically and being minimized.
Related to Benjamin-Loison/shotcut/issues/24.