Why encoding videos to .mp4 containers using h.264 codecs takes time?


Recommended Posts

Hello,

Please I'd like to know why encoding videos to .mp4 containers using h.264 codecs takes a lot of time to do the encoding!?

I've tried a lot of tools and found two types of encoders, 1st type is the encoders do converting to various containers like WinAVI, AnyVideoConverter, ...etc

2nd type is the dedicated encoder to only encode to .mp4 like VidCoder, Handbrake ...etc

I used to use WinAVI to do the encoding but the encoded file quality was not good as VidCoder and file size for WinAVI was big and not that small as VidCoder. This is the only reason for my questions, it is mandatory important to have a very fast time for encoding, but even using core i7 2600k with nvidia gtx geforce 550 ti 2 gb with 16 gb ram ddr3 can not make the encoding time fast.

Please advise and help smile.gif

Link to comment
Share on other sites

Encoding always takes a long time. If you want to wrestle some additional performance out of your machine, encoding wise, you can look for software that supports using the Intel HD graphics chip on your CPU, if your board supports this.

See: http://www.lucidlogix.com/product-virtu-gpu.html

  • Like 2
Link to comment
Share on other sites

It takes time because H.264 is a very complex standard, with several options that will make your video smaller at the cost of time spent encoding (think zip, fast but bad compression, vs. 7zip, better compression but slower), and it takes a lot of computing power.

To get an idea of how complex, look at the supported options (command line switches) for the "x264 encoder", the open-source H.264 encoder used by Handbrake and several other mp4/H.264 exclusive encoders. There are tons. There are even presets for making the encoding UltraFast, Slow, VerySlow, etc at the cost of quality. Handbrake is... probably using the UltraFast option. But I might be wrong.

Link to comment
Share on other sites

Encoding always takes a long time. If you want to wrestle some additional performance out of your machine, encoding wise, you can look for software that supports using the Intel HD graphics chip on your CPU, if your board supports this.

See: http://www.lucidlogi...-virtu-gpu.html

Any software like that out there? I'd give it a try, with the new i5 cpu of mine.

Link to comment
Share on other sites

Any software like that out there? I'd give it a try, with the new i5 cpu of mine.

That software, Virtu, is the official solution and you can install and use it now. The license is paid for by your motherboard maker so you may or may not be able to use it in a paid fashion. You might also only be able to use d-Mode (Display connected to dedicated GPU) if your machine lacks a monitor port for the Intel HD graphics (i-Mode requires you to be connected to the Integrated GPU directly).

But you can download the application from that site I linked you to.

Link to comment
Share on other sites

Encoding always takes a long time. If you want to wrestle some additional performance out of your machine, encoding wise, you can look for software that supports using the Intel HD graphics chip on your CPU, if your board supports this.

See: http://www.lucidlogi...-virtu-gpu.html

It is my 1st time to ever know about such a thing, Even google was not a friend because I do nto know what keywords to use to search for it, so please if you may help with that that would be awesome.

It takes time because H.264 is a very complex standard, with several options that will make your video smaller at the cost of time spent encoding (think zip, fast but bad compression, vs. 7zip, better compression but slower), and it takes a lot of computing power.

To get an idea of how complex, look at the supported options (command line switches) for the "x264 encoder", the open-source H.264 encoder used by Handbrake and several other mp4/H.264 exclusive encoders. There are tons. There are even presets for making the encoding UltraFast, Slow, VerySlow, etc at the cost of quality. Handbrake is... probably using the UltraFast option. But I might be wrong.

I tried both of VidCoder and HandBrake and almost both of them consume the same amount of time to encode the same file with the same settings. Except that VidCoder is a bit better regarding saving custome presets.

Any software like that out there? I'd give it a try, with the new i5 cpu of mine.

Yes me too and I hope the i7 26k sandy bridge do any better.

That software, Virtu, is the official solution and you can install and use it now. The license is paid for by your motherboard maker so you may or may not be able to use it in a paid fashion. You might also only be able to use d-Mode (Display connected to dedicated GPU) if your machine lacks a monitor port for the Intel HD graphics (i-Mode requires you to be connected to the Integrated GPU directly).

But you can download the application from that site I linked you to.

I am using Gigabyte z-68 motherboard.
Link to comment
Share on other sites

VidCoder and Handbrake take about the same amount of time because VidCoder uses the Handbrake engine. I believe Handbrake is ffmpeg.

It's slow because the encoder has to analyze the video in order to compress it. It looks like people are trying to work on a GPU-accelerated ffmpeg but I don't think it exists yet.

Link to comment
Share on other sites

VidCoder and Handbrake take about the same amount of time because VidCoder uses the Handbrake engine. I believe Handbrake is ffmpeg.

Yes you are ight.

It's slow because the encoder has to analyze the video in order to compress it. It looks like people are trying to work on a GPU-accelerated ffmpeg but I don't think it exists yet.

I am afraid that I do not follow this part.

