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 17th May 2010, 07:38   #1  |  Link
smok3
brontosaurusrex
 
smok3's Avatar
 
Join Date: Oct 2001
Posts: 2,361
how to AssumeAudioBits?

i'am doing ConvertAudioTo16bit()
and i would like to know how to assume bitnes before that?
AssumeAudioBits you know...?
smok3 is offline   Reply With Quote
Old 17th May 2010, 08:07   #2  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,373
Why do you want this and how would you use it if it existed?

The number of audio bits is not something you can 'assume', since changing it requires changing the format of the audio data. This can be done by using one of the ConvertAudio functions.
Gavino is offline   Reply With Quote
Old 17th May 2010, 10:28   #3  |  Link
smok3
brontosaurusrex
 
smok3's Avatar
 
Join Date: Oct 2001
Posts: 2,361
this MXF nanoflash files seems to be seen by avisynth as 32bpc, while i'am pretty sure this are really 24bpc..., in other words, i'am unable to get the healthy sound out of it (on PC), this was 'easy' with FCP and XDCAM utility on OSX for example...

my basic script is

Code:
a1 = FFAudioSource("film.avi",1)

v = FFVideoSource("film.avi")
 
a = mergechannels(a1,a1)
audiodub(v, a)
 
resize(720,576)
smok3 is offline   Reply With Quote
Old 17th May 2010, 10:44   #4  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,373
Quote:
Originally Posted by smok3 View Post
this MXF nanoflash files seems to be seen by avisynth as 32bpc, while i'am pretty sure this are really 24bpc...,
Sounds like a bug in FFAudioSource. Have you tried another source filter?

OTOH It might be just that FFAudioSource is converting to 32 bits.

Note also that if used via VfW, Avisynth will automatically convert final output to 16 bits, unless the variable OPT_AllowFloatAudio is set to true.
Gavino is offline   Reply With Quote
Old 17th May 2010, 10:55   #5  |  Link
smok3
brontosaurusrex
 
smok3's Avatar
 
Join Date: Oct 2001
Posts: 2,361
is there another source filter that could open MXF container?

Quote:
OTOH It might be just that FFAudioSource is converting to 32 bits
what i get is jumpery sound. repeating jumpery type

Last edited by smok3; 17th May 2010 at 11:04.
smok3 is offline   Reply With Quote
Old 17th May 2010, 12:10   #6  |  Link
smok3
brontosaurusrex
 
smok3's Avatar
 
Join Date: Oct 2001
Posts: 2,361
workaround:

Audio can be extracted (as 24bit mono wav) with plain ffmpeg like this:
Code:
ffmpeg -i file.MXF -acodec copy file.wav
(this will take channel 1 only, while mxf can actually store bunch of audio channels…, how would i dump all the channels with one command?)
as step2 one could use foobar2000 to make audio 2ch and to get 16bpc.

(i'am talking about batch processing, you can use audacity or similar if this is only few clips)

Last edited by smok3; 28th October 2010 at 18:52.
smok3 is offline   Reply With Quote
Old 28th October 2010, 18:48   #7  |  Link
smok3
brontosaurusrex
 
smok3's Avatar
 
Join Date: Oct 2001
Posts: 2,361
solution: for the next time i'am gonna search for my own question:

1. extract audio from MXF via ffmpeg, bat script (to be used with option %L in total commander) may be:
Code:
@ECHO OFF
for /f "delims=+++++" %%i in (%1) DO (
title dumping audio 3 from %%i
ffmpeg -map 0:3 -i %%i -acodec copy %%~ni.a1.wav
title dumping audio 4 from %%i
ffmpeg -map 0:4 -i %%i -acodec copy %%~ni.a2.wav
)
2. avisynth template may be:
Code:
LoadPlugin("t:\utility\avisynth\ffmpegsource\FFMS2.dll")


a1=wavsource("film.a1.wav")
a2=wavsource("film.a2.wav")
v=ffvideosource("film.avi")
a12=monotostereo(a1, a2)
audiodub(v,a12)
ConvertAudioTo16bit()

resize(720,576)
smok3 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 17:47.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2017, vBulletin Solutions, Inc.