Skip to content

Instantly share code, notes, and snippets.

@nico-lab
nico-lab / libaom-av1.txt
Last active June 20, 2023 13:04
ffmpeg -h encoder=libaom-av1
Encoder libaom-av1 [libaom AV1]:
General capabilities: dr1 delay threads
Threading capabilities: other
Supported pixel formats: yuv420p yuv422p yuv444p gbrp yuv420p10le yuv422p10le yuv444p10le yuv420p12le yuv422p12le yuv444p12le gbrp10le gbrp12le gray gray10le gray12le
libaom-av1 encoder AVOptions:
-cpu-used <int> E..V....... Quality/Speed ratio modifier (from 0 to 8) (default 1)
-auto-alt-ref <int> E..V....... Enable use of alternate reference frames (2-pass only) (from -1 to 2) (default -1)
-lag-in-frames <int> E..V....... Number of frames to look ahead at for alternate reference frame selection (from -1 to INT_MAX) (default -1)
-arnr-max-frames <int> E..V....... altref noise reduction max frame count (from -1 to INT_MAX) (default -1)
-arnr-strength <int> E..V....... altref noise reduction filter strength (from -1 to 6) (default -1)
@nico-lab
nico-lab / libsvtav1.txt
Last active March 14, 2024 13:04
ffmpeg -h encoder=libsvtav1
Encoder libsvtav1 [SVT-AV1(Scalable Video Technology for AV1) encoder]:
General capabilities: delay threads
Threading capabilities: other
Supported pixel formats: yuv420p yuv420p10le
libsvtav1 AVOptions:
-preset <int> E..V....... Encoding preset (from -2 to 13) (default -2)
-crf <int> E..V....... Constant Rate Factor value (from 0 to 63) (default 0)
-qp <int> E..V....... Initial Quantizer level value (from 0 to 63) (default 0)
-svtav1-params <dictionary> E..V....... Set the SVT-AV1 configuration using a :-separated list of key=value parameters
@nico-lab
nico-lab / relative.txt
Last active March 21, 2022 02:33
fieldhintフィルタのhintファイル
0,0
0,-1
0,-1
0,0
0,0
@nico-lab
nico-lab / helper.py
Created January 26, 2022 11:27
https://ikyle.me/blog/2020/add-mp4-chapters-ffmpeg より時間とチャプター名からチャプターをつくるPythonスクリプト
import re
chapters = list()
with open('chapters.txt', 'r') as f:
for line in f:
x = re.match(r"(\d):(\d{2}):(\d{2}) (.*)", line)
hrs = int(x.group(1))
mins = int(x.group(2))
secs = int(x.group(3))
@nico-lab
nico-lab / ffmpeg_libplacebo.txt
Last active July 12, 2023 11:53
ffmpeg -h filter=libplacebo
Filter libplacebo
Apply various GPU filters from libplacebo
Inputs:
dynamic (depending on the options)
Outputs:
#0: default (video)
libplacebo AVOptions:
inputs <int> ..FV....... Number of inputs (from 1 to INT_MAX) (default 1)
w <string> ..FV....... Output video frame width (default "iw")
h <string> ..FV....... Output video frame height (default "ih")
@nico-lab
nico-lab / stack.txt
Last active January 17, 2022 11:13
枠をつけて4つの映像を並べる
-i "Video1" -i "Video2" -i "Video3" -i "Video4" -filter_complex \
[0:v]setpts=PTS-STARTPTS,scale=640x360[upperleft];\
[1:v]setpts=PTS-STARTPTS,scale=640x360[upperright];\
[2:v]setpts=PTS-STARTPTS,scale=640x360[lowerleft];\
[3:v]setpts=PTS-STARTPTS,scale=640x360[lowerright];\
[upperleft][upperright][lowerleft][lowerright]interleave=4,tile=2x2:0:5:5:aqua,fps=30/1.001
@nico-lab
nico-lab / aframe.txt
Last active February 20, 2022 05:45
v5.0 ffprobe -select_streams a:0 -show_frames -i input -read_intervals %+#1
[FRAME]
media_type=audio
stream_index=2
key_frame=1
pts=1993782708
pts_time=22153.141200
pkt_dts=1993782708
pkt_dts_time=22153.141200
best_effort_timestamp=1993782708
best_effort_timestamp_time=22153.141200
@nico-lab
nico-lab / vframe.txt
Last active March 7, 2023 04:07
v5.0 ffprobe -select_streams v:0 -show_frames -i input -read_intervals %+#5
[FRAME]
media_type=video
stream_index=1
key_frame=1
pts=1993837265
pts_time=22153.747389
pkt_dts=N/A
pkt_dts_time=N/A
best_effort_timestamp=1993837265
best_effort_timestamp_time=22153.747389
@nico-lab
nico-lab / ffmpeg_libvmaf.csv
Created April 3, 2021 00:03
ffmpeg_libvmaf.csv
Frame Width Height adm2 motion2 vif_scale0 vif_scale1 vif_scale2 vif_scale3 vmaf
0 320 240 0.9268 0.0000 0.5068 0.7620 0.8254 0.8740 65.7555
1 320 240 0.9174 1.8324 0.4925 0.7473 0.8151 0.8701 65.4456
2 320 240 0.8998 1.9342 0.4980 0.7574 0.8237 0.8737 62.4622
3 320 240 0.8979 1.9342 0.4798 0.7344 0.8077 0.8641 61.0755
4 320 240 0.9184 1.9834 0.4859 0.7528 0.8216 0.8710 66.0990
5 320 240 0.9125 1.9834 0.4929 0.7416 0.8108 0.8652 64.1663
6 320 240 0.9159 2.1269 0.4902 0.7516 0.8221 0.8730 65.9060
7 320 240 0.9158 2.1269 0.4858 0.7319 0.8034 0.8576 64.3028
8 320 240 0.9228 2.0837 0.5010 0.7655 0.8363 0.8858 68.5830
@nico-lab
nico-lab / ffmpeg_libvmaf.xml
Created April 3, 2021 00:02
ffmpeg_libvmaf.xml
<?xml version="1.0"?>
<VMAF version="1.5.3">
<params model="" scaledWidth="320" scaledHeight="240" subsample="1" num_bootstrap_models="0" bootstrap_model_list_str="" />
<fyi numOfFrames="25" aggregateVMAF="66.1411" execFps="189.906" timeTaken="0.131644" />
<frames>
<frame frameNum="0" adm2="0.926847" motion2="0" vif_scale0="0.506797" vif_scale1="0.762021" vif_scale2="0.825417" vif_scale3="0.874003" vmaf="65.7555" />
<frame frameNum="1" adm2="0.917362" motion2="1.8324" vif_scale0="0.4925" vif_scale1="0.747333" vif_scale2="0.815065" vif_scale3="0.870112" vmaf="65.4456" />
<frame frameNum="2" adm2="0.899799" motion2="1.93424" vif_scale0="0.498032" vif_scale1="0.757406" vif_scale2="0.823688" vif_scale3="0.873688" vmaf="62.4622" />
<frame frameNum="3" adm2="0.89788" motion2="1.93424" vif_scale0="0.479801" vif_scale1="0.734414" vif_scale2="0.807743" vif_scale3="0.864091" vmaf="61.0755" />
<frame frameNum="4" adm2="0.918362" motion2="1.98341" vif_scale0="0.485932" vif_scale1="0.752795" vif_scale2="0.821