Batch processing - inconsistent output video resolution and audio bit rates

Aug 10, 2011 at 6:31 AM
Edited Aug 10, 2011 at 6:46 AM

Hi there,

 

Newbie using VidCoder first time.   I'm using the 0.9.3 x86 version VidCoder converting to H.264 mp4's in Windows 7.

 

Basically I had a bunch of DVD's I wanted to convert to H.264 videos.  I really liked the batch feature that I can queue up jobs and process multiple conversions. 

 

In setting the encoding options, basically I selected the 'Normal' profile, but I selected 'Custom' in the Video section instead and left nothing changed in that section (no cropping) to try to preserve the video resolution (720x480). 

I also wanted to use higher audio bitrate so I changed to 256 kbps in the audio section (AAC/faac codec).

 

A while after I started running the batch encoding, I checked and noticed the first 5-6 mp4 output videos were correct in the video resolution (720x480), video bit rate was about 1000-1400 kbps, but output audio bit rates were from 187-192 kbps.

 

After that, the output videos for the other DVD's had various video resolution that were slightly different than what was set, although they were also different from one another (for example, 708x448, another was 714x464), the video bit rates went way down to half (like 600-700 kbps) compared to the earlier outputs and the audio bit rates went down to 160 kbps.

 

All the input DVD videos are part of a lecture series so the video bit rates are all very similar.  Video resolution are all 720x480.  The audio bit rates are all the same (1536 kbps).

 

So I wonder how come the output video resolutions are different than what was set in the encoding options.  And the output audio bit rates aren't close to what was set.  Perhaps I'm ignorant about some details?

 

Thx... .

Coordinator
Aug 10, 2011 at 7:22 AM

Don't know what's happening with the audio bitrates. It seems to be accurate for me. Remember that it will have the settings for when you hit the "enqueue" button, not when the encode happens. About the different resolutions, that might be the automatic cropping. You can turn that off. Also it's perfectly normal for the video size to be different for similar length videos. By default VidCoder uses Constant Quality encoding, which means that more complex videos take more data and less complex videos take less data to encode.

Aug 10, 2011 at 8:30 AM

I am redoing the batch job now (perhaps I changed the settings in the middle of enqueuing...).  BTW, I wonder if there's a way to check/change a particular conversion queue item's settings once it's already in the queue?  That'd be really handy since I don't want to go redoing all the enqueuing again... .

 

Also, I'm curious if there's a way to save a batch job so can 'reload' the batch job if I'd like to later on?  That'd be another really nice feature.

 

Thx.  The batch processing is a really handy feature.

Coordinator
Aug 10, 2011 at 3:30 PM

Editing a queue option is something I have on my to-do list. Now that someone has asked for it I will increase the priority. :) As for the batch jobs, they save automatically and will come back when you restart the program, but there's no way to save a batch as arbitrary file and bring it back at any time.

Aug 10, 2011 at 6:49 PM
Edited Aug 10, 2011 at 7:03 PM

Yea being able to edit a queue option is really nice. :-)

 

BTW, I just did a second try of the same batch job.  This time it seems the video resolution is good (all 720x480). 

But the audio bit rates from the outputs are still different: 184kbps for half of the output videos; for the other half they're 256kbps (these video bit rates drop 50% correspondingly).  I'm sure I did not make changes to the encoding settings as I enqueued the items this time. 

Perhaps you can take a look when you get a chance?

Coordinator
Aug 10, 2011 at 7:06 PM
Edited Aug 10, 2011 at 7:07 PM

How are you measuring the audio bit rates? And are the changes in bitrate linked to the input file or to the position in the queue? Or is it random?

Aug 11, 2011 at 1:17 AM
Edited Aug 11, 2011 at 3:35 AM

The audio bit rates for the output video files are shown in the File->Properties->Details-->Audio in Windows 7.  I also have MediaInfo app and it shows same audio bit rates for the output video mp4 files.

 

The audio bit rates are all the same for all the input video VOB files in all the DVD's (all are 1536Kbps).  Again that bit rate info is shown in Windows 7 in the File properties--> Details --> Audio section.

 

I have 20 DVD's to convert, the first 8 video outputs have 182-192Kbps audio bit rates (183, 187, 182, 192, 192, 184, 185, 185).  After that the outputs all have the same audio bit rates 256Kbps (same as the value set in the encoding settings audio section).

 

I've done the batch job two times, all I can deduce from these two runs is it seems the audio bit rates are lower when the batch job begins.  About midway thru' the queue it suddenly starts doing the audio bit rates correctly (higher in my case)... .

 

When I first made the change in the encoding settings before the first run, I changed the Profile name to a new name.  The 'Preset' shows I am using the profile name that has the higher audio bit rate that I have set. I have double checked the Encoding 'Settings' and it shows the higher audio bit rate setting (256Kbps).

Coordinator
Aug 11, 2011 at 1:51 AM

I have not been able to reproduce your problem yet. What's the final channel layout? Stereo? 5.1? And is there any pattern of which files will get the wrong bitrate?

Aug 15, 2011 at 6:28 PM
Edited Aug 15, 2011 at 6:44 PM

Hi,

 

Input audio is basically 48KHz stereo PCM audio.  Not 5.1. Audio output is set to default: AAC (faac) Dolby Pro Logic II 48KHz 256Kbps 0 gain 0 DRC.

 

I've tried the first video input VOB file and the converted output video alway has 192Kbps (and probably also true for some other input VOB I've converted in this batch) even though I've set the output audio bit rate to 256Kbps.  I can pm you the location on this VOB file and you can perhaps analyze it a bit.  

 

