meoiswa / vrchat-transcode-utilities

Collection of utilities to make transcoding video suitable for streaming into VRChat easier
3 stars 4 forks source link

Parametrised command I use #10

Open philpax opened 5 months ago

philpax commented 5 months ago

Too lazy to update the script at this time, so I'm just making a note of the command I actually use so that I can look at this issue instead of looking through my command history:

ffmpeg -i video.mkv \
    # === PICK ONE OF:
    # ------ Bitmap subtitles:
    # -filter_complex "[0:v][0:s:0]overlay[v]" -map "[v]" \
    # ------ Text subtitles:
    # -map 0:v \
    # -vf "subtitles='video.mkv':si=0" \
    #
    # === Volume boosting:
    # -filter:a "volume=2" \
    -map 0:a:0 -c:v libx264 -pix_fmt yuv420p -crf 23 -preset veryfast \
    # === PICK ONE OF:
    # -tune film \
    # -tune animation \
    -c:a ac3 \
    # === OPTIONAL: Time filtering for sample
    # -ss 00:48:40 -t 00:05:00 \
    "output.mp4"

Example of text subtitles, no volume boosting, film, full length:

ffmpeg -i video.mkv \
    -map 0:v \
    -vf "subtitles='video.mkv':si=0" \
    -map 0:a:0 -c:v libx264 -pix_fmt yuv420p -crf 23 -preset veryfast \
    -tune film \
    -c:a ac3 \
    "output.mp4"

Example of bitmap subtitles, 2x volume boost, animation, 5 minute sample:

ffmpeg -i video.mkv \
    -filter_complex "[0:v][0:s:0]overlay[v]" -map "[v]" \
    -filter:a "volume=2" \
    -map 0:a:0 -c:v libx264 -pix_fmt yuv420p -crf 23 -preset veryfast \
    -tune animation \
    -c:a ac3 \
    -ss 00:48:40 -t 00:05:00 \
    "output.mp4"
philpax commented 5 months ago

For movies with a bad surround mix, you may need to downmix: -c:a ac3 -ac 2