this post was submitted on 03 Jul 2025
1 points (100.0% liked)

It's A Digital Disease!

23 readers
1 users here now

This is a sub that aims at bringing data hoarders together to share their passion with like minded people.

founded 2 years ago
MODERATORS
 
The original post: /r/datahoarder by /u/abudab1 on 2025-07-02 22:26:45.

Download ffmpeg by typing in Powershell:

choco install ffmpeg-full

then create .bat file which contains:

@echo off
setlocal enabledelayedexpansion

REM Input and output folders
set "input=E:\Videos to encode"
set "output=C:\Output videos"

REM Create output root if it doesn't exist
if not exist "%output%" mkdir "%output%"

REM Loop through all .mp4, .mkv, .avi files recursively
for /r "%input%" %%f in (*.mp4 *.mkv *.avi) do (
    REM Get relative path
    set "relpath=%%~pf"
    set "relpath=!relpath:%input%=!"

    REM Create output directory
    set "outdir=%output%!relpath!"
    if not exist "!outdir!" mkdir "!outdir!"

    REM Output file path
    set "outfile=!outdir!%%~nf.mp4"

    REM Run ffmpeg encode
    echo Encoding: "%%f" to "!outfile!"
    ffmpeg -i "%%f" ^
    -c:v av1_nvenc ^
    -preset p7 -tune hq ^
    -cq 40 ^
    -temporal-aq 1 ^
-rgb_mode yuv420 ^
    -rc-lookahead 32 ^
    -c:a libopus -b:a 64k -ac 2 ^
    "!outfile!" -y
)

set "input=E:\Videos to encode"

set "output=C:\Output videos"

it will convert all videos (*.mp4 *.mkv *.avi) in this folder and subfolders to E:\Videos to encode

using Nvidia videcard(you need latest nvidia driver)

drastically lowers file size

no comments (yet)
sorted by: hot top controversial new old
there doesn't seem to be anything here