Win How to (batch) convert Videos to h265:
#1
Hello,

now that Kodi can handle h265 i am thinking about converting most of my videos to the new codec in order to free up some space.
Is there a tool out there that can do this "automatically"? I do not want to to this by hand for hundrets of video files Smile.
And if there is already a program for it: what settings do you recommend for the use of h265?

What I try to achieve is:
- keep the Audio stream(s) untouced (if there are any audio streams)
- transcode the current video stream to h265 keeping the quality as good as possible (i know that reencoding/compressing already compressed video files leads to a lower quality overall but the sources are very good most of the time and i like to see how it works out in practice)
Reply
#2
Handbrake CLI

https://forum.handbrake.fr/index.php
Reply
#3
Ahhh didnt know that Handbrake supports h265 already, thanks a lot!
Reply
#4
I started converting a little while back. This is the shell script I put together:

Code:
#!/bin/bash

# this script is to automatically convert a folder of video files to H.265
# You need to change SRC -- Source folder and DEST -- Destination folder

SRC=/home/xxx/videos/in
DEST=/home/xxx/videos/out
DEST_EXT=mp4
HANDBRAKE_CLI=HandBrakeCLI

for FILE in `ls $SRC`
do
        filename=$(basename $FILE)
        extension=${filename##*.}
        filename=${filename%.*}

        $HANDBRAKE_CLI -i $SRC/$FILE -o $DEST/$filename.$DEST_EXT -e x265 -q 20 -E av_aac --custom-anamorphic --keep-display-aspect -O
done

I don't use windoze, so not sure how it would be done with it.

It sure takes fast hardware. I won't live long enough to convert all my media myself.

Reply
#5
Man this takes ages, lol.

8-12 hours for each Video and i don't even know the "best settings" to use.
It seems like CRF20 in h265 has the same visual quality as CRF18-16 in h264 by a much smaller file size (a ~10gb video file is around 6-7 gb in x265).

so MAYBE i could even use CRF25 and geht the same quality by even smaller files but the time required for each encode (and thus test) is huge.
damn it at this speed it will take months, if not years to reencode everything lol.

maybe i wait until there is some kind of hardware acceleration available....


Is here someone who has already some experiences with handbrake / h265 and could give me some advices on the recommended settings?


€dit:
ok... based on https://forum.handbrake.fr/viewtopic.php?f=6&t=31484 it looks like CRF20 is a good compromise for x265 :-).
Reply
#6
in according to handbrake thake this https://vidcoder.codeplex.com/
Reply
#7
HandBrake is widely used to convert videos on Windows, Mac and Linux. But batch video conversion isn't supported by HandBrake until the release of HandBrake 0.9.5. You may also encounter some troubles while using HandBrake to convert videos in batches, say, unknown errors while adding to queue, sudden crash while in operation, badly slow video conversion or cannot open the files converted by HandBrake, etc. If you are still struggling with HandBrake a lot, you'd better choose a HandBrake alternative which will not let you Google answers to questions like "how to batch convert", "how to built iPhone presets", "how to fix HandBrake errors" etc.

Pavtube Video Converter Ultimate is a popular all-in-one video software program workable for any SD/HD/Blu-ray/DVD video to H.265 conversion and video editing.
Reply
#8
Handbrake, FFmpeg, Brorsoft Video Converter are all supports converting videos to H.265. And the video app I'm using is from Brorsoft, which is one of the best among all available H.265 video converters in the market.

It is an all-in-one H.265 decoder, encoder, converter and player. Not only can it allow people to convert H.265 to common video files, but also convert SD/HD videos (M2TS, MTS, MKV, H.264, MP4, AVI, TS, WMV, MOV, MPEG, etc.) to H.265 with several mouse clicks.

http://www.brorsoft.cn/tutorial/encoding...5-mp4.html
Reply
#9
Has anyone run conversions from H264 to H265 using new Intel Skylake kit and Windows 10? How long does it take to convert an original quality 20GB file? When I ran a test on my Haswell i5 / Nvidia GPU machine last Summer -- before the Windows 10 rollout -- Pavtube took way too many hours (a day) to convert an MKV orginally ripped with MakeMKV. And it looks like the GPU acceleration has not been working with Pavtube since Windows 10 came along. I'd be looking at a year to convert my library. The 16TB on my RAID server are starting to get a bit full though. So I am wondering if a new PC might help enough with conversions. But it may just be more efficient to plug in another bunch of drives via SATA extension to the back of my NAS, or to stack NAS drives over my ethernet network.

Playback Equipment: Thecus N5550 NAS - Netgear GS724Tv4 switch - Minix Neo X8-H player (or PC for ATMOS files) - Marantz SR7009 receiver with extra power amp
Reply
#10
Hey guys,... has anyone tried to use a GPU with handbrake... or do you have any idea how to accomplish this?

thanks
Reply
#11
(2015-10-21, 16:19)Carousel Wrote: Has anyone run conversions from H264 to H265 using new Intel Skylake kit and Windows 10? How long does it take to convert an original quality 20GB file?

Key (for those readers who may not know): AVC is h264 or x264. Likewise, HEVC is h265 or x265. x264 and x265 are specific open encoder implementations of their respective encoding formats (AVC & HEVC). h264 and h265 are not necessarily open implementations of the same encoding formats, but are often used to refer to AVC and HEVC formatted encodes or encoding. The AVC and HEVC formats set the rules, the h/x264/5 software/hardware follows those rules to compress images. It's simple but confusing at the same time. Here, I'll avoid using AVC & HEVC and stick to referring to the tools used, rather than reference the rules they fallow or the type of file they create.

You didn't ask specifically about QuickSync (QSV), but I just ran through several days of testing h/x265 on my new box; used various settings; did QSV/GPU and x265/CPU encoding; did 30 or so encodes of the same 2h:20m file; and did some comparative h/x264 encodes also. In retrospection, in the future I'll test on shorter 1 or 10 minute files.

System details:
  • Intel Skylake i5 6600K (stock),
  • 16gb DDR4 RAM,
  • Windows 10,
  • Samsung Pro SSDs,
  • with a sweet high end MOBO and a secondary discrete GPU (the INTEL GPU was only used for QSV encoding).

Encoding Software: Currently using StaxRip to test QSV, as it handles QSV better than Handbrake or other apps I've tested (more options & more up to date).

Original Video: 5gb 1080p, 2h:20m, x264 (ditched audio, so it didn't effect encode times). Bigger files will likely take longer, but these results paint a picture worth looking at.

Encode Settings / Constant Quality (CQ) = results (watch the Frames Per Second)

Code:
QSV h265 CQ25 fastest       =   26min / 2.41gb         195 fps/avg
QSV h265 CQ25 balanced      =   50min / 2.31gb          75 fps/avg
QSV h265 CQ25 best          =   90min / 2.30gb          25 fps/avg (real-time encode)

Result Quality: Trash, all across the board. The video looks like a very fast CQ30+ x264/CPU rip. They're garbage, and the files are even larger than the x264/CPU equivalents.

Conclusion: QuickSync (QSV) is not 'yet' meant to do video archiving, it's only ready for fast on-the-fly decoding & low-quality encoding/transcoding; which is great for streaming. But if you're not Netflix, and you want quality archive video, stick to CPU rendering with software encoders (x265).

For Comparison, x265 (v1.8) main profile via Handbrake (nightly), same system, same file:

Code:
CPU x265 CQ25 medium   =   135min /  ~1GB   23 fps/avg (real-time encode, an improvement in size & speed over x265 v1.5)

Results: Not really noticeably different from the original without really close inspection. At normal sitting distance only dark and fast paced scenes where a little more blocky. And the x265 v1.7 encode was substantially smaller than the equivalent x265 v1.5 encodes I had done previously during this test run; which encoded at ~15 fps. That's a big improvement in x265 encoding performance.

Note: h264 QSV also looks like crap on best settings. The QuickSync system isn't yet ready for archiving. I've read the same regarding other GPU encoding solutions too.

Also note: The quality of the CQ25 x265 medium encode was comparable to a CQ~28 x264 very slow encode that takes about the same amount of time, but the x265 is smaller; so a CQ~21 x265 medium is probably about the sweet spot for lossless looking lossy HD x265 encodes. The x265 slow setting doubled the encoding time using x265 v1.5.

Cheers.
Reply
#12
Thank you so much for the information. And apologies that I am so late responding so. It seems I did not have eMail notification turned on for this thread. And I was happily distracted by being able to play ATMOS films over the Nvidia Shield during the holidays. I am now down to my last TB on my NAS. But I can now ditch DVD versions of BR films since my new kitchen tablet (Lenovo Android 5 with Atom processor was a holiday bargin) can play Blurays over WiFi. This will free up a TB from deleting just DVD duplicates, never mind other films that just sit there and take up space. So I can squeeze another 100 Blurays in there, and forego re-processing all my AVC(264) files into HEVC(265) for a while yet. I can also push out getting new PC hardware until the Summer. The Shield helps with that for playback. If I expand my NAS, then I may just get an i5 NUC Skylake (only Intel HD, no separate GPU). Will replace this in turn when 4K and HDMI 2,x are more relevant. Would like to give some business to AMD actually. But I understand that their next gen processors will be along later than this Summer.
Thecus N5550 NAS - Nvidia Shield - Marantz SR7009 with 7.1.4 - LG 55LA6918
Reply
#13
Hi,

i start to convert in H265 my movie but i don't want to modify the audio and subtitle.
i don't find the good way to do it
do you knows the magic command with handbrake?

tk you
Reply
#14
Hi.
I'm the author of MKV-Buddy, a tool to (batch) convert video files and add metadata and Kodi- compatible .nfo files.
http://www.softpedia.com/get/Multimedia/...uddy.shtml

Inside my program HandbrakeCli is used for transcoding so I'm very familiar with it. Right now there is no "good" or "fast" way to use handbrake for h265 transcoding. It is slow as hell and did not preserve any space compared to h264, means the resulting quality is not better than h264 at the same file size.

The only program I know of that is fast enough is DVDFab, but only if you own a modern NVidia GPU...
Reply
#15
Transcoding is not the proper way of judging a codec's relative merits. I think that when transcoding from H.264 to H.265 one can in any case save some space while mantaining acceptable quality. This assuming you transcode from BD quality H.264. If you transcode material that's already been transcoded... well, you must lower your expectations. IMO.
For troubleshooting and bug reporting please make sure you read this first (usually it's enough to follow instructions in the second post).
Reply

Logout Mark Read Team Forum Stats Members Help
How to (batch) convert Videos to h265:0