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 > General > Audio encoding
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 3rd February 2010, 09:29   #1  |  Link
Lincoln Burrows
Registered User
 
Lincoln Burrows's Avatar
 
Join Date: Mar 2008
Posts: 280
Not sure what I should do in this case

Last night I was checking one of my old AVI files and used VirtualDubMOD to demux the MP3 stream (Save WAV option).

The reason I did that was because there's only audible sound in one side, the other is 100% mute, so I need to duplicate channels and make the audio stream normal again.

At first I thought it was only a matter of doing a simple conversion using SoundForge (last version). And it really worked. I saved into MP3 again, and inserted that stream on the AVI, saving using DirectStream copy and disabling the original.

Then I noticed something strange. The new audio (which may have only a different bitrate, like 96 to 128 kbp/s but still remains to be 44 Khz as far as I can tell) lasts 2 seconds more than the original one.

I checked the sync and it was fine for two of those videos, really: nothing is out of sync.

But then the third video was (don't recall exactly how much longer was it, but it didn't match the original lenght of the audio) indeed out of sync.

Which makes me wonder if this is the proper way to solve this problem. Should I use another software instead of Sound Forge? Why the lenght is different if the only thing I did was to duplicate the channels?

I am going to post here only the original audio from the video, the one that was out of sync only when the half-channel issue was fixed. Solving this problem caused another:

http://www.mediafire.com/?mm0neuz0z4x (filesize: 19 MB).

If you guys just wanna take a look.

In this case I can't hear anything on the right side (number 2), despite the graph showing otherwise. When I merge both channels, the problem described above (audio out of sync) shows up.

Picture from the graph after analysing this file:
http://img502.imageshack.us/img502/4168/imagem1ne.png

Maybe in this case something else happened because the right side wasn't totally mute despite the fact I can't hear anything in playback?
__________________
"Whoever has not known himself has known nothing. But whoever has known himself has simultaneously achieved knowledge about the depth of all things."

Last edited by Lincoln Burrows; 3rd February 2010 at 09:31.
Lincoln Burrows is offline   Reply With Quote
Old 3rd February 2010, 12:45   #2  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,915
Quote:
Originally Posted by Lincoln Burrows View Post
Last night I was checking one of my old AVI files and used VirtualDubMOD to demux the MP3 stream (Save WAV option).
1) Use always 'Demux' instead 'Save WAV'

2) Check if there are initial padded '0', before the first mp3/ac3 header to see if there are a VirtualDub Delay (use DelayCut with the audio or AVIMux_GUI with the avi)

3) Decode/edit/encode the audio and insert the delay (if any) in wav editor or after encode with DelayCut.

4) Remux the audio, and Disable the original, with VirtualDubMod -> Streams -> Stream list -> Add

Quote:
Then I noticed something strange. The new audio (which may have only a different bitrate, like 96 to 128 kbp/s but still remains to be 44 Khz as far as I can tell) lasts 2 seconds more than the original one.
The new audio is OK, the method to know the original duration is wrong. Trust in good decoders (SoundForge, Lame, ...), some soft can use a quick, but inaccurate, method to show the duration (FileSize / Bitrate) and don't work with VBR.

Quote:
But then the third video was (don't recall exactly how much longer was it, but it didn't match the original lenght of the audio) indeed out of sync.
If is out of sync you have a initial delay lost.

Quote:
http://www.mediafire.com/?mm0neuz0z4x (filesize: 19 MB).

In this case I can't hear anything on the right side (number 2), despite the graph showing otherwise.
I can hear the right channel with less volume than the left channel (very high volume and clipped). You must amplify the right and attenuate the left until you have a balanced audio.
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline   Reply With Quote
Old 3rd February 2010, 15:12   #3  |  Link
Lincoln Burrows
Registered User
 
Lincoln Burrows's Avatar
 
Join Date: Mar 2008
Posts: 280
DelayCut doesn't read Mp3 files. I instructed to read all kinds of files and the answer was that for the MP3 demuxed from the video:

Quote:
====== INPUT FILE INFO ========================
File is mpeg 1 layer 3
Bitrate (kbit/s) 128
Act rate (kbit/s) 128.000
File size (bytes) 20288334
Channels mode Joint Stereo
Sampling Frec 44100
Low Frec Effects LFE: Not present
Duration 00:21:08.020
Frame length (ms) 26.122449
Frames/second 38.281250
Num of frames 48541
Bytes per Frame 417.9592
Size % Framesize 46737
CRC present: NO
=============================================
====== TARGET FILE INFO ======================
Start Frame 0
End Frame 48540
Num of Frames 48541
Duration 00:21:08.009
NotFixedDelay 0.0000
=============================================
Where does it say there's a delay? And look at this one (from the video):
http://img638.imageshack.us/img638/9691/imagemjs.png

Note: When analysing the MP3 demuxed from the video, Avi Mux said it was MP3, CBR, 128 kbp/s 2 ch, 44.100 Hz.

If I choose to convert this MP3 into a VBR file, will that be recommended or should I stick with CBR?

Quote:
You must amplify the right and attenuate the left until you have a balanced audio.
I was doing that way:

Channel Converter > Duplicate the right side into the left. And then > reducing the overall volume from both sides (minus -9 db for example). Amplifying one side to match another will not give the precise volume for both sides, if I understand that correctly. The original idea was to remove everything audible on the "defective" side and replace by all information present in the working (in this case, left) side.
__________________
"Whoever has not known himself has known nothing. But whoever has known himself has simultaneously achieved knowledge about the depth of all things."
Lincoln Burrows is offline   Reply With Quote
Old 3rd February 2010, 20:54   #4  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,915
Quote:
Originally Posted by Lincoln Burrows View Post
...
Where does it say there's a delay?
...
Note: When analysing the MP3 demuxed from the video, Avi Mux said it was MP3, CBR, 128 kbp/s 2 ch, 44.100 Hz.
To know the delay you must process the audio:
Code:
====== INPUT FILE INFO ========================
...
Duration         	00:01:00.000
Frame length (ms)	24.000000
Frames/second    	41.666667
Num of frames    	2500
Bytes per Frame  	 384.0000
...
=============================================
====== TARGET FILE INFO ======================
...
Num of Frames 	2500
Duration      	00:01:00.000
=============================================
====== PROCESSING LOG ======================
Time 00:00:00.000; Frame#= 1. Unsynchronized frame...SKIPPED  15744 bytes. Found new synch word
Number of written frames = 2459
Number of Errors= 1
Then there are a VD delay of (15744/384)*24 = 984 ms
And the audio is 2459 * 24 = 59016 ms
Total: 984 + 59016 = 60000 ms

When load the original avi in AviMuxGUI show about the audio:
Code:
audio: MPEG 1 Layer 3 (VBR, 2 Ch, 48kHz, bad: 15744 , delay: 984 ms, 938 KByte)
Quote:
If I choose to convert this MP3 into a VBR file, will that be recommended or should I stick with CBR?
VBR isn't supported (officially) in AVI container.

There are hacks to mux VBR, don't use VirtualDubMod, use AviMuxGUI (with proper settings) instead.

EDIT: in your sample I don't see delay then must be in sync
__________________
BeHappy, AviSynth audio transcoder.

Last edited by tebasuna51; 3rd February 2010 at 20:58.
tebasuna51 is offline   Reply With Quote
Old 3rd February 2010, 23:00   #5  |  Link
Lincoln Burrows
Registered User
 
Lincoln Burrows's Avatar
 
Join Date: Mar 2008
Posts: 280
Quote:
When load the original avi in AviMuxGUI show about the audio
It is not showing anything like that.

Look:


DelayCut reports from the extracted MP3 from that same video:

Quote:
[Input info]
Bitrate=128
Actual rate=128.000000
Sampling Frec=44100
TotalFrames=48541
Bytesperframe= 417.9592
Filesize=20288334
FrameDuration= 26.1224
Framespersecond= 38.2813
Duration=00:21:08.020
Channels mode=Joint Stereo
LFE=LFE: Not present
[Target info]
StartFrame=0
EndFrame=48540
NotFixedDelay= 0.0000
Duration=00:21:08.009
====== PROCESSING LOG ======================
Number of written frames = 48654
Number of Errors= 0
I don't understand what exactly you tried to explain. Correct me if I am wrong:

Quote:
You said that I need to edit the MP3 file (demuxed) to correct the channel problem (using Sound Forge), and then save it.

Later I should generate another copy (or the same, but disabling the current faulty audio) from the AVI, but adding the new MP3 file.

And only then, check the delay on both DelayCut/AviMuxGUI.

If that's the case, then I should assume DelayCut will only work as a tool to insert the ammount of delay necessary, while AviMuxGUI will be the one capable of telling if the inserted new MP3 on the video will match the own's video specs. Meaning that if I remove the original MP3 and insert the new one and it happens that what I did on Sound Forge created the delay in the first place, then AviMuxGUI will detect right away.
I will do those tests and see if that helps...

Would you consider doing them everytime something like that happens (videos with only one channel working)? Since it worked for two previous files (they were not out of sync, I compared but perhaps a very slight delay was there and it was so small that I couldn't see?), I never imagined that such delay would exist after using SF. Because it wasn't there on the original file, and converting a channel or changing the volume are not things that should insert a delay (at least I didn't think so).

Last edited by Lincoln Burrows; 3rd February 2010 at 23:04.
Lincoln Burrows is offline   Reply With Quote
Old 4th February 2010, 02:01   #6  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,915
Quote:
Originally Posted by Lincoln Burrows View Post
I don't understand what exactly you tried to explain. Correct me if I am wrong:
My previous post was a sample with an avi generated with VirtualDubMod -> Streams -> Stream List -> RightClick over the audio track -> Interleaving -> Delay audio track by 984 ms.

If this track is demuxed and decoded with SoundForge have only 59016 ms and go out of sync.

But if your track don't have the delay then the edited audio must be in sync like the original avi.

Quote:
(videos with only one channel working)?
Of course, if you have a channel empty you can make a mono wav, and mp3. No problem.
__________________
BeHappy, AviSynth audio transcoder.

Last edited by tebasuna51; 4th February 2010 at 02:03.
tebasuna51 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 22:48.


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