What is important for video encoding/converting in good quality for common viewing or streaming site

Sonic Angel Knight

Well-Known Member
OP
Member
Joined
May 27, 2016
Messages
14,406
Trophies
1
Location
New York
XP
12,970
Country
United States
If anyone wishes to share some opinions on the process of encoding videos for either your own media players or streaming sites, please do. I'm not really a video processing person but I would like a simple understanding of each feature of a encoding and why is necessary to use for getting good quality that is a modern standard.

Now just a list of thing that I think is important to know.
  • Recording format - The most common one is MP4 for most media devices, such as game consoles, smartphones and probably streaming sites that abandoned FLV but there is others like Matroska MKV, OVG MOV TS, WEBM and so on... just to name a few.
  • Encoder - There is two forms, one is software which is handled by some app i assume and hardware which is probably handled by the GPU, and if I'm wrong then sorry, but that why I'm posting this so people can correct me.
  • Muxer - I have no idea what this is so I hardly anything to say.
  • Rate control - come in variety of ways like Variable bitrate (VBR) Lossless.... the most popular seems to be Constant Bitrate CBR. This function is accompanied by a number which seem to also be important depending on what kind of video you are doing.
  • Keyframe Interval - Another thing that I also have no idea what it means.
  • Profile - Another thing not sure what it is, but is a thing apperently
  • Two Pass encoding - This is also more stuff I do not yet understand.
So I dunno who here is a content creator or just a expert on encoding but I'm really curious about somethings. Also anyone can also ask questions as well. I mean there is stuff like Nvidia shadowplay or some other things made easy for some people, but I sure the hardcore people out there wouldn't want to use that if they can do better. :unsure:
 

ThoD

GBATemp Addict (apparently), but more like "bored"
Member
Joined
Sep 8, 2017
Messages
3,631
Trophies
1
Age
27
XP
3,049
Country
Greece
Here's my process:

For game recording, I use D3D Gear (can't target desktop, only games/media) and for regular screen recording Fraps (can target everything but resulting recordings take considerable more space by about 5 times). After I record, I use Bigasoft Total Video Converter (easily best converter software out there) to trim/crop and convert them to a truly lossless H.264/MPEG-4 AVC .mp4 format, which is the most easy to work with in other editing software or to be directly uploaded (same format as what youtube uses, so post-upload processing for it is considerably lessened). Now I either upload it or edit it (I actually like Windows Movie Maker for creating videos since it has everything I need, but if I need anything more advanced I use Vegas Studio (tend to avoid it since it's needlessly resource heavy). Once I'm done, I export the final video and upload it, having a nice result of near lossless quality and accurate editing.

Now to explain the things you listed:
-About format, don't bother too much, simply convert to the generic .mp4 or whatever format you want it to be at the end as losslessly as you possibly can, since that will make it easier to edit, plus editing software are NOT good converters, so if you don't convert it first yourself, you will have problems with quality on the final product.
-Encoder refers to the software that handles the GPU commands so it can record, so basically the software that controls the hardware in a way that makes recording possible.
-Muxer is a built-in part of converters and pretty much any software that handles audio and video together. It's purpose is to fuse together the audio and video as accurately as possible.
-Can't talk much about rate control since I've always liked CBR, so I'll leave that for someone who has experimented with these more...
-Keyframe interval is about the frames it takes to transition from one image to the next, but since I haven't experimented with this I'll do the same as with the above point...
-Profile basically refers to the codec used (like the "H.264/MPEG-4 AVC .mp4" I mentioned earlier).
-Two pass encoding is simply a technique that, while causes it to take longer to process the video, greatly improves the final quality. In first pass it creates a detailed log of all the key points in the video, then during the second pass it converts the video and using the log fixes any bits that are off (what I called lossless conversion is this basically).

Hope this all helped, it took quite a while to write...
 

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
36,798
Trophies
3
XP
28,348
Country
United Kingdom
Recording format tends to be known as container. MP4, MKV, AVI, WEBM... all containers with various abilities and levels of support out there in the world (MKV is wonderful and does multiple video, audio, subtitles, chapters and more besides, however it is not supported on a lot of devices or players for whatever reason, MP4 technically supports subtitles (see MP4tt if you want to get confused) but is supported by everything, AVI is supported almost everywhere but does not handle much more than a single audio and video track and is quite limited in what it officially supports there).

