View Full Version : how to AssumeAudioBits?
smok3
17th May 2010, 07:38
i'am doing ConvertAudioTo16bit()
and i would like to know how to assume bitnes before that?
AssumeAudioBits you know...? :)
Gavino
17th May 2010, 08:07
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.
smok3
17th May 2010, 10:28
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
a1 = FFAudioSource("film.avi",1)
v = FFVideoSource("film.avi")
a = mergechannels(a1,a1)
audiodub(v, a)
resize(720,576)
Gavino
17th May 2010, 10:44
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.
smok3
17th May 2010, 10:55
is there another source filter that could open MXF container?
OTOH It might be just that FFAudioSource is converting to 32 bits
what i get is jumpery sound. repeating jumpery type :)
smok3
17th May 2010, 12:10
workaround:
Audio can be extracted (as 24bit mono wav) with plain ffmpeg like this:
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)
smok3
28th October 2010, 18:48
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:
@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:
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)
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.