You could consider an OpenCL/Cuda app if you have the hardware for it.

ATI and nVidia graphics chips support the ability to offload computation to the GPU: http://www.mainconce...da-h264avc.html

Depends on the hardware you have though.

what details I should look for in my hardware to know if it is supporting or not?

when I use various encoders I used to see the option enabled for CUDA.

Link to comment
Share on other sites

there are three products:

Virtu

Virtu Universal

Virtu MVP

which one you do refer to?

What board do you have? I will see if they list Virtu support directly. I was mentioning the Virtu product I linked to directly as that is the one that my Maximus IV Extreme-Z is licesed to use. I haven't use it myself as I don't encode video, but the claims are up to 6x the performance using Intel QuickSync compared to GPU acceleration using Nvidia or AMD GPUs. Not a bad gain if you can take advantage of it.

Be sure you have the Intel i-GPU enabled in your BIOS and the Intel drivers installed for the GPU prior to installing Virtu.

http://www.lucidlogix.com/driverdownloads-virtu.html

Link to comment
Share on other sites

Its been covered elsewhere, but the quality when using CUDA/Intel HD etc suffers compared to using just the CPU

Seriously how much quicker do you want it to be with your i7?

I can remember it taking 16 hours to encode a video on my P4 i can do it in such a fraction of the time now, even on my lowly core 2 duo laptop

Link to comment
Share on other sites

This is what I got when I installed the drivers:

post-292348-0-51058000-1345555677.png

As I mentioned in my last post, did you both ensure the Intel HD graphics chip is enabled in your BIOS and that the Intel HD graphics drivers are installed?

Also note, Lucid lists the following encoding applications as certified so they may offer the best performance.

CyberLink Media Espresso 6.5

ArcSoft Media converter 7

Link to comment
Share on other sites

As I mentioned in my last post, did you both ensure the Intel HD graphics chip is enabled in your BIOS and that the Intel HD graphics drivers are installed?

Please where can I find it in my bios as I restarted my computer and viewed the bios setup and did not found anything similar to that name, so how can i figure it out?

Also note, Lucid lists the following encoding applications as certified so they may offer the best performance.

CyberLink Media Espresso 6.5

ArcSoft Media converter 7

Ok, I will try them both right now and feed you back.

probably got that message b/c youre only using your 550 Ti vs using the integrated graphics?

But there isn't any place in my motherboard to place the monitor cable except the PCI card I've, I mean the mother board is not like the older ones I used to have where I was able to connectt the monitor cable to the motherboard, I only have the nVidia pci card only to connect my monitor.

Check Avidemux it's a good open source software to encode video.

ok, will feed you back now abou ######.

Link to comment
Share on other sites

h264 is computationally complex so it takes quite some time to encode assuming you are using good quality settings. You can use lower quality settings that will encode faster than xvid but will look better than xvid. x264 is getting OpenCL support soon so we might get a 10% or so boost in speed with an opencl capable gpu.

Link to comment
Share on other sites

Please where can I find it in my bios as I restarted my computer and viewed the bios setup and did not found anything similar to that name, so how can i figure it out?

As I requested earlier, what motherboard do you have? Your board supports only d-Mode from what you described, but I can't help you any more than I have without knowing the board directly.

Link to comment
Share on other sites

1. Your i7 2600K does not have GPU (Intel HD 4000) within the chip, so you don't have integrated graphics.

2. Your NVIDIA GPU supports CUDA, which is the hardware necessary to encode and decode videos. Though you'll find good performance out of this only with good professional software, like Adobe's Premiere Pro (and a little hacking).

3. Encoding takes time because the computer needs to analyse millions and millions, if not billions of pixes per second, compress them and generate a new file. It is not like a "Save as" command to convert a file. Also, if you edited the video then it takes even more time than you can imagine.

As you seem to be a noob, I think you should stick to the options you already have or you should consider diving deeper in the technicals of all this, which is not very easy, I can tell you. :)

Link to comment
Share on other sites

1. Your i7 2600K does not have GPU (Intel HD 4000) within the chip, so you don't have integrated graphics.

Where do you get the information that the i7-2600K lacks an i-GPU? Of course, it lacks the HD 4K as that is exclusive to the 3rd Generation i7 chips (i7-3K chips), but it does have HD 3K integrated graphics (depending on the variation)...

Source: Intel: http://ark.intel.com/products/family/59136/2nd-Generation-Intel-Core-i7-Processors/desktop

Link to comment
Share on other sites

Where do you get the information that the i7-2600K lacks an i-GPU? Of course, it lacks the HD 4K as that is exclusive to the 3rd Generation i7 chips (i7-3K chips), but it does have HD 3K integrated graphics (depending on the variation)...

Source: Intel: http://ark.intel.com...cessors/desktop

Yes, I'm sorry, it is the 3K, but anyway, it is hardware-disabled. :)

I think you must have a motherboard that supports the iGPU, so you can enable it.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.