Encoder. There are video encoding standards (you might have heard of H264 aka MPEG4 AVC aka a whole bunch of other things). Videos are made into videos using that standard by codecs (the popular open source one for H264 being X264) which are pieces of software. There are CPU based ones, GPU based ones and hardware based ones if you have ridiculous amounts of money. I always plump for CPU as GPU encoders are generally bad news, I have no idea why they are bad (the concept is solid -- GPUs are rather more suited to video encoding operations than CPUs) but the quality has been poor since the start some time in the directx9 era.

Muxer. This is what takes the raw video and audio (and subtitle and chapter list info and whatever else) and puts it into a container. There can be quite a lot to certain formats (if you want to download MKVtoolnix some time and have a look at all the options then do, if you want to get scared then look at all the options for DVD in something like PCGedit) and some muxers only do basic audio and video. Consequently the act of taking streams out of a container is called demuxing and is done by a demuxer, search for one of those if you want to do that for a given video, though most muxers and encoders will support a variety of formats these days so they are less useful than they were in years past.

Rate control. The encoder will either aim for quality or size, and may also cap the given bitrate*.
*many scene groups do not do this. To that end if you have ever downloaded a show from HBO that included its famous TV static logo at the start and the thing playing it back chugged there but sorted itself out for the rest of it then now you know. Save having an asterisk in my asterisk watch this if you are more curious


Keyframe. When encoding videos there will be full frames that are not predicted or generated from what came before (it you have ever seen talk of b frames, p frames and i frames then it is related). If you have ever had a video playback corrupt, possibly turn the screen a grey or green tint and then come back in as the motion of the on screen events happens and finally return to normal all at once then you have seen this in action. More time between keyframes, more compression possibly achieved at the cost of some devices struggling to play it back. Leave this at default/suggested for most of the encoding programs out there.

Profile. Recall the thing where I said about standards. Each standard tends to have a variety of sub standards (be it audio or video). If you want to use a given profile you are restricted in what you can do as far as bitrates, keyframe intervals and some of the more exotic options for compressing moving images. For PC and uploading it tends not to be a problem but hardware devices (and more importantly hardware decoders -- your phone likely can not do a software decode on H264 on its CPU but has a chip in there which is dedicated to it) may not support beyond a certain profile.
Do note some encoding programs also call a given set of settings, including user ones, a profile which is a bit annoying. On the other hand said programs will tend to also include a setting for given hardware types and saves you having to remember whether this version of the device and software supports b-pyramid and CABAC decoding* in H264.

*recall the exotic options comment. If you are really bored have a list and explanation of them for H264/X264 https://en.wikibooks.org/wiki/MeGUI/x264_Settings

Two pass encoding. Single pass encoding takes what it can get and lives in the moment and maybe next 10 seconds of a given video. Two pass does what it says and will run through the complete video once before it makes the final thing. If later in the video the action shoots up it will know about this and if you have set a target size it will then be able to drop the quality at certain points to get closer to the target. I still like it and use it for anything I care about the quality for but the main reason a lot of people did it back when was because trying to fit things on a sharply limited DVD size (as opposed today when we have 60 gig microSD cards for next to nothing and can upload everything anyway) it got there.
Obviously you can't do 2 pass if you are streaming live, unless you want to give a short lag and segment your video which will do very little for you. Most of the time 2 pass will generate a small file containing the info on the media stream it is to encode, however there might be some which do a full encoding twice and thus will mean you need 3 times the space (the original, the first pass and the final encode, possibly 4 times if the muxer then also generates another file and the earlier steps are not deleted). Not a problem for most things but if you are encoding a high res multi hour video on a smaller SSD...
 
  • Like
Reactions: ThoD

Sonic Angel Knight

Well-Known Member
OP
Member
Joined
May 27, 2016
Messages
14,406
Trophies
1
Location
New York
XP
12,970
Country
United States
So is there a balance for high quality video but low file size I.E. Compression?:unsure:

I can already assume that professionals must have countless Storage devices for these things for reasons like this cause of course better quality means bigger file size but then where is the point of balance where is clean and crisp viewing but not overly exaggerated file size for like 2GB for about maybe up to 10 mins of video?
 

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
36,798
Trophies
3
XP
28,348
Country
United Kingdom
It depends upon the source input.
You film a well lit single colour screen for 6 hours and it is going to be different to the same length of snow and such like you can see in the video above. In video terms the former is usually seen in a so called talking head shot where the background and most of someone's head remains the same but only the lips move in any great sense.

Your job as the would be video editor/producer/creator/whatever term you prefer is to consider all this, or say poke it and spend hard drive space instead (relatively speaking the storage available has gone up massively since computers got good enough to use by the man on the street to make video, even if we saw the minor rise to 1080p). Run your own tests with footage you feel fairly representative of what you do, or indeed stress tests of the extremes you want to still work, and see what works for you. You don't need to do hours of footage if you just chop it down. Relatively speaking it is all quite workable -- when your camera only spits out MJPEG or similar or you are working with gigs of DVD (MPEG2 video) files and a terabyte is the sort of storage you need an array to deal with, xvid is the dominant codec, everything has massive temp files and you have to stick the result on a 4.35GB writeable DVD it is no fun. Today if you are just grabbing some 1080p H264 video, encoding into the same, in a time when 1TB is fairly bog standard and you can stick it all on a cheap SD card to store it then it is not such a concern.

Word of warning though. If "what works for you" means you learn to spot video encoding errors you will spot them everywhere from now until the day you die. This annoys some people, others learn to live with it.

The pros do have a lot of storage. Indeed storing all the source footage, project footage and resulting files can be hard, never mind making sure you have multiple copies of each as a backup. If you are just knocking out videos, only care about the end result and can download them again from the site you uploaded to if your external hard drive decides to see if it can fly by taking a leap off your desk then it is not such a worry.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
  • K3Nv2 @ K3Nv2:
    Jaws is on a diet
  • K3Nv2 @ K3Nv2:
    Damn power went out
  • BigOnYa @ BigOnYa:
    Ok xdqwerty, your little bro prob tripped On the cord and unplugged you
  • K3Nv2 @ K3Nv2:
    Ya I'm afraid of the dark hug me
  • BigOnYa @ BigOnYa:
    Grab and hold close your AncientBoi doll.
  • K3Nv2 @ K3Nv2:
    Damn didn't charge my external battery either
  • BigOnYa @ BigOnYa:
    Take the batteries out of your SuperStabber3000... Or is it gas powered?
  • K3Nv2 @ K3Nv2:
    I stole batteries from your black mamba
    +1
  • K3Nv2 @ K3Nv2:
    My frozen food better hold up for an hour I know that
  • BigOnYa @ BigOnYa:
    Or else gonna be a big lunch and dinner tomorrow.
  • BigOnYa @ BigOnYa:
    Did you pay your power bill? Or give all yo money to my wife, again.
  • K3Nv2 @ K3Nv2:
    Oh good the estimated time is the same exact time they just said
    +1
  • BigOnYa @ BigOnYa:
    Load up your pc and monitor, and head to a McDonalds dining room, they have free WiFi
  • K3Nv2 @ K3Nv2:
    Sir please watch your porn in the bathroom
    +2
  • BigOnYa @ BigOnYa:
    No sir we can not sell you anymore apple pies, after what you did with the last one.
  • K3Nv2 @ K3Nv2:
    We ran out
  • HiradeGirl @ HiradeGirl:
    for your life
    +1
  • K3Nv2 @ K3Nv2:
    My life has no value my fat ass is staying right here
  • K3Nv2 @ K3Nv2:
    Nearly 4 hours without power :(
  • Veho @ Veho:
    SO POWERLESS
  • K3Nv2 @ K3Nv2:
    Tell Kanye I need power
  • DinohScene @ DinohScene:
    Better start running in your hamster wheel
    DinohScene @ DinohScene: Better start running in your hamster wheel