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 > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 22nd January 2007, 22:47   #41  |  Link
sh0dan
Retired AviSynth Dev ;)
 
sh0dan's Avatar
 
Join Date: Nov 2001
Location: Dark Side of the Moon
Posts: 3,480
@DSP8k: How do you encode with f2k?

@tebasuna51: Do you have a short sample? I had some strange results with simple sine sounds, but it seemed more like a strangeness with Vorbis itself.
__________________
Regards, sh0dan // VoxPod

Last edited by sh0dan; 22nd January 2007 at 22:50.
sh0dan is offline   Reply With Quote
Old 23rd January 2007, 01:35   #42  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,458
In OggSample.zip there are a sample with first 8 seconds bad encoded, also the original wav (first 8 seconds).

With command line (oggenc2) work Ok and much more fast.

There are a input plugin, foo_input_avs.dll by Dimzon, to open avs files in Foobar2000. If the avs have SoundOut() the GUI appears (but not accesible: sandglass, even if pause the play) while the audio is played.
tebasuna51 is offline   Reply With Quote
Old 23rd January 2007, 02:20   #43  |  Link
DSP8000
Doom9 Member
 
DSP8000's Avatar
 
Join Date: Sep 2003
Location: Australia
Posts: 210
Thru avs input plugin & play in fb2k.
Just to be on the safe side, today I did some more tests & now fb2k crashes instantly after opening the script.

Quote:
the GUI appears (but not accesible: hourglass, even if pause the play) while the audio is played.
That's exactly what's happening.
DSP8000 is offline   Reply With Quote
Old 28th January 2007, 18:34   #44  |  Link
sh0dan
Retired AviSynth Dev ;)
 
sh0dan's Avatar
 
Join Date: Nov 2001
Location: Dark Side of the Moon
Posts: 3,480
@tebasuna51: Thanks a bundle for the test-case, I found the bug and fixed it. You will also be happy to hear that the Command-line garbling is now also fixed.

@DSP8000: I'm not sure I can fix that, if Foobar 2k doesn't send Windows Dialog Events on to the GUI. I'll see what I can do.

Anyway - there is a new version with bugfixes and BWF support for hanfunz to test.
__________________
Regards, sh0dan // VoxPod
sh0dan is offline   Reply With Quote
Old 30th January 2007, 22:29   #45  |  Link
sh0dan
Retired AviSynth Dev ;)
 
sh0dan's Avatar
 
Join Date: Nov 2001
Location: Dark Side of the Moon
Posts: 3,480
Version 0.9.6 uploaded with complete script customization possibilities and updated documentation. I also made an attempt at solving the hanging GUI problem.

An example of the script syntax could be:
Code:
SoundOut(output = "mp3", filename="c:\outputFile.mp3", autoclose = true, showprogress=true, mode = 2, cbrrate = 192)
__________________
Regards, sh0dan // VoxPod
sh0dan is offline   Reply With Quote
Old 31st January 2007, 04:37   #46  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,458
Thanks for your hard work. Problems detected:

1) Channelmapping: a GetChannel(1,3,2,5,6,4) is needed to output correct ac3 and ogg multichannel. I think this must be transparent to the end user, Aften have internally mapping routines and work ok in cmdline mode.

2) When save like WAVEFORMATEX work ok, but in CmdLine output wav type WAVEFORMATEX don't fill the haeder correctly:
Code:
WAVE_FORMAT_EXTENSIBLE header with correct info in Save WAV/AIF/CAF
Offset   |  0  1  2  3  4  5  6  7   8  9  A  B  C  D  E  F |
---------|--------------------------------------------------|-----------------
00000000 | 52 49 46 46 3C C8 AF 00  57 41 56 45 66 6D 74 20 | RIFF<ȯ.WAVEfmt
00000010 | 28 00 00 00 FE FF 06 00  80 BB 00 00 00 CA 08 00 | (....._.....
00000020 | 0C 00 10 00 16 00 10 00  3F 00 00 00 01 00 00 00 | ........?.......
00000030 | 00 00 10 00 80 00 00 AA  00 38 9B 71 64 61 74 61 | ...._...8>qdata
00000040 | 00 C8 AF 00                                      | .ȯ.

WAVE_FORMAT_EXTENSIBLE header without info in CmdLine Output
Offset   |  0  1  2  3  4  5  6  7   8  9  A  B  C  D  E  F |
---------|--------------------------------------------------|-----------------
00000000 | 52 49 46 46 3C C8 AF 00  57 41 56 45 66 6D 74 20 | RIFF<ȯ.WAVEfmt
00000010 | 28 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 | (...............
00000020 | 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 | ................
00000030 | 00 00 00 00 00 00 00 00  00 00 00 00 64 61 74 61 | ............data
00000040 | 00 C8 AF 00                                      | .ȯ.
3) In CmdLine output the output file dialog is missing.

4) Exporting from script:
- In help the parameter 'cbrrate' for ac3 is missing
- With output="cmd" I obtain:
Script error: SoundOut does not have a named argument "format"

5) With output="cmd" and Aften I obtain:
Code:
Command Line:"d:\Programa\Audio\0\aften.exe" -b 448 - "d:\xc3.ac3"

Aften: A/52 audio encoder
(c) 2006 Justin Ruggles

Signed 16-bit 48000 Hz 6-channel
progress:  80% | q: 968.4 | bw: 34.0 | bitrate: 448.0 kbps

>PIPE: Input pipe thread killed (EOF)
and
Code:
An error occurred during conversion: Encoding aborted before all samples were
delivered (mismatch).
The output file is probably incomplete.
And of course is incomplete, same problem with NeroAacEnc.
tebasuna51 is offline   Reply With Quote
Old 31st January 2007, 04:56   #47  |  Link
DSP8000
Doom9 Member
 
DSP8000's Avatar
 
Join Date: Sep 2003
Location: Australia
Posts: 210
Tnx. for the update.

Cmd. line arguments are not passed properly and the conversion fails. I think the cmd. line options should be very similar to the ones in foobar2000, ie. auto generation of input file and output extension based on the encoder chosen.

Yeah, the GUI hanging bug is still there , at least mpc is working good.
DSP8000 is offline   Reply With Quote
Old 31st January 2007, 17:15   #48  |  Link
sh0dan
Retired AviSynth Dev ;)
 
sh0dan's Avatar
 
Join Date: Nov 2001
Location: Dark Side of the Moon
Posts: 3,480
Thanks for the invaluable testing and very precise feedback, it helps a lot.

1) It would probably make sense to add the channel mapping options to the aften output.

2) Confirmed - I'll look at it. I had to rewrite the WAV writer for piped output, and it doesn't look quite right.

3+4) Confirmed.

5) Strange - do they all die at 80%? And how long are the samples?
__________________
Regards, sh0dan // VoxPod
sh0dan is offline   Reply With Quote
Old 31st January 2007, 19:38   #49  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,458
Quote:
Originally Posted by sh0dan View Post
5) Strange - do they all die at 80%? And how long are the samples?
There are only 20 sec. multichannel sample and always at same point with aften, neroaacenc and flac. But this was yesterday.

Today work fine with 20 sec. and 130 min. samples, with Aften, NeroAacEnc, OggEnc2 and flac v1.1.2. Maybe some resident soft in my system, I don`t know.

Thanks.
tebasuna51 is offline   Reply With Quote
Old 31st January 2007, 22:54   #50  |  Link
sh0dan
Retired AviSynth Dev ;)
 
sh0dan's Avatar
 
Join Date: Nov 2001
Location: Dark Side of the Moon
Posts: 3,480
@tebasuna51: Found the final bug!
@DSP8000: I was a bit more aggressive on fixing the GUI problem, and it now works in foobar2000.

Version 0.9.7 is uploaded. It should fix all the mentioned bugs (and feature requests)
__________________
Regards, sh0dan // VoxPod
sh0dan is offline   Reply With Quote
Old 1st February 2007, 02:00   #51  |  Link
DSP8000
Doom9 Member
 
DSP8000's Avatar
 
Join Date: Sep 2003
Location: Australia
Posts: 210
Good job, well done

The GUI Bug now is gone, works good.
Can you please make autoclose option after successful encode in the GUI as well. The window just hangs in there even after successful conversion is finished.
Also, cmd. line output works good, but the options are somewhat confusing, ie. the input file is already specified in the script but when you choose cmd. line output, the GUI is asking where you want to save the file, but in fact you'll have to select the actual input file otherwise the conversion fails.

This is why I requested autofile input generation.
If the input file is in the script, I see no reason why would we have to do the same thing twice

Also, auto output to the same directory of the input file(if no output directory specified) would be nice.

foobar2k plugin in the future?
No rush, whenever you feel that it can be done.
Thanks again.
DSP8000 is offline   Reply With Quote
Old 1st February 2007, 06:53   #52  |  Link
Audionut
Registered User
 
Join Date: Nov 2003
Posts: 1,277
Hi, first thanks heaps.

Second, is there anyway to determine the average RMS of the audio before outputting to AC3.

TIA.
Audionut is offline   Reply With Quote
Old 1st February 2007, 09:47   #53  |  Link
sh0dan
Retired AviSynth Dev ;)
 
sh0dan's Avatar
 
Join Date: Nov 2001
Location: Dark Side of the Moon
Posts: 3,480
@DSP8000:
- "autoclose": Just specify it in your script - it also works in ordniary mode.
- "filename/cmdline": You seem to use the commandline encoder the wrong way. If the file is used as input, you are not specifying that it should use stdin as input.
If you specify a filename in your commandline, tick off "No Filename needed", and you will not be asked for an output file.
Since I cannot know what extension your command should have, I cannot add it automatically.
Commandline is considered "advanced" usage. Post what command you are using, and the results you are getting.

@Audionut: Do you know where I could find code for that?
__________________
Regards, sh0dan // VoxPod
sh0dan is offline   Reply With Quote
Old 1st February 2007, 12:54   #54  |  Link
Audionut
Registered User
 
Join Date: Nov 2003
Posts: 1,277
Here is the source code for a plugin for foobar 2000.
http://rapidshare.com/files/14381903...2-src.zip.html

It displays the RMS value of a file playing in foobar.

Or could it not be possible to use Replaygain at all.
Audionut is offline   Reply With Quote
Old 1st February 2007, 13:40   #55  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,458
With Aften there are a little app: wavrms.exe (wavrms.c)
But is intended to calculate Dialog Normalization.

AFAIK the ac3 volume control system based in Dialog Normalization and Dynamic Range Compression don't match with ReplayGain concepts.
tebasuna51 is offline   Reply With Quote
Old 1st February 2007, 16:04   #56  |  Link
sh0dan
Retired AviSynth Dev ;)
 
sh0dan's Avatar
 
Join Date: Nov 2001
Location: Dark Side of the Moon
Posts: 3,480
The calculation seems pretty easy. It could be implemented as a Toolbox that could give you these stats.
__________________
Regards, sh0dan // VoxPod
sh0dan is offline   Reply With Quote
Old 2nd February 2007, 04:08   #57  |  Link
Audionut
Registered User
 
Join Date: Nov 2003
Posts: 1,277
Quote:
Originally Posted by tebasuna51 View Post
With Aften there are a little app: wavrms.exe (wavrms.c)
But is intended to calculate Dialog Normalization.
For Dialog Normalization is why I was asking.

Thanks.
Audionut is offline   Reply With Quote
Old 2nd February 2007, 04:19   #58  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,458
Still a minor problem with :
Code:
WAVE_FORMAT_EXTENSIBLE header with correct info in Save WAV/AIF/CAF
Offset   |  0  1  2  3  4  5  6  7   8  9  A  B  C  D  E  F |
---------|--------------------------------------------------|-----------------
00000000 | 52 49 46 46 3C C8 AF 00  57 41 56 45 66 6D 74 20 | RIFF<ȯ.WAVEfmt
00000010 | 28 00 00 00 FE FF 06 00  80 BB 00 00 00 CA 08 00 | (....._.....
00000020 | 0C 00 10 00 16 00 10 00  3F 00 00 00 01 00 00 00 | ........?.......

WAVE_FORMAT_EXTENSIBLE header with ChannelMask incorrect in CmdLine Output
Offset   |  0  1  2  3  4  5  6  7   8  9  A  B  C  D  E  F |
---------|--------------------------------------------------|-----------------
00000000 | 52 49 46 46 3C C8 AF 00  57 41 56 45 66 6D 74 20 | RIFF<ȯ.WAVEfmt
00000010 | 28 00 00 00 FE FF 06 00  80 BB 00 00 00 CA 08 00 | (....._.....
00000020 | 0C 00 10 00 16 00 10 00  00 00 00 80 01 00 00 00 | ..........._....
Tested also with stereo wav, ChannelMask incorrect also = 0x80000000 instead the correct value = 0x00000003
tebasuna51 is offline   Reply With Quote
Old 4th February 2007, 18:54   #59  |  Link
sh0dan
Retired AviSynth Dev ;)
 
sh0dan's Avatar
 
Join Date: Nov 2001
Location: Dark Side of the Moon
Posts: 3,480
I have added an Analyze option to the GUI, that calculates levels values per channel.

I have also changed the WAV output to add channel indication to commandline output - but do note that this is only guesses based on the channel number.

Please test, if it works all-right.
__________________
Regards, sh0dan // VoxPod
sh0dan is offline   Reply With Quote
Old 5th February 2007, 12:19   #60  |  Link
sh0dan
Retired AviSynth Dev ;)
 
sh0dan's Avatar
 
Join Date: Nov 2001
Location: Dark Side of the Moon
Posts: 3,480
Thread split. All video output/caching moved here:

http://forum.doom9.org/showthread.php?t=121869
__________________
Regards, sh0dan // VoxPod
sh0dan 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 On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:22.


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