• Техника
  • Улучшение изображения с помощью нейросетей [AI-UPSCALE] (p.295)
2024/02/07 12:06:10
shurik_pronkin
Друзья, помогите понять, почему с пайпом получается меньший битрей и соответственно размер файла?
 
--------- ffv1 10bit с пайпом - Bit rate: 451 Mb/s ---------
 
ffmpeg "-hide_banner" "-i" "C:/vto/pushie-proba.avi" "-sws_flags" "spline+accurate_rnd+full_chroma_int" "-color_trc" "2" "-colorspace" "2" "-color_primaries" "2" "-filter_complex" "tvai_fi=model=chf-3:slowmo=1:rdt=-0.000001:fps=50:device=0:vram=1:instances=0,tvai_up=model=gcg-5:scale=0:w=1920:h=1440:device=0:vram=1:instances=0,scale=w=1920:h=1440:flags=lanczos:threads=0" "-strict" "-1" "-pix_fmt" "yuv420p" "-f" "yuv4mpegpipe" "-" | "C:\avs2\ffmpeg_32.exe" -nostdin -y -f yuv4mpegpipe -i - -c:v ffv1 -coder 1 -context 1 -g 1 -slices 4 -pix_fmt yuv420p10le "C:/vto/pushie-1.avi"
 
--------- ffv1 10bit без пайпа - Bit rate : 731 Mb/s ---------
 
ffmpeg "-hide_banner" "-i" "C:/vto/pushie-proba.avi" "-sws_flags" "spline+accurate_rnd+full_chroma_int" "-color_trc" "2" "-colorspace" "2" "-color_primaries" "2" "-filter_complex" "tvai_fi=model=chf-3:slowmo=1:rdt=-0.000001:fps=50:device=0:vram=1:instances=0,tvai_up=model=gcg-5:scale=0:w=1920:h=1440:device=0:vram=1:instances=0,scale=w=1920:h=1440:flags=lanczos:threads=0" "-c:v" "ffv1" "-pix_fmt" "yuv420p10le" "-slices" "4" "-slicecrc" "1" "-g" "1" "C:/vto/pushie-2.avi"
2024/02/07 12:42:14
TOPAZAVR
shurik_pronkin
Друзья, помогите понять, почему с пайпом получается меньший битрей и соответственно размер файла?
 
--------- ffv1 10bit с пайпом - Bit rate: 451 Mb/s ---------
 
ffmpeg "-hide_banner" "-i" "C:/vto/pushie-proba.avi" "-sws_flags" "spline+accurate_rnd+full_chroma_int" "-color_trc" "2" "-colorspace" "2" "-color_primaries" "2" "-filter_complex" "tvai_fi=model=chf-3:slowmo=1:rdt=-0.000001:fps=50:device=0:vram=1:instances=0,tvai_up=model=gcg-5:scale=0:w=1920:h=1440:device=0:vram=1:instances=0,scale=w=1920:h=1440:flags=lanczos:threads=0" "-strict" "-1" "-pix_fmt" "yuv420p" "-f" "yuv4mpegpipe" "-" | "C:\avs2\ffmpeg_32.exe" -nostdin -y -f yuv4mpegpipe -i - -c:v ffv1 -coder 1 -context 1 -g 1 -slices 4 -pix_fmt yuv420p10le "C:/vto/pushie-1.avi"
 
--------- ffv1 10bit без пайпа - Bit rate : 731 Mb/s ---------
 
ffmpeg "-hide_banner" "-i" "C:/vto/pushie-proba.avi" "-sws_flags" "spline+accurate_rnd+full_chroma_int" "-color_trc" "2" "-colorspace" "2" "-color_primaries" "2" "-filter_complex" "tvai_fi=model=chf-3:slowmo=1:rdt=-0.000001:fps=50:device=0:vram=1:instances=0,tvai_up=model=gcg-5:scale=0:w=1920:h=1440:device=0:vram=1:instances=0,scale=w=1920:h=1440:flags=lanczos:threads=0" "-c:v" "ffv1" "-pix_fmt" "yuv420p10le" "-slices" "4" "-slicecrc" "1" "-g" "1" "C:/vto/pushie-2.avi"


 
Зачем разные параметры кодирования?
  1. -coder 1 -context 1
  2. -slicecrc 1
2024/02/07 12:59:10
shurik_pronkin
TOPAZAVR
shurik_pronkin
Друзья, помогите понять, почему с пайпом получается меньший битрей и соответственно размер файла?
 
--------- ffv1 10bit с пайпом - Bit rate: 451 Mb/s ---------
 
