LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-28-2017, 08:12 PM   #1
Mr. Macintosh
Member
 
Registered: Sep 2015
Distribution: Debian
Posts: 273

Rep: Reputation: 56
Handbrake GPU Acceleration - Inexpensive AMD GPU for Old PC


My "ripping rig" is an older PC from 2010 with a 2.93 GHz Intel Core 2 Duo. Unfortunately, I can't really afford to replace it right now.

I recently got into Blu-Rays. I've converted all of my Blu-Rays to DRM-free MKV files, but now they're taking up a lot of space on my hard drive. I'd like to be able to reduce the size of those MKV files.

Unfortunately, the CPU in my ripping rig is too slow to be able to convert them in a reasonable amount of time. I started converting a 30 GB movie from a Blu-Ray to a MP4 file - in the hopes that conversion would shrink the file while retaining a decent level of quality - but Handbrake said it would take 5 hours, so I stopped it after about 20 minutes. I found out recently that Hardware acceleration works quite well in Handbrake and can drastically lower transcode times. On a laptop with an Intel Sandy Bridge CPU with Intel Quick Sync, that same movie could be transcoded in around 2.25 hours, which is more reasonable than 5 hours.

I've also discovered that AMD GPUs can handle OpenCL tasks twice as well as Nvidia GPUs in the same price bracket.

I was hoping to be able to get this done without spending too much. Would an AMD R5 230 or R7 240 be good enough to do the job? How long would each of those take to shrink a 30 gigabyte MKV file by lowering the bitrate, etc? Would it be as fast as a Sandy Bridge CPU with Quick Sync or faster? How much faster or how much slower?

Last edited by Mr. Macintosh; 12-29-2017 at 01:37 PM. Reason: Removed References to Conversion in favor of Transcoding
 
Old 12-29-2017, 04:58 AM   #2
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 8,745
Blog Entries: 5

Rep: Reputation: 2141Reputation: 2141Reputation: 2141Reputation: 2141Reputation: 2141Reputation: 2141Reputation: 2141Reputation: 2141Reputation: 2141Reputation: 2141Reputation: 2141
Quote:
Originally Posted by Mr. Macintosh View Post
I'd like to be able to reduce the size of those MKV files by converting them to MP4 files.
this statement doesn't make much sense.
the container you use doesn't have much impact on file size.

a few things:

to get low filesize and high quality rips, you usually need to thoroughly test various settings and use a 2-pass technique which takes even more time.

if you have the hardware to play it back on, maybe you should try encoding to HEVC aka x265.
Before that, most rips available online used h264.
those are codecs, and not container formats.

