Kagami / mpv_slicing

Cut video fragments with mpv

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Help changing the container/codec

ScribbleGhost opened this issue · comments

This is strictly not an issue, but I am trying to modify the script to make an MP4 file instead.

I switched out rawvideo with libx264 and avi with mp4:

local o = {
    target_dir = "~",
    vcodec = "libx264",
    acodec = "pcm_s16le",
    prevf = "",
    vf = "format=yuv444p16$hqvf,scale=in_color_matrix=$matrix,format=bgr24",
    hqvf = "",
    postvf = "",
    opts = "",
    ext = "mp4",
    command_template = [[
        ffmpeg -v warning -y -stats
        -ss $shift -i "$in" -t $duration
        -c:v $vcodec -c:a $acodec $audio
        -vf $prevf$vf$postvf $opts "$out.$ext"
    ]],
}

However, it still outputs a video as MKV (the input source).

ffmpeg -hwaccel auto -ss 1.168 -i "C:\\Users\\admin\\Desktop\\samples.mkv" -t 4.254 -c:v copy -c:a copy  -map 0 -sn  "C:\\Users\\admin\\Desktop\\samples - 00-00-1.168-00-00-5.422.mkv"

Any help with this would be greatly appreciated.