Let me know if that'd help you troubleshoot.

Coordinator
Aug 15, 2011 at 6:32 PM

Yeah, if I could get the VOB file and the exported preset you're using to encode, that would be extremely helpful in tracking down any problem.

Aug 16, 2011 at 8:07 PM

Just pm you the link to the VOB file and the exported preset I used.  

Coordinator
Aug 17, 2011 at 3:14 AM

Thanks. I've taken a look at it and it does indeed seem to have lower bitrate on the encode. I confirmed that I'm correctly passing in 256 kbps to HandBrake. I did an encode of the same file with the latest HandBrake CLI nightly and it's got the same bitrate. So the problem is somewhere within the HandBrake core that I wrap.

Aug 17, 2011 at 4:17 AM

Thx.  You think you'd mention this to the Handbrake folks, or I should mention this to them so they can fix the audio encoding problem?

Coordinator
Aug 17, 2011 at 3:49 PM

I'd appreciate it if you could mention it to them. Remember, they'll need an encode log (from HandBrake) before they'll look at your problem.

Coordinator
Aug 17, 2011 at 4:04 PM

Update: talked with some HandBrake folks and apparently it's known that libfaac can mess up the bitrate when above 192 kbps. Though with your clip the bitrate still gets messed up when at 160 kbps so your video may be of interest to them.

Aug 17, 2011 at 4:37 PM

Officially, only 80K a channel is supported but even then the bitrate control on the encoder isn't great. 

The libfaac encoder is going to be dropped  at some point so I wouldn't expect any fix for this. (When ffaac gets to the point when it's a stable replacement) 

Coordinator
Aug 17, 2011 at 5:42 PM

Just out of curiosity, how might someone track the development of ffaac?

Aug 17, 2011 at 7:28 PM
Edited Aug 17, 2011 at 7:29 PM

Hi, I wonder what the replacement audio codec would be?  (Nero AAC seems to be a good one.)

Coordinator
Aug 17, 2011 at 7:31 PM

Nero won't work because of some licensing issues. Their current plan is to just wait for FFAAC to get better.

Aug 17, 2011 at 8:00 PM
Edited Aug 17, 2011 at 8:03 PM

There's free download for Nero AAC codec.  Perhaps some details I've missed out on the license? If I'm the person downloading it for my personal use there should be no problem? 

Coordinator
Aug 18, 2011 at 5:55 AM

You can download the exe for free but you can't call directly into a library, which is what HandBrake would need to do.

Aug 18, 2011 at 8:33 AM
Edited Aug 18, 2011 at 8:36 AM

I see.  Perhaps Handbrake can extend to be able to execute like an external shell command so can use Nero AAC or other command line driven tools... .  As I really like the batch job feature of Vidcoder... .

 

BTW, I am doing another encode with some other of my DVD videos using Hi Profile preset.  The test video output using Hi Profile preset sometimes shows occasional pixelation, which is absent in the input video source.   What adjustment would you suggest in the encoding settings to improve the video output so to remove the pixelation?

 

Thx.

Coordinator
Aug 18, 2011 at 3:41 PM

Lower the RF to 18? That's what I'd try.

Aug 19, 2011 at 4:41 AM
Edited Aug 19, 2011 at 10:42 AM

Thx--that definitely helps.  

 

Another question:

I've increased the subpixel motion estimation to 8/9.  It seems the images are smoothier--but at the same time it gets a bit blurrier (less sharp) as the subpixel motion estimation increases (RF = 18; all else unchanged.  I didn't increase the Trelis value).

 

My mistake, or someone else also notices this?

Sep 2, 2011 at 1:25 AM

I'm noticing that with higher subpixel motion est values (8/9) shiny edges/areas are 'less' shiny--causing the images to look darker/more dull.  

I wonder if there's any other setting to compensate the loss of the shiny areas with the higher subpixel motion est. settings.

Sep 3, 2011 at 7:02 AM
Edited Sep 3, 2011 at 7:04 AM

I tried to ask Handbrake folks about this darker image issue w/ subpixel motion est. values and they would not even allow me to post this question on their forum saying this is not a Handbrake related question.  

So looks like unless someone in this forum helps -- I won't get any help from the Handbrake folks on this.

Coordinator
Sep 3, 2011 at 7:08 AM

Hey sorry I don't really know much about the effects of tweaking x264 values. They might be more receptive if you bring it up as a HandBrake issue maybe? Not sure why they'd stop you from posting there.

Sep 3, 2011 at 10:45 PM
Edited Sep 4, 2011 at 2:20 AM

Thx for the attempt to help.  So to confirm -- there's no intermediate processing of the video/subpixel parameters, VidCoder just passes these parameters along to Handbrake?

Thx.

Coordinator
Sep 5, 2011 at 10:32 PM

That's right. Actually that string in the text box on the advanced options page is exactly what gets passed to HandBrake. All that VidCoder does is provide UI to change that more easily.

Sep 6, 2011 at 3:17 AM

Thx.  I wonder what Handbrake version is used in the latest Vidcoder 1.0.1?

Coordinator
Sep 6, 2011 at 3:34 AM

Says in Help -> About. Currently it's SVN 4167.

Sep 9, 2011 at 9:55 PM
Edited Sep 9, 2011 at 10:26 PM

Some good news -- I seem to be getting some improvement w/ CFR instead of VFR.  Videos are sharper (shiny areas stay bright instead of dulled)--for same RF and other conversion settings.  

Also in VFR there seems to be a slight audio sync (particularly when video images are small).  With CFR the audio is perfectly in sync with the video(!)