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 > (HD) DVD, Blu-ray & (S)VCD > One click suites for DVD backup and DVD creation

Reply
 
Thread Tools Search this Thread Display Modes
Old 26th August 2012, 03:54   #2101  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,078
Bitrate calculation issues

I had some oversize problems with the latest Alpha, here are the details:

Source is an XviD file, duration 1 hour 57 minutes.
Destination DVD-5, Audio 224 kbps AC3.

My reference is good old DVD2SVCD, it calculated a video bitrate of 4955 kbps, and the resulting file did fit perfectly on a DVD-5 (ImgBurn reported 99% fill rate).

With AVStoDVD the video bitrate varied depending on the output format:

For DVD structure, ISO image or Burn DVD the bitrate was 4927 kbps. This did work perfectly.

But when selecting Elementary Streams or Muxed MPEG2 files the video bitrate was 5037 kbps, and these files could not be burned to a DVD-5 blank, they were way too big.


What is wrong here? I think the video bitrate should be the same no matter which output format is selected.


Cheers
manolito
manolito is offline   Reply With Quote
Old 26th August 2012, 13:09   #2102  |  Link
MrC
AVStoDVD Dev
 
MrC's Avatar
 
Join Date: Apr 2006
Location: Italy
Posts: 1,302
Quote:
Originally Posted by manolito View Post
One small thing (call it nitpicking):
The AVS file mostly has the entry :
Video = Video.ConvertToYV12

It should be
Video = Video.ConvertToYV12()

because due to an AviSynth peculiarity these brackets will increase speed.
Ok, good hint. Thanks.

Quote:
Originally Posted by davidcw View Post
Yes muxman refuses to author the produced assets (I create the wav sound file separately with Audacity)
I have noticed on the log file that AVStoDVD switched to FFMpegSource. Probably the DirectShowSource may help, just install flvsplitter.

If this does not help, what about switching back to HCenc 0.25 instead of HCenc 0.26beta?

Quote:
Originally Posted by manolito View Post
I had some oversize problems with the latest Alpha, here are the details:

Source is an XviD file, duration 1 hour 57 minutes.
Destination DVD-5, Audio 224 kbps AC3.

My reference is good old DVD2SVCD, it calculated a video bitrate of 4955 kbps, and the resulting file did fit perfectly on a DVD-5 (ImgBurn reported 99% fill rate).

With AVStoDVD the video bitrate varied depending on the output format:

For DVD structure, ISO image or Burn DVD the bitrate was 4927 kbps. This did work perfectly.

But when selecting Elementary Streams or Muxed MPEG2 files the video bitrate was 5037 kbps, and these files could not be burned to a DVD-5 blank, they were way too big.

What is wrong here? I think the video bitrate should be the same no matter which output format is selected.
I have reserved some extra space for DVD structure, using following rationale:

Code:
        If OutputSetup >= DVD_Folder Then
            DVD_Size = Int(DVD_Size * (0.995 - 0.01 * DVD_Time / 3600))
        End If
and that formula applies only if the Output Setup is 'DVD Folder' or higher.

Let's say if the elementary assets are then used to create a DVD structure, then same formula should be applied (but why not using directly 'DVD Folder' as output?).
If the elementary assets (or the muxed mpeg) are stored as they are, then the extra space should not be added. Otherwise the predicted output space will not match.

Does it make sense?



Bye
__________________
MrC

AVStoDVD Homepage
AVStoDVD @ Doom9 Forum
MrC is offline   Reply With Quote
Old 26th August 2012, 15:51   #2103  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,078
Quote:
Originally Posted by MrC View Post
Let's say if the elementary assets are then used to create a DVD structure, then same formula should be applied (but why not using directly 'DVD Folder' as output?).
If the elementary assets (or the muxed mpeg) are stored as they are, then the extra space should not be added. Otherwise the predicted output space will not match.

Does it make sense?



Bye
Thanks for the explanation, but to be honest, it does not make much sense for me...

Even if I select Elementary Streams or Muxed MPEG file as the output format, my final format will still be a burned DVD (the name of the software is AVStoDVD after all). So IMO this formula to save some extra space should always be applied no matter which output format is selected. But it's no big deal now that I know how it works...



Cheers
manolito
manolito is offline   Reply With Quote
Old 26th August 2012, 17:58   #2104  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,078
I just looked at davidcw's log file, and I believe that his problem comes from his max bitrate of 9000 kbps. If you add 1536 kbps for PCM audio you will be far beyond DVD specs.

From a recent post by TheSkiller:
Quote:
The highest bitrate for the video alone depends on the audio it will be muxed with. Maximum allowed combined bitrate of video+audio+subtitles is 9800 kbit/s.
So if you have a single 256 kbit/s audio stream for example, the theoretical maximum would be 9544 kbit/s for the video. But better don't use this value, as it's the very edge of what's allowed. I have done plenty 9200 kbit/s CBR encodes (audio 256 or less) and on many various players I have never had a problem. If I do VBR encodes I usually use a maximum of 9200 as well. Maybe 9300 or 9400 would work just as well but I'd rather leave a 200-300 kbit/s margin to the absolute max.
AVStoDVD has a default max bitrate of 9000 kbps which can only be modified in the registry. I believe that AVStoDVD should recalculate the max bitrate automatically according to the combined audio and subtitle bitrate. In the case of davidcw the max bitrate for HCEnc should be about 8000 kbps (including a little safety margin).



Cheers
manolito

Last edited by manolito; 26th August 2012 at 23:17.
manolito is offline   Reply With Quote
Old 27th August 2012, 09:52   #2105  |  Link
MrC
AVStoDVD Dev
 
MrC's Avatar
 
Join Date: Apr 2006
Location: Italy
Posts: 1,302
Quote:
Originally Posted by manolito View Post
AVStoDVD has a default max bitrate of 9000 kbps which can only be modified in the registry. I believe that AVStoDVD should recalculate the max bitrate automatically according to the combined audio and subtitle bitrate. In the case of davidcw the max bitrate for HCEnc should be about 8000 kbps (including a little safety margin).
Good point. I agree. Next release will have that fix for both WAV and DTS streams @1536 kbps.

And for the extra space, probably you are right, it would be more straightforward to manage all the output in the same way.



Bye
__________________
MrC

AVStoDVD Homepage
AVStoDVD @ Doom9 Forum
MrC is offline   Reply With Quote
Old 27th August 2012, 22:35   #2106  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,078
Thanks a lot for considering my suggestions...
Quote:
Originally Posted by MrC View Post
And for the extra space, probably you are right, it would be more straightforward to manage all the output in the same way.
Maybe with the exception when the user chooses "Custom Size". In this case the user might prefer to reach the specified size as much as possible and not care that much about creating a DVD.

Another suggestion:
When audio normalizing is selected, audio is normalized to 100%. I have read more than once that this is not a good idea when you are creating compressed audio files. Maybe the default should be "audio.normalize(0.98)" ?

And I found one more error in the language file, the latest version is here:
http://www.sendspace.com/file/wegtjl



Cheers
manolito

Last edited by manolito; 28th August 2012 at 00:18.
manolito is offline   Reply With Quote
Old 28th August 2012, 19:52   #2107  |  Link
MrC
AVStoDVD Dev
 
MrC's Avatar
 
Join Date: Apr 2006
Location: Italy
Posts: 1,302
Quote:
Originally Posted by manolito View Post
Another suggestion:
When audio normalizing is selected, audio is normalized to 100%. I have read more than once that this is not a good idea when you are creating compressed audio files. Maybe the default should be "audio.normalize(0.98)" ?
Good suggestion. I can add a textbox in the Preferences to customize the normalization value (with 0.98 as default).

Quote:
Originally Posted by manolito View Post
And I found one more error in the language file, the latest version is here:
http://www.sendspace.com/file/wegtjl
Thanks for the update and for the strong support!



Bye
__________________
MrC

AVStoDVD Homepage
AVStoDVD @ Doom9 Forum
MrC is offline   Reply With Quote
Old 31st August 2012, 19:57   #2108  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,078
Sources with mono audio

It seems that many conversion programs cannot handle sources with mono audio. This is an old issue, it has nothing to do with AVStoDVD itself, but it would be nice to have some kind of an automatic workaround to avoid the situation that after the whole encode is finished you notice that the resulting DVD is not working due to a screwed-up audio stream.

I tested a couple of MP4 sources (AVC video, mono AAC audio). AVDtoDVD always prefers DirectShow over ffms2 as long as a DS source filter and a splitter are present. I have ffdshow and Haali installed, so AVStoDVD uses DirectShow for these files.

The resulting DVD contains audio at half speed. Sounds very interesting at times (especially when the source is an adult clip), but mostly this effect is not what you want...

I experimented a little, and for me forcing ffms2 as the source filter always worked (using DS and forcing stereo output did not work).

Do you think that automatically using ffms2 whenever a mono audio source is detected would be a good idea? Or is there a better way?


Cheers
manolito
manolito is offline   Reply With Quote
Old 31st August 2012, 22:00   #2109  |  Link
qyot27
...?
 
qyot27's Avatar
 
Join Date: Nov 2005
Location: Florida
Posts: 1,419
Quote:
Originally Posted by manolito View Post
It seems that many conversion programs cannot handle sources with mono audio. This is an old issue, it has nothing to do with AVStoDVD itself, but it would be nice to have some kind of an automatic workaround to avoid the situation that after the whole encode is finished you notice that the resulting DVD is not working due to a screwed-up audio stream.

I tested a couple of MP4 sources (AVC video, mono AAC audio). AVDtoDVD always prefers DirectShow over ffms2 as long as a DS source filter and a splitter are present. I have ffdshow and Haali installed, so AVStoDVD uses DirectShow for these files.

The resulting DVD contains audio at half speed. Sounds very interesting at times (especially when the source is an adult clip), but mostly this effect is not what you want...

I experimented a little, and for me forcing ffms2 as the source filter always worked (using DS and forcing stereo output did not work).

Do you think that automatically using ffms2 whenever a mono audio source is detected would be a good idea? Or is there a better way?


Cheers
manolito
Just out of curiosity, does it work with DirectShow if you add GetChannel(1,1) to the script it uses? It's basically a dumb way of turning mono into stereo, but if it works then it's something to consider (IMO, it'd probably be a good idea to do that regardless of the source filter, but whatever).
qyot27 is offline   Reply With Quote
Old 31st August 2012, 23:53   #2110  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,078
Quote:
Originally Posted by qyot27 View Post
Just out of curiosity, does it work with DirectShow if you add GetChannel(1,1) to the script it uses?
Thanks for the suggestion, this would have been very nice, but unfortunately no, it doesn't work. Audio still comes out at half speed.

And ffms2 also is not the universal solution. For a couple of test source files with mono aac audio I got an error message that no audio could be found. Bummer...

//Edit
It turned out that this error message could be ignored. It was an AviSynth error message triggered by Quenc. It said that no audio could be found and pointed to the AVS file line #3. Just clicking OK resulted in a perfect conversion.

Which means that for sources with mono audio ffms2 must be used instead of DirectShow.



Cheers
manolito

Last edited by manolito; 1st September 2012 at 12:39.
manolito is offline   Reply With Quote
Old 1st September 2012, 22:09   #2111  |  Link
MrC
AVStoDVD Dev
 
MrC's Avatar
 
Join Date: Apr 2006
Location: Italy
Posts: 1,302
@manolito

I'm not sure to have understood what is the problem with 1 channel output. If the source has a 1.0 audio track, AVStoDVD just keep it as mono. Or at least, it is supposed to do that...

Mono conversion log sample

Do you have a log or, even better, a portion of the problematic source file?



Bye
__________________
MrC

AVStoDVD Homepage
AVStoDVD @ Doom9 Forum
MrC is offline   Reply With Quote
Old 2nd September 2012, 01:09   #2112  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,078
Here is a test file with mono aac audio and two conversion logs. With DirectShowSource you get audio at half speed, with FFMPEGSource everything works fine.
http://www.sendspace.com/file/5wcdi1

Could it have something to do with the uncommon sample rate of 22.05 kHz? Unfortunately files like this are quite common on the internet.



Cheers
manolito
manolito is offline   Reply With Quote
Old 2nd September 2012, 18:09   #2113  |  Link
MrC
AVStoDVD Dev
 
MrC's Avatar
 
Join Date: Apr 2006
Location: Italy
Posts: 1,302
Weird audio track:

Code:
AAC LC-SBR - 17 kbps - VBR - 1 ch - 22050 / 11025 Hz - 20 seconds (0 ms delay) - Internal
effectively DSS is not able to handle that. Speed distorsion comes out even removing ConvertToMono and SSRC(48000). Could be a ffdshow issue dealing with 1.0 AAC?

BTW 1.0 tracks are not all problematic, I have some samples (mp3 actually) that are correctly converted using DSS/ffdshow.

I will surely put a reference to this issue to the audio FAQ section.



Bye
__________________
MrC

AVStoDVD Homepage
AVStoDVD @ Doom9 Forum
MrC is offline   Reply With Quote
Old 2nd September 2012, 20:04   #2114  |  Link
qyot27
...?
 
qyot27's Avatar
 
Join Date: Nov 2005
Location: Florida
Posts: 1,419
It would appear that only the libavcodec option in ffdshow has an issue. Just a wild guess, but I think it's that the file is using Parametric Stereo (HE-AAC v2), since ffdshow's libfaad2 option and CoreAAC (also based on faad2) both handle it correctly. ffdshow version is r4486. ffmpeg itself (git-f857465, built on August 4th 2012) does not exhibit the problem. So either ffdshow doesn't integrate libavcodec's AAC decoder quite right, or there's a fix for Parametric Stereo that exists in FFmpeg but not in libav, which seems to be what ffdshow switched to.
qyot27 is offline   Reply With Quote
Old 2nd September 2012, 21:49   #2115  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,078
Thanks so much qyot27, you got it exactly right...

After changing the ffdshow audio configuration and selecting libfaad2 for aac decoding AVStoDVD handles this audio stream correctly.


Cheers
manolito
manolito is offline   Reply With Quote
Old 22nd September 2012, 03:30   #2116  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,078
Stable Version 2.50

Stable version 2.50 has just been released, thanks a lot MrC...

I have already tested it a little bit, everything works just fine so far.


Cheers
manolito
manolito is offline   Reply With Quote
Old 23rd September 2012, 19:24   #2117  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,078
There is an issue with MediaInfo when the source is a DVD compliant MPEG2 file (one video track, one AC3 audio track). MediaInfo 07.59 reports a nonexistent second MPEG audio track with a bitrate of 0 kbps. (The latest version 07.60 also shows this issue)

This throws off AVStoDVDs size calculation quite a bit. Going back to version 07.58 fixed the issue.



Cheers
manolito
manolito is offline   Reply With Quote
Old 23rd September 2012, 20:34   #2118  |  Link
MrC
AVStoDVD Dev
 
MrC's Avatar
 
Join Date: Apr 2006
Location: Italy
Posts: 1,302
Hi Manolito,

there's already 2.5.1 release, 2.5.0 had a bug in the Installer package. Mediainfo is still 0.7.59.

I cannot replicate your issue with mpg, this is a very simple mpg2 file I use for testing:

Quote:
GENERAL INFO
PathName: D:\Movies\Test\Bad Day Mpeg2 720x576 1.333 AC3.mpg
FileName: Bad Day Mpeg2 720x576 1.333 AC3
FileExt: mpg
FileSize: 13,4 MB
Container Format: MPEG-PS
Video Tracks: 1
Audio Tracks: 1
Text Tracks: 0

VIDEO INFO
Time: 26 seconds
Compression: MPEG-2 Video
BitRate Mode:
Avg BitRate: 4000 kbps
Min BitRate:
Max BitRate:
Resolution: 720x576
Display AspectRatio: 1,333
Pixel AspectRatio: 1,067
Frame AspectRatio: 1,25
Standard: PAL
FrameRate Mode: CFR
FrameRate: 25 fps
Frame Count: 654
Scan Type: Progressive
Field Order:

AUDIO INFO (Track 0)
ID: 189 (0xBD)
Time: 26 seconds
Compression: AC3
BitRate Mode: CBR
Avg BitRate: 192 kbps
Channels: 2
SampleRate: 48000 Hz
Resolution: 16 bit
Language:
Delay: 0 ms


Bye
__________________
MrC

AVStoDVD Homepage
AVStoDVD @ Doom9 Forum
MrC is offline   Reply With Quote
Old 23rd September 2012, 22:02   #2119  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,078
Looks like the Mediainfo problem only shows up for bigger files...

I stripped a short segment from the file which exhibited the issue, and now Mediainfo 07.59 reported everything correctly. Strange...

I imported both files (the original long version plus the stripped short version) into AVSoDVD, and this is what it looks like (notice the DVD size for the long version, it should be ~4400 MB):

http://www.bilderload.com/bild/24809...ainfoCNTSD.png


Another question:
I noticed that you still use a very old version (version 2.12) of ffms2.dll. Is there a reason for it, or can I upgrade to the current version 2.17 ?


Cheers
manolito

Last edited by manolito; 23rd September 2012 at 22:16.
manolito is offline   Reply With Quote
Old 23rd September 2012, 22:21   #2120  |  Link
MrC
AVStoDVD Dev
 
MrC's Avatar
 
Join Date: Apr 2006
Location: Italy
Posts: 1,302
Got it. Have you already informed Zenitram about the 0.7.59-60 bug?

About FFMS2, AVStoDVD is still equipped with 2.12 release, I did not have the time to check the next releases compatibility. BTW the only flags used are 'track', 'cachefile' and 'seekmode' together with FFVideoSource and FFAudioSource. If nothing has changed about that, you can safely go with 2.17. Let me know.



Bye
__________________
MrC

AVStoDVD Homepage
AVStoDVD @ Doom9 Forum
MrC 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 Off
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 14:54.


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