还是单独开一个吧 每次找挺烦的
播放YUV序列
ffmpeg -f rawvideo -pix_fmt yuv420p -s 3840x2160 -i "Wood.yuv" -vf "scale=1280x720" -c:v rawvideo -pix_fmt yuv420p -f sdl "Wood"
4K序列转720P
ffmpeg -f rawvideo -pix_fmt yuv420p -s 3840x2160 -i "G:\xiph_dataset\2020tcsvt\YUV_4K\Traffic Flow.yuv" -vf "scale=1280x720" -c:v rawvideo -pix_fmt yuv420p -f rawvideo "G:\xiph_dataset\2020tcsvt\4K\Traffic Flow.yuv"
按100帧分割视频
for %i in ("G:\xiph_dataset\2020tcsvt\4K\*.yuv") do ffmpeg -pixel_format yuv420p -f rawvideo -s 1280x720 -i "%i" -vf format=yuv420p -f segment -segment_frames 100,200 -reset_timestamps 1 -map 0 "G:\xiph_dataset\2020tcsvt\100frame\%~ni_%03d.yuv"
按30帧分割视频
for %i in ("G:\xiph_dataset\2020tcsvt\100frame\*.yuv") do ffmpeg -pixel_format yuv420p -f rawvideo -s 1280x720 -i "%i" -vf format=yuv420p -f segment -segment_frames 30,60,90,120,150,180,210,240,270,300,330,360,390,420,450,480,510,540,570,600,630,660,690,720,750,780 -reset_timestamps 1 -map 0 "G:\xiph_dataset\2020tcsvt\my420\%~ni_%03d.yuv"
计算txt行中特殊字符数量
findstr /R /C:"0$" "D:\dls\2022TMM\root\list\local_5_30_test.txt" | find /C /V ""
findstr /R /C:"1$" "D:\dls\2022TMM\root\list\local_5_30_test.txt" | find /C /V ""
findstr /R /C:"2$" "D:\dls\2022TMM\root\list\local_5_30_test.txt" | find /C /V ""
YUV转PNG
for %i in ("C:\Users\hush\Desktop\TEST\*.yuv") do ffmpeg -s 1280x720 -i "%i" -vf "setpts=PTS-STARTPTS" -q:v 1 "C:\Users\hush\Desktop\TEST\%~ni_%2d.png"
for %i in ("D:\dls\2019TCSVT\local_exam\60M\recon\*.yuv") do ffmpeg -s 1280x720 -i "%i" -vf "setpts=PTS-STARTPTS" -q:v 1 "D:\dls\2022TMM\Dataset\5M_60M\pumap\1\%~ni_%2d.png"
for %i in ("D:\dls\2019TCSVT\local_exam\5M_30M_30M\recon\*.yuv") do ffmpeg -s 1280x720 -i "%i" -vf "setpts=PTS-STARTPTS" -q:v 1 "D:\dls\2022TMM\Dataset\5M_30M\pumap\2\%~ni_%2d.png"
for %i in ("D:\dls\2019TCSVT\local_exam\30M_30M\recon\*.yuv") do ffmpeg -s 1280x720 -i "%i" -vf "setpts=PTS-STARTPTS" -q:v 1 "D:\dls\2022TMM\Dataset\5M_30M\pumap\2\%~ni_%2d.png"
cd C:\Users\admin\Desktop\x265\x265_3.3\build\vc15-x86_64\Release
for %i in ("C:\Users\admin\Desktop\1\*.yuv") do x265.exe --preset slow --input "%i" --fps 60 --input-res 1280x720 --output "C:\Users\admin\Desktop\1\5M\%~ni_5M.bin" --recon "C:\Users\admin\Desktop\1\5M\%~ni_5M.yuv" --bitrate 5000 --keyint 10 --min-keyint 10 --no-scenecut --bframes 0 --rect --amp