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 > Announcements and Chat > General Discussion
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 8th December 2002, 12:07   #21  |  Link
Chibi Jasmin
Registered User
 
Join Date: Oct 2001
Posts: 800
Problem with Intervideo Audio here: Wrong channel mapping or something...dialogues come out of right front speaker (supposed to be center), didn't do extensive tests for the other speakers...something to look at...all seems still fine with AC3Filter!
Chibi Jasmin is offline   Reply With Quote
Old 8th December 2002, 23:48   #22  |  Link
ppera2
Registered User
 
ppera2's Avatar
 
Join Date: Oct 2001
Location: Lands of confusion
Posts: 1,217
ogo: I tried 0.95b and 0.95c . In c is now AC3 sound OK with 4-6 channel too. Unfortunately there is still problem in Win 98. WMP 7 and WMP 6.4 still frozes right after start, with all versions. Tried several times, with different codecs and directshow filters.
ppera2 is offline   Reply With Quote
Old 9th December 2002, 00:35   #23  |  Link
Chibi Jasmin
Registered User
 
Join Date: Oct 2001
Posts: 800
@ppera2: You don't have any channel mapping problems with Intervideo audio?
Chibi Jasmin is offline   Reply With Quote
Old 9th December 2002, 00:57   #24  |  Link
gabest
Registered User
 
gabest's Avatar
 
Join Date: Oct 2001
Posts: 1,459
I don't have any either. Tested it with ac3test.vob saying: "front left, front right, real left, ...".
__________________
gabest.org
gabest is offline   Reply With Quote
Old 9th December 2002, 01:05   #25  |  Link
Chibi Jasmin
Registered User
 
Join Date: Oct 2001
Posts: 800
Strange...I had...tested by simply exchanging ac3filter.ax and iviaudio.ax and back...with iviaudio.ax center (spoken words) comes from the right, but only in conjunction with ReClock, using DirectSound Renderer iviaudio is fine...

@gabest&ogo:

One other thing...I am no expert on this, so correct me if I am wrong, but I got to the following idea, when reading that Ogo is searching for a better algorithm for audio resampling:

As far as I understood DVobSub's frame rate conversion does not do audio resampling (by looking at DSound Renderer I still had it at 48000Hz, but the frequency variable was modified from for example 1.00 to 1.04 (23.976->25 fps)), is that correct?

Wouldn't it then be possible to use DVobSub's way of frame rate correction for the audio and still maintain the clock correction capability of ReClock to avoid resampling and still have the corrected audio clock?

Maybe it's not possible, I didn't fully understand the concept, sorry if it's stupid.

BTW: Where can I get the ac3test.vob?
Chibi Jasmin is offline   Reply With Quote
Old 9th December 2002, 01:20   #26  |  Link
gabest
Registered User
 
gabest's Avatar
 
Join Date: Oct 2001
Posts: 1,459
I got mine from here:
http://www.inside.dk/websupport/DVD-test/

The pitch still changes with dsound render, so it must be sending out the samples with a changed frequency too.
__________________
gabest.org
gabest is offline   Reply With Quote
Old 9th December 2002, 01:46   #27  |  Link
Chibi Jasmin
Registered User
 
Join Date: Oct 2001
Posts: 800
Thanx...

Well, as far as I understood, ReClock does two things (I will assume a 23.976 -> 25 fps conversion with the following numbers):

1. Resample 48000 Hz audio to 50050 Hz
2. Do little corrections to the audio clock of 48000, always setting different values close to 48000.

I thought

a) it might be possible to avoid resampling and just set audio clock to 50050 Hz and do the little clock corrections based on that frequency

or

b) it might be possible to avoid resampling and do the audio conversion for frame rate the way DVobSub does (it sets the frequency parameter (don't know exactly the meaning, but I saw it in DSound Renderer) from 1.00 to 1.04 (for 23.976->25fps) and do the audio clock sync corrections still based on 48000 hz.

maybe one of the two methods is possible and would make resampling unnecessary? Just an idea, I am not the expert...

I will play with the ac3test.vob later and post results with iviaudio.ax, I expect some wrong mapping...
Chibi Jasmin is offline   Reply With Quote
Old 9th December 2002, 01:56   #28  |  Link
Chibi Jasmin
Registered User
 
Join Date: Oct 2001
Posts: 800
Okay, back with AC3-test results using reclock 0.95c

Ac3filter: all okay

iviaudio:

Front left: comes out of Front left
Center: comes out of Front right
Front right: comes out of Center
Rear left: comes out of LFE
Rear right: comes out of Rear left
LFE: couldn't hear it (low frequency), but it should possibly be Rear right, if no speaker is double-assigned.
Chibi Jasmin is offline   Reply With Quote
Old 9th December 2002, 04:02   #29  |  Link
gabest
Registered User
 
gabest's Avatar
 
Join Date: Oct 2001
Posts: 1,459
fleft, fright, center, lfe, rleft, rright, ... is correct the order of the interleaved audio samples, but I have no idea why you hear them from the wrong speaker

I noticed another thing with the (for me not working) ac3filter, the number of channels I set the number of times the duration decimates. The length is still 1:00 but with six channels it will reach the end of the stream at 0:10.
__________________
gabest.org
gabest is offline   Reply With Quote
Old 9th December 2002, 10:05   #30  |  Link
ogo
Registered User
 
Join Date: Oct 2001
Posts: 156
Hi !

Lots of intersting results guys
- for win98, i don't have it anymore, but i know i still have a very bad deadlock to solve (DirectShow i a nightmare on this side for me, nothing is very well documented ...). Maybe the deadlock will solve the prob. Anyway i will try to reinstall a win98 partition to test it, cause it should work fine under win98

- Intervideo Audio Decoder: i only have a four channel sound card (a Fortissimo II -great sound card by the way-), so i cannot test 5.1 sound. Anyway sound was ok for me in 4 channels. It's strange that 2 of you don't get the same results. Maybe if i explain what the problem was (is) with iviaudio, Gabest will be able to help me The problem is that iviaudio does not propose a media type in WAVEFORMATEXTENSIBLE as it should (more than 2 channels). In place it gives me a WAVEFORMATEX with more than 2 channels. Odd, since WAVEFORMATEX is only intended for 1 or 2 channels (this is an old structure), and does not include any channel mapping information. So i reconstruct a WAVEFORMATEXTENSIBLE for DirectSound and i configure the channels from the number of channels in the WAVEFORMATEX structure (4->Quad, 6->5.1, 8->7.1). But doing this i suppose that iviaudio does send the samples in the right channel order for DirectSound. It seems to be the case for me and Gabest, but not for Chibi Jasmin. So i miss something somewhere, but what ?

- AC3Filter: strange again. This time it works for Chibi Jasmin and me, but not for Gabest. Which version of AC3Filter do you use Gabest ?

- For the sound resampling problem : the resampling is mandatory even if there is no framerate correction, because the reference clock is derived from the video card, so there always is some deviation in the audio speed that must be corrected to avoid synchronisation problems with video. The default directsound renderer does this resampling using directsound (it tells the audio card to changes its hardware audio clock) ; at first i tried to do it the same way, but it didn't give very good results (pops, cracks, etc...). And it was not working with 48000hz audio tracks with framerate correction from 23,976->25fps, because directsound can't go beyond 50000hz resampling. The only problem i have with the algorithm i use is that it does linear interpolation which is not perfect for quality. BTW i will give source code for the resampler and the drc algorithm in next versions, because they are based on modified freeware source code. Maybe someone will improve the resampler The DRC is not perfect, but is quite easy to improve !

Without speaking of AC3, i know there is something still wrong with sound. I tested ReClock with more than 50 files, and i have 3 of them that produce bad sound. These are some old Captain Future episodes in 1 channel, 16 bits sound coming from the ACM wrapper. If i play those files with WMP, sound is ok. If i play with anything else (bsplayer, graphedit, ...) the samples i receive are not playable because sound is completely saturated, and i muse divide the samples by at least 100 to obtain hearable results ... It's not a resampling or DRC bug, because i still have the bug without the resampler or the DRC ...
I'm really scratching my head because i'm 99.9% sure that my code is correct (the mediatype checking/settings is really a not difficult part of a filter)

Just for curiosity which system clock deviation do you get on your PC's ? On a friends PC, i have seen 12000hz deviation for a 3.5mhz system clock. It's gigantic, and it means one frame missed every 300 frames ...
On my PC i get from 70 to 450 hz for a 1,2mhz clock depending on resolution and refresh rate.

OGO
ogo is offline   Reply With Quote
Old 9th December 2002, 10:25   #31  |  Link
gabest
Registered User
 
gabest's Avatar
 
Join Date: Oct 2001
Posts: 1,459
Quote:
The problem is that iviaudio does not propose a media type in WAVEFORMATEXTENSIBLE as it should (more than 2 channels). In place it gives me a WAVEFORMATEX with more than 2 channels
DO NOT accept that, it tries to fool you. If you reject it will try the correct one with WAVEFORMATEXTENSIBLE. I also fall in this trap a few weeks ago. I had no problems probably because I tested it through my audio switcher...
Quote:
This time it works for Chibi Jasmin and me, but not for Gabest. Which version of AC3Filter do you use Gabest ?
0.55b, the last one out. Tried with or without audio switcher, in every possible player. I have an sblive with 4 outputs, using it under xp.
__________________
gabest.org

Last edited by gabest; 9th December 2002 at 10:28.
gabest is offline   Reply With Quote
Old 9th December 2002, 10:51   #32  |  Link
ogo
Registered User
 
Join Date: Oct 2001
Posts: 156
:-)

Thanks Gabest. I'll correct that tonight !
ogo is offline   Reply With Quote
Old 9th December 2002, 11:13   #33  |  Link
Chibi Jasmin
Registered User
 
Join Date: Oct 2001
Posts: 800
Quote:
Originally posted by ogo
- For the sound resampling problem : the resampling is mandatory even if there is no framerate correction, because the reference clock is derived from the video card, so there always is some deviation in the audio speed that must be corrected to avoid synchronisation problems with video. The default directsound renderer does this resampling using directsound (it tells the audio card to changes its hardware audio clock) ; at first i tried to do it the same way, but it didn't give very good results (pops, cracks, etc...). And it was not working with 48000hz audio tracks with framerate correction from 23,976->25fps, because directsound can't go beyond 50000hz resampling. The only problem i have with the algorithm i use is that it does linear interpolation which is not perfect for quality.

Just for curiosity which system clock deviation do you get on your PC's ? On a friends PC, i have seen 12000hz deviation for a 3.5mhz system clock. It's gigantic, and it means one frame missed every 300 frames ...
On my PC i get from 70 to 450 hz for a 1,2mhz clock depending on resolution and refresh rate.

OGO
You sure, directsound cannot go beyond 50000? Try the simple DivXG400 fps conversion (not working for multichannel), and it will go beyond 50000 to be exact for 23.976->25 it goes to 50049 (properties of directsound renderer, without pops or cracks btw.

You say the default DSound Renderer also resamples??? I thought, it just sticks to the audio frequency of 48000 and that's why there is some desync (the reason why reclock was born)?

So how exactly does DVobsub do the fps-correction? I still don't understand. Going from 23.976 to 25 fps I see in Directsound renderer. With DivXG400: 50049 Hz, Freq 1.00 and with DVobSub 48000 Hz, Freq 1.04...does dvobsub also resample? Or what is this 1.04 parameter? One issue: If I remember correctly, DVobSub's frame rate correction (once forced into dvdchain with Cyberlink Video Decoder it got the right fps), was rejected by DVDNavigator, so its method might not be usable for dvdgraphs...

on my system I have: about 1191018.90 Hz with about -2163.1 Hz correction (varies a bit).

BTW: Don't forget the manual source frame rate

@gabest: manual source frame rate would also be great in dvobsub for the same reason and while you're at it: could you make dvobsub not reset the frame rate value in the force fps field to the frame rate of the media on file open but just stick to the entered value?

Last edited by Chibi Jasmin; 9th December 2002 at 11:21.
Chibi Jasmin is offline   Reply With Quote
Old 9th December 2002, 11:48   #34  |  Link
ogo
Registered User
 
Join Date: Oct 2001
Posts: 156
>You sure, directsound cannot go beyond 50000? Try the simple >DivXG400 fps conversion (not working for multichannel), and it will >go beyond 50000 to be exact for 23.976->25 it goes to 50049 (properties of directsound renderer, without pops or cracks btw.
Strictly speaking the limit is 100000 in DirectSound. But my sound card won't go beyond 50000 (and i suppose many other sound cards).

>You say the default DSound Renderer also resamples??? I thought, it >just sticks to the audio frequency of 48000 and that's why there is >some desync (the reason why reclock was born)?
Just pitch change by modifyng the playback rate (ie playing audio at 48000hz on a card clocked at 50050hz). Maybe i wrong, i didn't play a lot with the ds renderer.
The reason of reclock is to have frames drawn in synch with vertical sync to suppress jerkyness by providing a reference clock and making frame rate corrections if necessary. I have a Philips 16/9 TV with a "Natural motion" processor that does frame interpolation at 100hz from a PAL or NTSC source. It works great, but the natural motion processor get completely confused when a frame come out of sync... Imagine playing a smooth game on you PC at 100fps, that some time go below 25fps. Unplayable
Anyway with recent versions of DirectX, the default audio renderer can slave its clock to an external reference clock, so reclock may probably have been written without having to make a complete audio renderer (just a reference clock and a properties panel). But i preferred to make a new renderer for the following reasons :
- i already knew directsound
- the limits of my sound card made impossible the frame rate conversion from 23,976 to 25 fps at 48khz
- i wanted a DRC
- i suspect the default audio renderer is not very smart when slaved to an external clock. In reclock i can control the sound the way i want

>So how exactly does DVobsub do the fps-correction? I still don't >understand. Going from 23.976 to 25 fps I see in Directsound >renderer. With DivXG400: 50049 Hz, Freq 1.00 and with DVobSub 48000 >Hz, Freq 1.04...does dvobsub also resample? Or what is this 1.04 >parameter?
25/23.976 = 1.0427, and 1.0427x48000 = 50050. So 1.04 is the pitch factor applied to the sound card. If you see something else than 1.00 in the default ds renderer, there must be some pitch change by it.

>BTW: Don't forget the manual source frame rate
Sure
ogo is offline   Reply With Quote
Old 9th December 2002, 12:07   #35  |  Link
Chibi Jasmin
Registered User
 
Join Date: Oct 2001
Posts: 800
>Strictly speaking the limit is 100000 in DirectSound. But my sound card won't go beyond 50000 (and i suppose many other sound cards).

Okay...

>Just pitch change by modifyng the playback rate (ie playing audio at 48000hz on a card clocked at 50050hz). Maybe i wrong, i didn't play a lot with the ds renderer.

well, this pitch change is not much in reality...a lot of original pal dvds also have this pitch change...wouldn't it be an option to do it this way at around 50050 hz? Well, okay, as you described above it wouldn't...for the 50000hz limit of some soundcards...

>Anyway with recent versions of DirectX, the default audio renderer can slave its clock to an external reference clock, so reclock may probably have been written without having to make a complete audio renderer (just a reference clock and a properties panel). But i preferred to make a new renderer for the following reasons :
- i already knew directsound
- the limits of my sound card made impossible the frame rate conversion from 23,976 to 25 fps at 48khz
- i wanted a DRC
- i suspect the default audio renderer is not very smart when slaved to an external clock. In reclock i can control the sound the way i want

Okay, sure, at least you know what you got then...

>25/23.976 = 1.0427, and 1.0427x48000 = 50050. So 1.04 is the pitch factor applied to the sound card. If you see something else than 1.00 in the default ds renderer, there must be some pitch change by it.

Yeah, that's what I thought to...can't this pitch factor also be used for reclock?

Forgive me, but I just don't see the point in resampling, if we could either modify this pitch factor or modify the audio clock (okay, you didn't wanna go beyond 50000Hz)...isn't it possible to apply the needed sync corrections including frame rate conversion to one of these without resampling?

>>BTW: Don't forget the manual source frame rate
>Sure

I will appreciate it...

Thanx in advance!
Chibi Jasmin is offline   Reply With Quote
Old 9th December 2002, 12:34   #36  |  Link
ogo
Registered User
 
Join Date: Oct 2001
Posts: 156
>Yeah, that's what I thought to...can't this pitch factor also be >used for reclock?
This is called the "rate" in directshow. For example, when you "increase rate" in MPC, you will change the directshow "rate" for all the filters in the graph. reclock as a filter can also be slaved by rate change (try it with MPC).
Most filters that change frame rate do it with directshow "rate" change on the graph.
But when reclock adapt frame rate, it does it differently : it just slow or accelerate it's reference clock. There are two rates in reclock : the directshow rate (shared with other filter), and the reference clock rate (used to fool other filters ).

>Forgive me, but I just don't see the point in resampling, if we >could either modify this pitch factor or modify the audio clock
>(okay, you didn't wanna go beyond 50000Hz)...isn't it possible to >apply the needed sync corrections including frame rate conversion to >one of these without resampling?
The only way to correct audio is to slow it or to accelerate it, by two means :
(1) pitch change by the hardware (with limitations on some sound cards)
(2) software resampling
i only implement solution (2) in the current version. But you make me think i could also propose solution (1) in future versions. In fact my very early work was using version (1) but i was not happy with the results.
ogo is offline   Reply With Quote
Old 9th December 2002, 13:44   #37  |  Link
cca
Anime Otaku
 
Join Date: Oct 2002
Location: Somewhere in Cyberspace...
Posts: 437
Nice work Ogo, your filter came right when I was about to go mad! I spent the entire weekend trying to find out why my XVID (or DivX) encodes are playing with jerky motion now and then. Your filter works fine in conjuction with AC3Filter in my PC. But I have one question: What happens if someone wants to use the S/PDIF output to pass the audio to an external decoder? Can Reclock help in this case? Or it just messes up the degital stream? Or there is no need to use Reclock in this case?
__________________
AMD FX8350 on Gigabyte GA-970A-D3 / 8192 MB DDR3-1600 SDRAM / AMD R9 285 with Catalyst 1.5.9.1/ Asus Xonar D2X / Windows 10 pro 64bit
cca is offline   Reply With Quote
Old 9th December 2002, 14:17   #38  |  Link
sekxx
Registered User
 
Join Date: Jan 2002
Posts: 78
[offsubject]
Thank's for your work ogo!
Just wanted to know if you are the ogo that have made a mod on mpeg2avi.exe some year ago?
[/offsubject]
sekxx is offline   Reply With Quote
Old 9th December 2002, 14:58   #39  |  Link
ogo
Registered User
 
Join Date: Oct 2001
Posts: 156
Yep it's me !

I also made the first modified version of DVD2AVI (1.82) with a resizer. It started a "fever" of mods on DVD2AVI, but it's a pity to see that no one released a unified (and clean) DVD2AVI version with all the useful mods after that.

After that i played a little bit with GKnot (vdubconf).

I've always been interested in stuff related to video.

ogo is offline   Reply With Quote
Old 9th December 2002, 15:33   #40  |  Link
ppera2
Registered User
 
ppera2's Avatar
 
Join Date: Oct 2001
Location: Lands of confusion
Posts: 1,217
Yes, DVD2AVI 1.82 is great work. Session save is very useful too.

Some guys make currently MPEG Manipulator based on DVD2AVI, but it is far from usable. Maybe you can direct them in right way?
ppera2 is offline   Reply With Quote
Reply


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 09:36.


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