you should be able to get full HD for 2GB/hour using h264, and about half that with x265.
(on my oldish desktop system that would be overkill already, half of that would be enough for me, assuming it's been encoded perfectly)

audio has a relatively minor effect on overall filesize but shouldn't be ignored either.

i cannot say anything about hardware recommendations.
i'd say the CPU is too slow (or you just leave the machine running for days on end).

Last edited by ondoho; 12-29-2017 at 04:59 AM.
 
Old 12-29-2017, 01:31 PM   #3
Mr. Macintosh
Member
 
Registered: Sep 2015
Distribution: Debian
Posts: 273

Original Poster
Rep: Reputation: 56
Quote:
Originally Posted by ondoho View Post
this statement doesn't make much sense.
the container you use doesn't have much impact on file size.

a few things:

to get low filesize and high quality rips, you usually need to thoroughly test various settings and use a 2-pass technique which takes even more time.

if you have the hardware to play it back on, maybe you should try encoding to HEVC aka x265.
Before that, most rips available online used h264.
those are codecs, and not container formats.

you should be able to get full HD for 2GB/hour using h264, and about half that with x265.
(on my oldish desktop system that would be overkill already, half of that would be enough for me, assuming it's been encoded perfectly)

audio has a relatively minor effect on overall filesize but shouldn't be ignored either.

i cannot say anything about hardware recommendations.
i'd say the CPU is too slow (or you just leave the machine running for days on end).
I'l keep that in mind. I'll see what I can find out about those settings.

But yeah, I know the CPU is way too slow. That's why I'm asking about AMD GPUs - so I can use the GPU in place of the CPU for most or all of the computations required for converting/downscaling/whatever for getting the file sizes down while retaining as much quality as possible. I've read that GPUs have been advancing faster than CPUs in recent years and are often faster than CPUs. I also figure that a GPU from this year or a couple years ago will be a lot faster than a CPU from 7 years ago.
 
Old 12-29-2017, 03:01 PM   #4
_roman_
Member
 
Registered: Dec 2017
Location: _Austro_Bavaria_
Distribution: gentoo / linux mint
Posts: 433

Rep: Reputation: 28
Handbrake is a bit weird.

I played around a bit before I gave up, postponed it for later.

You need to pay attention where you set those checkmarks on each box.

Also from gentoo wise standpoint, you need to pay attention to the useflags which handbrake ebuild supports. I managed to get my nvidia card supported but it was a bit hidden for a first time handbrake user. The next run was a bit faster

I'm not sure if I would bother with a "2010 with a 2.93 GHz Intel Core 2 Duo" when my i7-3610qm is already a bit slow for basic holiday videos from an old cheap digital camera with source videos in 640x480.

Also those video codecs, which is better and such. Is such an endless topic. x265 has maybe no hardware support, but x264 should afaik have hardware support in modern hardware.
 
Old 12-29-2017, 03:55 PM   #5
jefro
Moderator
 
Registered: Mar 2008
Posts: 18,254

Rep: Reputation: 2728Reputation: 2728Reputation: 2728Reputation: 2728Reputation: 2728Reputation: 2728Reputation: 2728Reputation: 2728Reputation: 2728Reputation: 2728Reputation: 2728
Doesn't handbrake use either ffmpeg or libav but in either case they are the common tools. Not sure anything less than a xeon or high end i7 or Ryzen would do. I've ripped on a dual 8 core xeon and it puts a nice i7 to shame.
 
Old 12-30-2017, 11:02 AM   #6
Mr. Macintosh
Member
 
Registered: Sep 2015
Distribution: Debian
Posts: 273

Original Poster
Rep: Reputation: 56
Quote:
Originally Posted by ondoho View Post
this statement doesn't make much sense.
the container you use doesn't have much impact on file size.

a few things:

to get low filesize and high quality rips, you usually need to thoroughly test various settings and use a 2-pass technique which takes even more time.

if you have the hardware to play it back on, maybe you should try encoding to HEVC aka x265.
Before that, most rips available online used h264.
those are codecs, and not container formats.

you should be able to get full HD for 2GB/hour using h264, and about half that with x265.
(on my oldish desktop system that would be overkill already, half of that would be enough for me, assuming it's been encoded perfectly)

audio has a relatively minor effect on overall filesize but shouldn't be ignored either.

i cannot say anything about hardware recommendations.
i'd say the CPU is too slow (or you just leave the machine running for days on end).
I'm starting to get it. MKV and MP4 are formats and that formats are containers. I also found out that H.264, H.265, MPEG-2 and MPEG-4 are codecs, which go inside those containers.

I also found out thatyou can speed up the conversion of an MKV file from a Blu-Ray by keeping the MKV format and having Handbrake convert the MPEG2-like file(s) in the MKV to H.264. By making this change, I was able to speed up the conversion of I, Robot from the original 135-minute time down to 100 minutes – a 26% reduction in transcoding time.

Last edited by Mr. Macintosh; 12-30-2017 at 11:03 AM.
 
Old 12-31-2017, 02:19 AM   #7
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 8,745
Blog Entries: 5

Rep: Reputation: 2141Reputation: 2141Reputation: 2141Reputation: 2141Reputation: 2141Reputation: 2141Reputation: 2141Reputation: 2141Reputation: 2141Reputation: 2141Reputation: 2141
good!

please be aware that transcoding from one compressed format to another is likely to cause degradation, just like with audio formats.

i would assume that only the original disk (dvd or bluray) is uncompressed video, and everything you rip from it is somehow reduced.
 
Old 01-01-2018, 01:17 PM   #8
Mr. Macintosh
Member
 
Registered: Sep 2015
Distribution: Debian
Posts: 273

Original Poster
Rep: Reputation: 56
Quote:
Originally Posted by ondoho View Post
good!

please be aware that transcoding from one compressed format to another is likely to cause degradation, just like with audio formats.

i would assume that only the original disk (dvd or bluray) is uncompressed video, and everything you rip from it is somehow reduced.
I'd probably have gone directly from the Blu-Ray to H.264, but MakeMKV just removes DRM from optical discs and puts their contents in an MKV container. I would have used Handbrake, but I was under the impression that it couldn't handle commercial Blu-Rays which have DRM.
 
Old 01-03-2018, 03:11 PM   #9
_roman_
Member
 
Registered: Dec 2017
Location: _Austro_Bavaria_
Distribution: gentoo / linux mint
Posts: 433

Rep: Reputation: 28
H.264. is afaik hardware supported usually and therefore faster

The issue i had with handbrake. my samsung android tablet ("fake samsung android") SM-T580 could not play the sound from such a file lol
 
  


Reply

Tags
amd, blu ray, handbrake, opencl, transcode


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Handbrake : GPU acceleration DBabo Linux - Software 4 10-05-2016 04:27 PM
how can I setup the amd GPU as a default gpu instead of intel graphics? divinefishersmith Linux - Newbie 33 08-22-2015 06:03 PM
Tried to swap GPU in HP workstation. GPU not working good. LexMK Linux - Hardware 1 06-21-2013 06:59 PM
LXer: Firefox 6 Should Sort Out Linux GPU Acceleration LXer Syndicated Linux News 0 05-07-2011 09:00 AM
LXer: Chromium gets GPU acceleration LXer Syndicated Linux News 0 08-30-2010 05:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration