Wednesday, November 14, 2018

FFMPEG Shit

ffmpeg.exe -i "input.mkv" -f yuv4mpegpipe - | x265.exe - --y4m -o "output.265"

ffmpeg -i video.avi -vf "ass=subtitle.ass" out.avi

ffmpeg -i a.mkv -c:v libx264 -vf scale="-1:720" -pix_fmt yuv444p10le -preset slow -crf 24 -aq-mode 3 -c:a aac -b:a 128k -map_metadata -1 -map_chapters -1 -sn ee.mkv

1699, 23.976

ffmpeg -i a.mkv -c:v libx265 -pix_fmt yuv444p10le -preset slow -crf 24 -c:a libopus -b:a 128k d.mkv


--input-depth <integer>

ffmpeg.exe -i a.mkv -f yuv4mpegpipe -pix_fmt yuv420p -map_metadata -1 -map_chapters -1 -sn - | x265.exe --y4m --output-depth 12 --crf 16 --output bbb.mkv

ffmpeg -i a.mkv -f yuv4mpegpipe -pix_fmt yuv420p - | x265 --y4m --output bbb.mkv -

https://forum.videohelp.com/threads/380710-I-want-to-learn-x265-encoding-by-command-line

ffmpeg -i a.mkv -vf scale="-1:720" -f yuv4mpegpipe - | x265 --y4m --preset slow --crf 16 --high-tier --output bbb.mkv -

x265 --input - --output-depth 12 --y4m --profile main12 --qg-size 8 --limit-modes --no-open-gop --opt-ref-list-length-pps --radl 2 --lookahead-slices 0 --crf 18.00 --opt-qp-pps --cbqpoffs -2 --crqpoffs -2 --qpfile GENERATED_QP_FILE --limit-refs 0 --ssim-rd --psy-rd 2.50 --rdoq-level 2 --psy-rdoq 10.00 --qcomp 0.60 --aq-mode 0 --deblock=-1:-1 --limit-sao --range limited --colormatrix bt709 --output OUTPUTFILE


LoadPlugin("H:\Megui\tools\ffms\ffms2.dll")
FFVideoSource("H:\[Tsundere] Clannad (2018) [BDRemux h264 1920x1080 LPCM]\[Tsundere] Clannad - 02 (2018) [BDRemux h264 1920x1080 LPCM].mkv", fpsnum=24000, fpsden=1001, threads=1)
#deinterlace
#crop
Spline64Resize(1280,720) # Spline64 (Sharp)
#denoise

LoadPlugin("H:\Megui\tools\avisynth_plugin\VSFilter.dll")
TextSub("H:\[L0kalsubs] Sora yori mo Tooi Basho - 05v0 [720p][6ECBE169].ass", 1)

F:

chdir F:\Conversion\

for %%i in (*.avi) do (

"D:\Working Directory\x264\x264.exe" --ref 3 --bframes 3 --partitions p8x8,b8x8,i4x4,i8x8 --me umh --trellis 1 --subme 7 --merange 16 --keyint 250 --min-keyint 25 --b-adapt 1 --direct auto --weightb --mixed-refs --b-pyramid none --8x8dct --no-fast-pskip --level 3.1 --crf 19 --video-filter resize:624,352,1:1:lanczos --threads auto --output "D:\Working Directory\%%~ni.264" "%%i"

"D:\Working Directory\x264\ffmpeg.exe"  -y -i "%%i" -vn -acodec libfaac -ab 192k -ac 2 "D:\Working Directory\%%~ni.m4a"

"D:\Working Directory\x264\mp4box.exe" -fps 23.976 -par 1=1:1 -add "D:\Working Directory\%%~ni.264" -add "D:\Working Directory\%%~ni.m4a" -new "D:\Working Directory\%%~ni.mp4" -tmp "D:\Temp"

del "D:\Working Directory\%%~ni.m4a"
del "D:\Working Directory\%%~ni.264"

)

pause


avs2yuv file.avs -o - | x264 - --demuxer y4m ...

for %%a in ("Source*.*") do @echo DirectShowSource("%%a") >> "batchScript.avs" && @echo MSharpen(10,120) >> "batchScript.avs" && ffmpeg -i "batchScript.avs" -n -c:v libx264 -crf 24 -c:a libmp3lame -b:a 192k "Target\%%~na.mp4" && del "batchScript.avs" pause

"%~dp0avs2yuv_x86.exe" Source.avs - | "%~dp0ffmpeg.exe" -y -i - -c:v libx264 -preset veryslow -crf 24 "Output.264"


setlocal

REM Where to Find ffmpeg
set FFMPEG="C:\BIN\ffmpeg.exe"

REM Where to get input file, No terminating Backslash, "." = current directory
set INDIR="."


REM Where to place output file, No terminating Backslash.
set OUTDIR=".\OUTPUT"


FOR %%A IN (*.wmv *.mpg *.avi *.flv *.mov *.mp4 *.m4v *.RAM *.RM) DO (
  %FFMPEG% -i "%INDIR%\%%A" -vn -acodec pcm_s16le "%OUTDIR%\%%~nxA.WAV"

)

Pause

ffmpeg.exe -i tes.avs -c:v libx264 -tune Film -crf 23 -preset fast Output.mp4

cd "H:\Tsuki ga Kirei" && call maso.bat && cd "H:\Keijo" && call maso.bat && cd "H:\Amaama" && call maso.bat

0 comments: