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

Reply
 
Thread Tools Search this Thread Display Modes
Old 19th July 2008, 16:32   #801  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,915
Quote:
Originally Posted by Menedas View Post
Of which DSP do you talk now? Not Timestretch?
Yes TimeStretch. There are 3 modes in 'Rate Control':
- Rate ...
- Pitch ...
- Tempo ...

The Rate mode don't need sophisticated algorithms to do the job, only change the samplerate then the waveform is very similar and only the pitch change can be detected. This is the -slowdown/speedup from eac3to.

Pitch or Tempo modes need more complex job.
You can try also different parameters in TimeStretch AviSynth function
tebasuna51 is offline   Reply With Quote
Old 19th July 2008, 22:45   #802  |  Link
lchiu7
Registered User
 
Join Date: Apr 2002
Posts: 279
AAC-HE LATM audio?

Our new DVB-T broadcasts are using this audio format. About the only way to hear the recorded files is to have PowerDVD8 which has a DS filter that can handle this audio format.

Since Behappy uses DS I wonder if it's possible to use this tool to convert this audio format to something common - say MP4 or even 2 channel AC-3 so that it could be muxed back with the original (or even re-compressed) AVC video into something that is easier to play.

Thanks
lchiu7 is offline   Reply With Quote
Old 19th July 2008, 23:46   #803  |  Link
Menedas
Registered User
 
Join Date: Sep 2003
Posts: 45
Ok, then I have understood you right. But how can you explain, that there is the same effect hearable with the Rate option? Hence, the effect I can hear could not come from the pitch. Thats what I wanted to say the whole time.

I wasn't really aware that the speedup option of eac3to is maybe the thing I wanted. I tested it and it does not have the same "bug" as the AviSynth function (Rate). Thank you for that information. But thats only a solution for eac3 files. I need also something for AC3 or DTS files.
Menedas is offline   Reply With Quote
Old 20th July 2008, 00:31   #804  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,915
Quote:
Originally Posted by lchiu7 View Post
Our new DVB-T broadcasts are using this audio format. About the only way to hear the recorded files is to have PowerDVD8 which has a DS filter that can handle this audio format.

Since Behappy uses DS I wonder if it's possible to use this tool to convert this audio format to something common - say MP4 or even 2 channel AC-3 so that it could be muxed back with the original (or even re-compressed) AVC video into something that is easier to play.
Seems there are also a free LATM aac DS decoder

You can try open the file with the DirectShowSource method.
tebasuna51 is offline   Reply With Quote
Old 20th July 2008, 01:04   #805  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,915
Quote:
Originally Posted by Menedas View Post
Ok, then I have understood you right. But how can you explain, that there is the same effect hearable with the Rate option? Hence, the effect I can hear could not come from the pitch. Thats what I wanted to say the whole time.
I can't explain a effect that I don't hear.

Quote:
I wasn't really aware that the speedup option of eac3to is maybe the thing I wanted. I tested it and it does not have the same "bug" as the AviSynth function (Rate). Thank you for that information. But thats only a solution for eac3 files. I need also something for AC3 or DTS files.
I'm happy you found the solution because eac3to also decode ac3 and dts files.
tebasuna51 is offline   Reply With Quote
Old 20th July 2008, 01:17   #806  |  Link
Menedas
Registered User
 
Join Date: Sep 2003
Posts: 45
Quote:
Originally Posted by tebasuna51 View Post
I can't explain a effect that I don't hear.
Strange. You can't even hear it with headphones?
Menedas is offline   Reply With Quote
Old 20th July 2008, 04:22   #807  |  Link
lchiu7
Registered User
 
Join Date: Apr 2002
Posts: 279
Quote:
Originally Posted by tebasuna51 View Post
Seems there are also a free LATM aac DS decoder

You can try open the file with the DirectShowSource method.
Tried that (under Vista SP1). Demuxed the audio from the ts file using tsremuxer (saved as a aac file)

Had the Monogram filter already installed

Opened the aac file using behappy and chose Directshow (also tried avisynth).

Both times in a few second Behappy just died (program has stopped responding).

So it looks like Behappy is unable to open these files
lchiu7 is offline   Reply With Quote
Old 28th August 2008, 22:11   #808  |  Link
gtpboy
Registered User
 
Join Date: Oct 2004
Posts: 2
Maybe I’m doing something wrong but I'm trying to take a 6 channel AC3 file splitting into individual mono WAV files then re encode it into a single WAV file in WME.

Well once BeHappy gets done splitting the AC3 file into the individual WAV files I go to convert it in WME and it tells me that the source files need to be mono WAV files, well I thought that’s what I just did. I've double and triple checked all the settings in BeHappy but can't figure it out.

Is there an easier way to do this like a straight encode AC3->WMA 10 instead of splitting and then rejoining?
gtpboy is offline   Reply With Quote
Old 29th August 2008, 02:00   #809  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,915
Quote:
Originally Posted by gtpboy View Post
Maybe I’m doing something wrong but I'm trying to take a 6 channel AC3 file splitting into individual mono WAV files then re encode it into a single WAV file in WME.
What is WME?
Do you need a single WAV or a WMA?

Quote:
Well once BeHappy gets done splitting the AC3 file into the individual WAV files I go to convert it in WME and it tells me that the source files need to be mono WAV files, well I thought that’s what I just did. I've double and triple checked all the settings in BeHappy but can't figure it out.
BeHappy can decode ac3 files to a single WAV multichannel (Destination Wav Writer) file or to monowav files (Destination WavSplit @ Mono Wav's).
Quote:
Is there an easier way to do this like a straight encode AC3->WMA 10 instead of splitting and then rejoining?
If MS supply a WMA encoder with STDIN input we can add a direct transcode AC3->WMA in BeHappy.
tebasuna51 is offline   Reply With Quote
Old 29th August 2008, 03:15   #810  |  Link
Snowknight26
Registered User
 
Join Date: Aug 2007
Posts: 1,430
WME = Windows Media Encoder.
Snowknight26 is offline   Reply With Quote
Old 29th August 2008, 09:46   #811  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,915
Quote:
Originally Posted by Snowknight26 View Post
WME = Windows Media Encoder.
Sorry, I don't know this tool.
I supose you want output a multichannel WMA.

And WME need 6 monowavs always to encode a multichannel WMA?
And WME don't recognize the monowavs generated by BeHappy-WavSplit?
tebasuna51 is offline   Reply With Quote
Old 29th August 2008, 13:02   #812  |  Link
gtpboy
Registered User
 
Join Date: Oct 2004
Posts: 2
Quote:
BeHappy can decode ac3 files to a single WAV multichannel (Destination Wav Writer) file or to monowav files (Destination WavSplit @ Mono Wav's).
I did see that option in there but didn't know it generated a multichannel WAV file I'll have to try that thanks.

Quote:
And WME don't recognize the monowavs generated by BeHappy-WavSplit?
Aparently i've tried it on a few different AC3 files and get the same message "source must be mono WAV file"

Oh well as long as the other method works i'll be fine Thanks again

WME is a fickle program some AC3 files it will transcode with no problems others it will generate a "source file type is invalid" error same with some DTS files
gtpboy is offline   Reply With Quote
Old 31st October 2008, 11:52   #813  |  Link
DiGiT@LON€
Registered User
 
Join Date: Feb 2007
Posts: 10
Hi everyone.
I'm an Italian user, sorry for my bad English.

I have to make 2 questions:

- I have an ac3 2.0 audio file. I want to convert it in wav with behappy latest release.
I select wav writer like encoder, and the encode works good.
But the output wav file don't have sound.
I can see from foobar that it is a PCM 32 bit floating point, but there's not sound.
How can I convert better?

- Does Behappy add a delay to output file? If yes, how much?

Thanks...
DiGiT@LON€ is offline   Reply With Quote
Old 31st October 2008, 14:12   #814  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,915
Quote:
Originally Posted by DiGiT@LON€ View Post
- I have an ac3 2.0 audio file. I want to convert it in wav with behappy latest release.
I select wav writer like encoder, and the encode works good.
But the output wav file don't have sound.
I can see from foobar that it is a PCM 32 bit floating point, but there's not sound.
How can I convert better?
This is a NicAudio ac3 decoder behaviour more than BeHappy related.

When the decoder found a valid ac3 frame set some basic parameters (num_channels, samplerate, bitrate) and after reject (filling with silence) any other frame don't match the initial basic parameters.

Probably your ac3 source is from a TV capture and you have some initial frames 2.0 (commercials) and after change to 5.1 (movie), sorry but NicAudio can't begin supply 2.0 and change to 5.1 on the fly. You can use DelayCut to check the ac3 file and cut the initial 2.0 frames (if is the problem).

Quote:
- Does Behappy add a delay to output file? If yes, how much?
Behappy have a box to include any desired delay. By default BeHappy don't add delay.

NicAudio.dll v2.0.2 ac3 decoder can add delay (a multiple of 32 ms) when found invalid data (until 1 MB) before the first valid ac3 frame, then can compensate pseudo-delays in VirtualDub style. If you don't want this delay you can use DelayCut to fix the ac3 before decode.

There are also little delays introduced by encoders, for instance ac3 encoders do a 5.333 ms delay (with Aften you can disable this delay with the -pad 0 parameter)
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline   Reply With Quote
Old 31st October 2008, 18:08   #815  |  Link
DiGiT@LON€
Registered User
 
Join Date: Feb 2007
Posts: 10
Quote:
Originally Posted by tebasuna51 View Post
This is a NicAudio ac3 decoder behaviour more than BeHappy related.

When the decoder found a valid ac3 frame set some basic parameters (num_channels, samplerate, bitrate) and after reject (filling with silence) any other frame don't match the initial basic parameters.

Probably your ac3 source is from a TV capture and you have some initial frames 2.0 (commercials) and after change to 5.1 (movie), sorry but NicAudio can't begin supply 2.0 and change to 5.1 on the fly. You can use DelayCut to check the ac3 file and cut the initial 2.0 frames (if is the problem).
Yes, you're right. It comes from a TV capture.
Can you suggest me another tool that convert ac3 (in this status) in wav?
Have I to use Delaycut imperatively?

Quote:
Originally Posted by tebasuna51 View Post
There are also little delays introduced by encoders, for instance ac3 encoders do a 5.333 ms delay (with Aften you can disable this delay with the -pad 0 parameter)
Does Ac3 encoder in BeHappy have this behaviour?
If yes, have I to set -5.333 in BeHappy for synchronizing?
DiGiT@LON€ is offline   Reply With Quote
Old 31st October 2008, 23:39   #816  |  Link
DiGiT@LON€
Registered User
 
Join Date: Feb 2007
Posts: 10
I have resolved with Azid-BeSweet.
Now I want to know only if azid is between those encoders that apply a delay during the encode.

Then, if someone explains me why the encode works with azid-beesweet, I appreciate...
Thanks...
DiGiT@LON€ is offline   Reply With Quote
Old 2nd January 2009, 17:27   #817  |  Link
Kurtnoise
Swallowed in the Sea
 
Kurtnoise's Avatar
 
Join Date: Oct 2002
Location: Aix-en-Provence, France
Posts: 5,191
@Tebasuna:

I found a bug in the AvisynthWrapper. Using your dll + the wrapper with megui, I got a buffer overrun issue.

Here is the fix...
Kurtnoise is offline   Reply With Quote
Old 3rd January 2009, 02:32   #818  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,915
You are rigth Kurtnoise. Next release must correct that. Thanks.

Isn't a problem for BeHappy because seems never read video frames but MeGUI ...

I don't know if AvisynthWrapper.cs can work with MeGUI my unique change was 'dimzon_avs_init' -> 'dimzon_avs_init_2'
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline   Reply With Quote
Old 3rd January 2009, 10:04   #819  |  Link
Kurtnoise
Swallowed in the Sea
 
Kurtnoise's Avatar
 
Join Date: Oct 2002
Location: Aix-en-Provence, France
Posts: 5,191
well...the AvisynthWrapper.cs is the same (quite normal because we uses the same lib ). The main difference comes from the encoder routines (wav header writing, etc...). Yesterday, I tried to drop the ConvertAudio16Bits() restriction from the megui script but unfortunately, it produces some garbage as ouput whereas with BeHappy and the same script, all it's fine. So, I suspect something wrong with the wav header. I've seen that the wav header writing is more accurate with BeHappy (wav > 4GB detection, different headertypes, etc...) but I'm busy with other things right now so I can't check it out more carefully...
Kurtnoise is offline   Reply With Quote
Old 3rd January 2009, 17:20   #820  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,915
You are writing always INT wav files.

In AviSynthAudioEncoder.cs (line 482) you need only write the correct Format_tag:
Code:
- target.Write(BitConverter.GetBytes((short)0x01), 0, 2);
+ target.Write(BitConverter.GetBytes((a.SampleType==AudioSampleType.FLOAT) ? (short)0x03) : (short)0x01), 0, 2);
Where (in AviSynthWrapper.cs):
Code:
	public enum AudioSampleType:int	{
		Unknown=0,
		INT8  = 1,
		INT16 = 2,
		INT24 = 4,
		INT32 = 8,
		FLOAT = 16
	};
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline   Reply With Quote
Reply

Tags
behappy

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 On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:49.


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