jueves, 28 de septiembre de 2017

mkv_extract_subtitle_3.cmd

mkv_extract_subtitle_3.cmd

for %%x in (*.mkv) do c:\dvdz\mkvtoolnix\mkvextract.exe tracks "%%x"  3:"%%~nx.srt"
pause




mkv_extract_subtitle_4.cmd
for %%x in (*.mkv) do c:\dvdz\mkvtoolnix\mkvextract.exe tracks "%%x"  4:"%%~nx.srt"
pause


chromecast_hd_4m.cmd

SET FFMPEG="C:\dvdz\ffmpeg\ffmpeg.exe"

@ECHO OFF

FOR %%a IN ("*.mkv") DO (

title chrome "%%a"

%FFMPEG% -i "%%a" -c:v libx264 -profile:v high -level 4 -crf 18 -maxrate 4M -bufsize 16M -pix_fmt yuv420p -vf "scale=iw*sar:ih, scale='if(gt(iw,ih),min(1920,iw),-1)':'if(gt(iw,ih),-1,min(1080,ih))'" -x264opts bframes=3:cabac=1 -movflags faststart -c:a copy -y "%%~na".chrome.mkv

)

pause

https://pastebin.com/N9Z4rDpz

jueves, 21 de septiembre de 2017

Convertir videos a 2FPS-29.9FP¨S para Youtube (still images)

paso 1

render2fps.cmd
c:\dvdz\ffmpeg\ffmpeg  -i "1.mp4" -r 4 -crf 0 output2.mp4


paso 2

render29fps.cmd
c:\dvdz\ffmpeg\ffmpeg  -i output2.mp4 -r 29.97 -crf 0   -max_muxing_queue_size 4000 output.mp4

--

opcional rotar 180º (en paso 1)

c:\dvdz\ffmpeg\ffmpeg  -i "1.MP4" -r 2 -crf 0  -vf "hflip,vflip"   output2.mp4


miércoles, 20 de septiembre de 2017

FFMPEG X264 encode



ffmpeg -i MyMovie.mkv -vf scale=-1:720 -c:v libx264 -crf 0 -preset veryslow -c:a copy MyMovie_720p.mkv

ffmpeg -i MyMovie.mkv -vf scale=-1:720 -c:v libx264 -crf 18 -preset veryslow -c:a copy MyMovie_720p.mkv

The range of the quantizer scale is 0-51: where 0 is lossless, 23 is default, and 51 is worst possible. A lower value is a higher quality and a subjectively sane range is 18-28. Consider 18 to be visually lossless or nearly so: it should look the same or nearly the same as the input but it isn't technically lossless.

The range is exponential, so increasing the CRF value +6 is roughly half the bitrate while -6 is roughly twice the bitrate. General usage is to choose the highest CRF value that still provides an acceptable quality. If the output looks good, then try a higher value and if it looks bad then choose a lower value.