FallingSnow / h265ize

A node utility utilizing ffmpeg to encode videos with the hevc codec.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

keep extension

aakhter opened this issue · comments

Is there a way to keep the file extension (eg. mkv, mp4) the same as the original file. This would of course mean matching the container...

No there is not.

I use a workaround with the find command
find "/Path/to/media/files" -type f -iname "*.mkv" -exec h265ize -v -m medium -q 25 --he-audio --delete {} \;
to select just the mkv files.
If I want to process mp4 files:
find "/Path/to/media/files" -type f -iname "*.mp4" -exec h265ize -v -m medium -q 25 -f mp4 --delete {} \;
which forces a mp4 output file.

Yes I use the 'dangerous' delete command but the files are on a ZFS server with automatic snapshots so I can always retrieve the original if necessary.