Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 AVC / H.264

Reply
 
Thread Tools Search this Thread Display Modes
Old 8th December 2017, 00:36   #1  |  Link
Bahamuth
Registered User
 
Join Date: Dec 2003
Location: Germany
Posts: 11
Questions about archiving my video files

Hello everyone,

after being absent for a long time, I thought, when I can get some good answers for my encoding questions, it might be here.

First I want to say, that there are surely many many threads about similar questions inside here, but I hope, my questions might be more current / better solved with more current versions of x264.

First my specifications:
CPU: Intel i7-3770s @3,9GHz
RAM: 16 GB
GPU: NVidia GeForce GTX 980
OS: Windows 7 Professional 64 bit
Software: StaxRip

Video sources I want to (re)encode:
DVD: MPEG2 720x576/540 (Amount: >200 DVDs)
BluRay: VC1/H264/MPEG2 1920x1080 (Amount: >30 BluRays)
Others: various formats with various resolutions, going down to 100x100 pixel (Amount: at least several hundreds I want to archive, some with rather old codecs like Duck TrueMotion)

What I want to achieve:
Encoding the various videos into a (mostly) single video format, placing them on my NAS. File size most probably isn't a problem (20 TB space), so I'm trying to achieve quality videos (yet I'd like not to have BluRays with 25 GB but maybe 10 or less after reencoding).

My questions:
x264 or x265?
I've read quite some sites and found various comments. Some say, x265 is better for streaming and x264 is better for archiving. Then again they say, x265 is better for videos in lower resolution. Considering my sources, which format should I choose? The input videos will have material of all kinds (real life, CGI, animations). Somewhere I've read, that starting from around 2500kbit/s x264 and x265 make a significant less difference in encoding.

CPU (x264/x265) or GPU (NVEnc)?
Should I encode with my CPU (which, depending on the quality settings, might be rather slow) or on my GPU (which runs like ten times faster)? Most comments I've read about this have stated, that NVEnc is better for streaming e.g. game play and such. Of course GPU runs faster, but it looks like the quality isn't close to the one via CPU encoded x264.

Encoding mode?
Which encoding mode should I use to achieve a suitable good quality to file size ratio? CBR with a specific bitrate per medium (e.g. 2500kbit for DVD, higher for BluRay etc.), VBR, CQ? Single Pass, Two Pass, Triple Pass?
I know that depending on the encoding mode, the encoding time will raise significantly.

Cropping black borders?
Something I have to admit I don't have looked up in the internet yet. Is it good or bad cropping away the black borders from a video? Does it even make the file any smaller? After all there always would be the same color, which should make it easy to be encoded as the pixels never will change during the whole video length. Or is it a bad idea when thinking about subtitles? But aren't they placed from the software? Let's say I crop a video from 720x576 to 720x500. When activating subtitles, the software most probably will place the subtitles beneath the video anyway, if I would watch the video in full screen, that is.

MKV or MP4?
More a less important question. Should I use MKV container or MP4 container? I'm used to work with MKVToolNix. Mp4ToolBox is something unknown for me.


I do my best to answer any questions which probably will follow.
Bahamuth is offline   Reply With Quote
Old 8th December 2017, 07:01   #2  |  Link
Asmodian
Registered User
 
Join Date: Feb 2002
Location: San Jose, California
Posts: 2,718
x264, x265 is very slow and at 1080p or lower HVEC doesn't off too much more efficiency. x265 is better when you are targeting only slightly worse quality than the source, if you want transparent encodes the advantage of HVEC is very minor or non-existent (and it is a LOT slower). For UHD video x265 is preferred.

x264 is much better quality than NVEnc.

CRF single pass, faster than two pass and size goes up and down as needed for each source.

No cropping, with that many encodes to do it is more trouble than it is worth. Encoding the black area is easy but the sharp line between the image and black border does take bits to encode. Depending on the way the subtitles were authored cropping could be fine or it could cause problems.

MKV.
__________________
madVR options explained
Asmodian is offline   Reply With Quote
Old 8th December 2017, 15:18   #3  |  Link
Bahamuth
Registered User
 
Join Date: Dec 2003
Location: Germany
Posts: 11
So let's say I have a bit more time, then I think using Two or Three Pass would slightly give more quality, right? But that also means I have to set up a kbit setting for the quality.

Currently when I reencode TV recordings, I use x264 with Quality "19 - High" and preset "Slower". This usually encodes with 25 to 50 fps for 720x576.
MediaInfo then shows me the total bitrate of those videos is between 1200 and 2000 kbit/s.
Bahamuth is offline   Reply With Quote
Old 9th December 2017, 03:05   #4  |  Link
Asmodian
Registered User
 
Join Date: Feb 2002
Location: San Jose, California
Posts: 2,718
Quote:
Originally Posted by Bahamuth View Post
So let's say I have a bit more time, then I think using Two or Three Pass would slightly give more quality, right? But that also means I have to set up a kbit setting for the quality.
No, at the same size crf and two pass give the same quality. Two pass is only useful when targeting a specific bitrate. Three pass is never useful as far as I know (use placebo instead if you have time to waste).

Quote:
Originally Posted by Bahamuth View Post
Currently when I reencode TV recordings, I use x264 with Quality "19 - High" and preset "Slower". This usually encodes with 25 to 50 fps for 720x576.
MediaInfo then shows me the total bitrate of those videos is between 1200 and 2000 kbit/s.
For archival I would use quality 17 (or lower), preset veryslow, and tune film, but otherwise that sounds good to me.
__________________
madVR options explained
Asmodian is offline   Reply With Quote
Old 9th December 2017, 11:54   #5  |  Link
Bahamuth
Registered User
 
Join Date: Dec 2003
Location: Germany
Posts: 11
Great, thank you!

Another question:
8 bit or 10 bit?
x264 executable comes in both ways. Would it even make any difference for me?

oh an another things
are B-frames bad?
I've read a sentence or two about B frames making the playback bad depending on the device.
Bahamuth is offline   Reply With Quote
Old 10th December 2017, 12:34   #6  |  Link
Gser
Registered User
 
Join Date: Apr 2008
Posts: 317
Quote:
Originally Posted by Bahamuth View Post
Great, thank you!

Another question:
8 bit or 10 bit?
x264 executable comes in both ways. Would it even make any difference for me?

oh an another things
are B-frames bad?
I've read a sentence or two about B frames making the playback bad depending on the device.
There is literally no hardware support for 10 bit h.264 and not a whole lot of software support either.

B-frames aren't bad as long as you stick to blu-ray specs, max 4 ref and max 3 b frames for 1080, for lower resolutions you can use more. But I suppose just using intra frame encoding will make your encodes have less generational loss if that is a concern. It will make files sizes a lot bigger though.
Gser is offline   Reply With Quote
Old 11th December 2017, 17:02   #7  |  Link
Taurus
Registered User
 
Taurus's Avatar
 
Join Date: Mar 2002
Location: Krautland
Posts: 783
A many players and televisions wont play High@L5.
So do yourself a favour and crank your encoding settings down to High@L4.1 or for the safe side High@L4.0.
And why did you encode your interlaced sources as progressive?
Did you deinterlace them with Avisynth or similars?
Taurus is offline   Reply With Quote
Old 12th December 2017, 03:37   #8  |  Link
kuchikirukia
Registered User
 
Join Date: Oct 2014
Posts: 351
Quote:
Originally Posted by Taurus View Post
And why did you encode your interlaced sources as progressive?
Did you deinterlace them with Avisynth or similars?
They'd be hard telecined.
Why would you ever encode anything as interlaced?
kuchikirukia is offline   Reply With Quote
Old 12th December 2017, 11:30   #9  |  Link
Bahamuth
Registered User
 
Join Date: Dec 2003
Location: Germany
Posts: 11
I haven't set the profile level. It most probably was selected automatically from StaxRip. Profile and Level are both set to Unrestricted within the x264 options.

StaxRip uses TDeint for deinterlacing.
Bahamuth is offline   Reply With Quote
Old 12th December 2017, 12:48   #10  |  Link
Bahamuth
Registered User
 
Join Date: Dec 2003
Location: Germany
Posts: 11
Quote:
do a rip without reencoding
So for DVDs it would be e.g. a MKV with MPEG2 inside. Do all hardware players who support MKV also support MPEG2-Streams inside? I would have thought x264 is a bit more compatible in there.
Bahamuth is offline   Reply With Quote
Old 12th December 2017, 13:43   #11  |  Link
Gser
Registered User
 
Join Date: Apr 2008
Posts: 317
Quote:
Originally Posted by Bahamuth View Post
So for DVDs it would be e.g. a MKV with MPEG2 inside. Do all hardware players who support MKV also support MPEG2-Streams inside? I would have thought x264 is a bit more compatible in there.
Well technically mkv does support MPEG files and some players that support mkv might be able to play them like a new Samsung tv. But more "official" containers would be vob, mpg or .ts. On DVD's vobs are split into 1GB chunks, so I'm not sure what other players will think about vobs that are larger. Or if you want to include internal subtitles .ts supports those in the right format. You know what I don't think .mpg supports AC3 nor DTS, so you might want to go with .ts.

Last edited by Gser; 12th December 2017 at 13:51.
Gser is offline   Reply With Quote
Old 12th December 2017, 13:49   #12  |  Link
Ghitulescu
Registered User
 
Ghitulescu's Avatar
 
Join Date: Mar 2009
Location: Germany
Posts: 5,517
Quote:
Originally Posted by Bahamuth View Post
So for DVDs it would be e.g. a MKV with MPEG2 inside.
A M2TS or simply TS would be more appropriate, not only for DVDs, but also for many others. The problem is the muxing overhead which is rather large, and increases with every new stream (so keep the audios and subtitles to a minimum).
__________________
Born in the USB (not USA)
Ghitulescu is offline   Reply With Quote
Old Yesterday, 00:02   #13  |  Link
Asmodian
Registered User
 
Join Date: Feb 2002
Location: San Jose, California
Posts: 2,718
10-bit x264 in mkv and screw hardware support, I always use an HTPC to play anything anyway.
__________________
madVR options explained
Asmodian is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 21:08.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2017, vBulletin Solutions Inc.