ffmpeg "-hide_banner" "-i" "C:/vto/pushie-proba.avi" "-sws_flags" "spline+accurate_rnd+full_chroma_int" "-color_trc" "2" "-colorspace" "2" "-color_primaries" "2" "-filter_complex" "tvai_fi=model=chf-3:slowmo=1:rdt=-0.000001:fps=50:device=0:vram=1:instances=0,tvai_up=model=gcg-5:scale=0:w=1920:h=1440:device=0:vram=1:instances=0,scale=w=1920:h=1440:flags=lanczos:threads=0" "-strict" "-1" "-pix_fmt" "yuv420p" "-f" "yuv4mpegpipe" "-" | "C:\avs2\ffmpeg_32.exe" -nostdin -y -f yuv4mpegpipe -i - -c:v ffv1 -coder 1 -context 1 -g 1 -slices 4 -pix_fmt yuv420p10le "C:/vto/pushie-1.avi"
 
--------- ffv1 10bit без пайпа - Bit rate : 731 Mb/s ---------
 
ffmpeg "-hide_banner" "-i" "C:/vto/pushie-proba.avi" "-sws_flags" "spline+accurate_rnd+full_chroma_int" "-color_trc" "2" "-colorspace" "2" "-color_primaries" "2" "-filter_complex" "tvai_fi=model=chf-3:slowmo=1:rdt=-0.000001:fps=50:device=0:vram=1:instances=0,tvai_up=model=gcg-5:scale=0:w=1920:h=1440:device=0:vram=1:instances=0,scale=w=1920:h=1440:flags=lanczos:threads=0" "-c:v" "ffv1" "-pix_fmt" "yuv420p10le" "-slices" "4" "-slicecrc" "1" "-g" "1" "C:/vto/pushie-2.avi"


Зачем разные параметры кодирования?
  1. -coder 1 -context 1
  2. -slicecrc 1




1. такую строку нашел в https://trac.ffmpeg.org/wiki/Encode/FFV1 , если slicecrc вообще не заявлять по умолчанию все равно будет 1
 
 
Сделаю одинаковые параметры и сравню.
2024/02/07 13:12:02
shurik_pronkin
--------- ffv1 10bit с пайпом - Bit rate: 487 Mb/s ---------
 
ffmpeg "-hide_banner" "-i" "C:/vto/pushie-proba.avi" "-sws_flags" "spline+accurate_rnd+full_chroma_int" "-color_trc" "2" "-colorspace" "2" "-color_primaries" "2" "-filter_complex" "tvai_fi=model=chf-3:slowmo=1:rdt=-0.000001:fps=50:device=0:vram=1:instances=0,tvai_up=model=gcg-5:scale=0:w=1920:h=1440:device=0:vram=1:instances=0,scale=w=1920:h=1440:flags=lanczos:threads=0" "-strict" "-1" "-pix_fmt" "yuv420p" "-f" "yuv4mpegpipe" "-" | "C:\avs2\ffmpeg_32.exe" -nostdin -y -f yuv4mpegpipe -i - -c:v ffv1 -slicecrc 1 -g 1 -slices 4 -pix_fmt yuv420p10le "C:/vto/pushie-pipe.avi"
 
General
Complete name : C:\vto\pushie-pipe.avi
Format : AVI
Format/Info : Audio Video Interleave
File size : 254 MiB
Duration : 4 s 380 ms
Overall bit rate mode : Variable
Overall bit rate : 487 Mb/s
Frame rate : 50.000 FPS
Writing application : Lavf60.5.100
Video
ID : 0
Format : FFV1
Format version : Version 3.4
Format settings, GOP : N=1
Codec ID : FFV1
Duration : 4 s 380 ms
Bit rate mode : Variable
Bit rate : 487 Mb/s
Width : 1 920 pixels
Height : 1 440 pixels
Display aspect ratio : 4:3
Frame rate : 50.000 FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 10 bits
Scan type : Progressive
Compression mode : Lossless
Bits/(Pixel*Frame) : 3.521
Stream size : 254 MiB (100%)
coder_type : Range Coder
MaxSlicesCount : 4
ErrorDetectionType : Per slice
 
--------- ffv1 10bit без пайпа - Bit rate: 769 Mb/s ---------
 
ffmpeg "-hide_banner" "-i" "C:/vto/pushie-proba.avi" "-sws_flags" "spline+accurate_rnd+full_chroma_int" "-color_trc" "2" "-colorspace" "2" "-color_primaries" "2" "-filter_complex" "tvai_fi=model=chf-3:slowmo=1:rdt=-0.000001:fps=50:device=0:vram=1:instances=0,tvai_up=model=gcg-5:scale=0:w=1920:h=1440:device=0:vram=1:instances=0,scale=w=1920:h=1440:flags=lanczos:threads=0" "-c:v" "ffv1" "-pix_fmt" "yuv420p10le" "-slices" "4" "-slicecrc" "1" "-g" "1" "C:/vto/pushie-no-pipe.avi"
 
General
Complete name : C:\vto\pushie-no-pipe.avi
Format : AVI
Format/Info : Audio Video Interleave
File size : 402 MiB
Duration : 4 s 380 ms
Overall bit rate mode : Variable
Overall bit rate : 769 Mb/s
Frame rate : 50.000 FPS
Writing application : Lavf60.20.100
Video
ID : 0
Format : FFV1
Format version : Version 3.4
Format settings, GOP : N=1
Codec ID : FFV1
Duration : 4 s 380 ms
Bit rate mode : Variable
Bit rate : 769 Mb/s
Width : 1 920 pixels
Height : 1 440 pixels
Display aspect ratio : 4:3
Frame rate : 50.000 FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 10 bits
Scan type : Progressive
Compression mode : Lossless
Bits/(Pixel*Frame) : 5.564
Stream size : 402 MiB (100%)
coder_type : Range Coder
MaxSlicesCount : 4
ErrorDetectionType : Per slice
 
 
По скорости пайп чуть быстрее:
 
пайп: frame=  219 fps=1.3 q=-0.0 Lsize=  260222kB time=00:00:04.38 bitrate=488929.9kbits/s speed=0.0257x
 
не-пайп: frame=  219 fps=1.2 q=-0.0 Lsize=  411232kB time=00:00:04.38 bitrate=769135.6kbits/s speed=0.0247x
2024/02/07 13:51:00
TOPAZAVR
shurik_pronkin
Спойлер

--------- ffv1 10bit с пайпом - Bit rate: 487 Mb/s ---------
 
ffmpeg "-hide_banner" "-i" "C:/vto/pushie-proba.avi" "-sws_flags" "spline+accurate_rnd+full_chroma_int" "-color_trc" "2" "-colorspace" "2" "-color_primaries" "2" "-filter_complex" "tvai_fi=model=chf-3:slowmo=1:rdt=-0.000001:fps=50:device=0:vram=1:instances=0,tvai_up=model=gcg-5:scale=0:w=1920:h=1440:device=0:vram=1:instances=0,scale=w=1920:h=1440:flags=lanczos:threads=0" "-strict" "-1" "-pix_fmt" "yuv420p" "-f" "yuv4mpegpipe" "-" | "C:\avs2\ffmpeg_32.exe" -nostdin -y -f yuv4mpegpipe -i - -c:v ffv1 -slicecrc 1 -g 1 -slices 4 -pix_fmt yuv420p10le "C:/vto/pushie-pipe.avi"
 
General
Complete name : C:\vto\pushie-pipe.avi
Format : AVI
Format/Info : Audio Video Interleave
File size : 254 MiB
Duration : 4 s 380 ms
Overall bit rate mode : Variable
Overall bit rate : 487 Mb/s
Frame rate : 50.000 FPS
Writing application : Lavf60.5.100
Video
ID : 0
Format : FFV1
Format version : Version 3.4
Format settings, GOP : N=1
Codec ID : FFV1
Duration : 4 s 380 ms
Bit rate mode : Variable
Bit rate : 487 Mb/s
Width : 1 920 pixels
Height : 1 440 pixels
Display aspect ratio : 4:3
Frame rate : 50.000 FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 10 bits
Scan type : Progressive
Compression mode : Lossless
Bits/(Pixel*Frame) : 3.521
Stream size : 254 MiB (100%)
coder_type : Range Coder
MaxSlicesCount : 4
ErrorDetectionType : Per slice
 
--------- ffv1 10bit без пайпа - Bit rate: 769 Mb/s ---------
 
ffmpeg "-hide_banner" "-i" "C:/vto/pushie-proba.avi" "-sws_flags" "spline+accurate_rnd+full_chroma_int" "-color_trc" "2" "-colorspace" "2" "-color_primaries" "2" "-filter_complex" "tvai_fi=model=chf-3:slowmo=1:rdt=-0.000001:fps=50:device=0:vram=1:instances=0,tvai_up=model=gcg-5:scale=0:w=1920:h=1440:device=0:vram=1:instances=0,scale=w=1920:h=1440:flags=lanczos:threads=0" "-c:v" "ffv1" "-pix_fmt" "yuv420p10le" "-slices" "4" "-slicecrc" "1" "-g" "1" "C:/vto/pushie-no-pipe.avi"
 
General
Complete name : C:\vto\pushie-no-pipe.avi
Format : AVI
Format/Info : Audio Video Interleave
File size : 402 MiB
Duration : 4 s 380 ms
Overall bit rate mode : Variable
Overall bit rate : 769 Mb/s
Frame rate : 50.000 FPS
Writing application : Lavf60.20.100
Video
ID : 0
Format : FFV1
Format version : Version 3.4
Format settings, GOP : N=1
Codec ID : FFV1
Duration : 4 s 380 ms
Bit rate mode : Variable
Bit rate : 769 Mb/s
Width : 1 920 pixels
Height : 1 440 pixels
Display aspect ratio : 4:3
Frame rate : 50.000 FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 10 bits
Scan type : Progressive
Compression mode : Lossless
Bits/(Pixel*Frame) : 5.564
Stream size : 402 MiB (100%)
coder_type : Range Coder
MaxSlicesCount : 4
ErrorDetectionType : Per slice
 
 
По скорости пайп чуть быстрее:
 
пайп: frame=  219 fps=1.3 q=-0.0 Lsize=  260222kB time=00:00:04.38 bitrate=488929.9kbits/s speed=0.0257x
 
не-пайп: frame=  219 fps=1.2 q=-0.0 Lsize=  411232kB time=00:00:04.38 bitrate=769135.6kbits/s speed=0.0247x
 
Спрятать


 
Для идеальности эксперимента попробуйте заменить C:\avs2\ffmpeg_32.exe на ffmpeg.exe (который из топаза).
2024/02/07 14:05:44
shurik_pronkin
У меня тоже подозрения не на сам пайп, а на версию или битность (?) ffmpeg.
2024/02/07 14:28:14
shurik_pronkin
--------- ffv1 10bit с пайпом - ffmpeg топазовский - Bit rate: 487 Mb/s (!) ---------
 
ffmpeg "-hide_banner" "-i" "C:/vto/pushie-proba.avi" "-sws_flags" "spline+accurate_rnd+full_chroma_int" "-color_trc" "2" "-colorspace" "2" "-color_primaries" "2" "-filter_complex" "tvai_fi=model=chf-3:slowmo=1:rdt=-0.000001:fps=50:device=0:vram=1:instances=0,tvai_up=model=gcg-5:scale=0:w=1920:h=1440:device=0:vram=1:instances=0,scale=w=1920:h=1440:flags=lanczos:threads=0" "-strict" "-1" "-pix_fmt" "yuv420p" "-f" "yuv4mpegpipe" "-" | "C:\avs2\ffmpeg_64_tpz_411.exe" -nostdin -y -f yuv4mpegpipe -i - -c:v ffv1 -slicecrc 1 -g 1 -slices 4 -pix_fmt yuv420p10le "C:/vto/pushie-no-pipe-2.avi"
 
General
Complete name : C:\vto\pushie-no-pipe-2.avi
Format : AVI
Format/Info : Audio Video Interleave
File size : 254 MiB
Duration : 4 s 380 ms
Overall bit rate mode : Variable
Overall bit rate : 487 Mb/s
Frame rate : 50.000 FPS
Writing application : Lavf60.20.100
Video
ID : 0
Format : FFV1
Format version : Version 3.4
Format settings, GOP : N=1
Codec ID : FFV1
Duration : 4 s 380 ms
Bit rate mode : Variable
Bit rate : 487 Mb/s
Width : 1 920 pixels
Height : 1 440 pixels
Display aspect ratio : 4:3
Frame rate : 50.000 FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 10 bits
Scan type : Progressive
Compression mode : Lossless
Bits/(Pixel*Frame) : 3.521
Stream size : 254 MiB (100%)
coder_type : Range Coder
MaxSlicesCount : 4
ErrorDetectionType : Per slice
 
frame=  219 fps=1.3 q=-0.0 Lsize=  260222kB time=00:00:04.38 bitrate=486697.4kbits/s speed=0.026x
 
Версия и битность ffmpeg  оказалась ни при чем. Что-то в самом пайпе  или топазовском внутреннем хозяйстве
2024/02/07 14:43:39
shurik_pronkin
MartinWest
shurik_pronkin
 на ВТО (VTO) в свой раздел.


Это что такое?




 
Это такой форум в интернете есть. Называется "Все Тут Online" = ВТО
2024/02/07 15:02:09
TOPAZAVR
shurik_pronkin
Спойлер

--------- ffv1 10bit с пайпом - ffmpeg топазовский - Bit rate: 487 Mb/s (!) ---------
 
ffmpeg "-hide_banner" "-i" "C:/vto/pushie-proba.avi" "-sws_flags" "spline+accurate_rnd+full_chroma_int" "-color_trc" "2" "-colorspace" "2" "-color_primaries" "2" "-filter_complex" "tvai_fi=model=chf-3:slowmo=1:rdt=-0.000001:fps=50:device=0:vram=1:instances=0,tvai_up=model=gcg-5:scale=0:w=1920:h=1440:device=0:vram=1:instances=0,scale=w=1920:h=1440:flags=lanczos:threads=0" "-strict" "-1" "-pix_fmt" "yuv420p" "-f" "yuv4mpegpipe" "-" | "C:\avs2\ffmpeg_64_tpz_411.exe" -nostdin -y -f yuv4mpegpipe -i - -c:v ffv1 -slicecrc 1 -g 1 -slices 4 -pix_fmt yuv420p10le "C:/vto/pushie-no-pipe-2.avi"
 
General
Complete name : C:\vto\pushie-no-pipe-2.avi
Format : AVI
Format/Info : Audio Video Interleave
File size : 254 MiB
Duration : 4 s 380 ms
Overall bit rate mode : Variable
Overall bit rate : 487 Mb/s
Frame rate : 50.000 FPS
Writing application : Lavf60.20.100
Video
ID : 0
Format : FFV1
Format version : Version 3.4
Format settings, GOP : N=1
Codec ID : FFV1
Duration : 4 s 380 ms
Bit rate mode : Variable
Bit rate : 487 Mb/s
Width : 1 920 pixels
Height : 1 440 pixels
Display aspect ratio : 4:3
Frame rate : 50.000 FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 10 bits
Scan type : Progressive
Compression mode : Lossless
Bits/(Pixel*Frame) : 3.521
Stream size : 254 MiB (100%)
coder_type : Range Coder
MaxSlicesCount : 4
ErrorDetectionType : Per slice
 
frame=  219 fps=1.3 q=-0.0 Lsize=  260222kB time=00:00:04.38 bitrate=486697.4kbits/s speed=0.026x
 
Версия и битность ffmpeg  оказалась ни при чем. Что-то в самом пайпе  или топазовском внутреннем хозяйстве
Спрятать

 


 
Может попробовать заменить "-pix_fmt" "yuv420p" на "-pix_fmt" "yuv444p10".
Может картинка такая.
 

2024/02/07 15:23:08
shurik_pronkin
Оно :
 
ffmpeg "-hide_banner" "-i" "C:/vto/pushie-proba.avi" "-sws_flags" "spline+accurate_rnd+full_chroma_int" "-color_trc" "2" "-colorspace" "2" "-color_primaries" "2" "-filter_complex" "tvai_fi=model=chf-3:slowmo=1:rdt=-0.000001:fps=50:device=0:vram=1:instances=0,tvai_up=model=gcg-5:scale=0:w=1920:h=1440:device=0:vram=1:instances=0,scale=w=1920:h=1440:flags=lanczos:threads=0" "-strict" "-1" "-pix_fmt" "yuv444p10" "-f" "yuv4mpegpipe" "-" | "C:\avs2\ffmpeg_64_tpz_411.exe" -nostdin -y -f yuv4mpegpipe -i - -c:v ffv1 -slicecrc 1 -g 1 -slices 4 -pix_fmt yuv420p10le "C:/vto/pushie-no-pipe-2.avi"
 
General
Complete name : C:\vto\pushie-no-pipe-2.avi
Format : AVI
Format/Info : Audio Video Interleave
File size : 399 MiB
Duration : 4 s 380 ms
Overall bit rate mode : Variable
Overall bit rate : 764 Mb/s
Frame rate : 50.000 FPS
Writing application : Lavf60.20.100
Video
ID : 0
Format : FFV1
Format version : Version 3.4
Format settings, GOP : N=1
Codec ID : FFV1
Duration : 4 s 380 ms
Bit rate mode : Variable
Bit rate : 764 Mb/s
Width : 1 920 pixels
Height : 1 440 pixels
Display aspect ratio : 4:3
Frame rate : 50.000 FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 10 bits
Scan type : Progressive
Compression mode : Lossless
Bits/(Pixel*Frame) : 5.523
Stream size : 399 MiB (100%)
coder_type : Range Coder
MaxSlicesCount : 4
ErrorDetectionType : Per slice
© 2025 APG vNext Commercial Version 5.5

Use My Existing Forum Account

Use My Social Media Account