FFAudioSource: The index does not match the source file

Here you can submit bugreports
Post Reply
User avatar
Vladimir
Posts: 21
Joined: Fri Mar 27, 2020 1:38 pm

FFAudioSource: The index does not match the source file

Post by Vladimir »

Hi,
I transfer MXF with inserted 2 mono audio streams, or extrernal stereo WAV, to broadcast server ingest.

The inserted audio is extracted to tmp WAV, normalized with ffmpeg (-af "loudnorm=I=-23:LRA=6:TP=-9:linear=0") and then merged with "Custom AviSynth script" and "XDCAM-HD" processors to MXF V+A1A2.
Sometimes "XDCAM-HD" encoder stops processing with error "Validate: FFAudioSource: The index does not match the source file."

What do i do wrong?
Attachments
IntOrExtWavProcBlock.json
(18.96 KiB) Downloaded 314 times
User avatar
Vladimir
Posts: 21
Joined: Fri Mar 27, 2020 1:38 pm

Re: FFAudioSource: The index does not match the source file

Post by Vladimir »

I found my mistake.
Two upper branches are not in sync. Encoding with "XDCAM-HD" starts before ffmpeg finished.
emcodem
Posts: 1811
Joined: Wed Sep 19, 2018 8:11 am

Re: FFAudioSource: The index does not match the source file

Post by emcodem »

Hehe isnt it always like this? You work on some problem up to a point where you report it to support and at the moment where you report it, you find the solution? :D
Anyway, good to hear from you Vladimir, i enjoyed seeing the way you work with functions

Code: Select all

$triml($between("%s_ext_wav%",$reverse($between($reverse("%s_ext_wav%"),"\","\",1)),""),1)
What does that do? :D
emcodem, wrapping since 2009 you got the rhyme?
User avatar
Vladimir
Posts: 21
Joined: Fri Mar 27, 2020 1:38 pm

Re: FFAudioSource: The index does not match the source file

Post by Vladimir »

Hehe isnt it always like this?
When OS was Windows 7 it was stable. Now i need to reconstruct a lot. Found many bugs in old workflows. Look ashamed.

Code: Select all

$triml($between("%s_ext_wav%",$reverse($between($reverse("%s_ext_wav%"),"\","\",1)),""),1)
is my way to get "Filename.Ext" from "LongLongPath\Filename.ext"? contained in the variable %s_ext_wav%.
Looks strange, but it works.
emcodem
Posts: 1811
Joined: Wed Sep 19, 2018 8:11 am

Re: FFAudioSource: The index does not match the source file

Post by emcodem »

Vladimir wrote: Wed Oct 20, 2021 2:59 pm Found many bugs in old workflows. Look ashamed.
Well if there was no history we would always look like noobs, forever. We need to look at history to be able to make it better today (thats kind of an infinite lop)...
Vladimir wrote: Wed Oct 20, 2021 2:59 pm is my way to get "Filename.Ext" from "LongLongPath\Filename.ext"? contained in the variable %s_ext_wav%.
Looks strange, but it works.
Since FFAStrans 1.0 or such, we have the regext function which would make your function combination a lot shorter:

Code: Select all

$regext("%s_ext_wav%","[^\\]*$")
Also, FFAStrans already has the values you are looking for, but it only has it for the current "s_source". So, for easy access to name, ext, folders and such, you can just temporalily change the mighty s_source variable to the filename you want to parse like that:
change_s_source_temporalily.png
change_s_source_temporalily.png (9.88 KiB) Viewed 6592 times
By just setting s_source to your calculated filename, you can access all the juicy inbuilt variables like %s_original_name% and such.
All you have to do at the end is to re-set s_source to the actual source file you want to work with, e.g. %s_pickup_file% is the filename that was originally submitted - in order to make the next processor working with the originally submitted file instead of %s_wav_ext%
emcodem, wrapping since 2009 you got the rhyme?
User avatar
Vladimir
Posts: 21
Joined: Fri Mar 27, 2020 1:38 pm

Re: FFAudioSource: The index does not match the source file

Post by Vladimir »

Thanks a lot emcodem.
I will spend more time learning "What's new in version ..."

Sometimes it is not easy to deal with passing data through variables. There just isn't enough time.
User avatar
Vladimir
Posts: 21
Joined: Fri Mar 27, 2020 1:38 pm

Re: FFAudioSource: The index does not match the source file

Post by Vladimir »

Sorry, but "change_s_source_temporalily" method can't work. The s_source variable is very stubborn.

I send:

Code: Select all

{
"wf_id": "20211028-1800-1844-2ef3-18ec80c065c9",
"inputfile": "\\\\synology.local\\InWork\\PISMA_IZ_PROVINTSII\\Kostomuksha\\Kostomuksha.mxf",
"variables":
[
{
"name": "s_submitted_file",
"data": "\\\\SomeOtherServer.local\\a_resource\\SomeOtherDir_987654\\SomeOtherFileName.ext"
}
]
}
то the WF in attached "External_Path-Name-Extention.json"
and have the result:
\\synology.local\InWork\PISMA_IZ_PROVINTSII\Kostomuksha\Kostomuksha.mxf
but not
\\SomeOtherServer.local\a_resource\SomeOtherDir_987654\SomeOtherFileName.ext
as expected.
What could be wrong?
Attachments
External_Path-Name-Extention.json
(3.3 KiB) Downloaded 280 times
admin
Site Admin
Posts: 1687
Joined: Sat Feb 08, 2014 10:39 pm

Re: FFAudioSource: The index does not match the source file

Post by admin »

Hehe, I don't think the s_source variable is stubborn. It works exactly the way it should.
You're doing this:

%s_original_path%\%s_original_name%.%s_original_ext% -> %s_submitted_file1% -> %s_temp_var_str% -> %s_success%

So the outcome will naturally be your input file: \\synology.local\InWork\PISMA_IZ_PROVINTSII\Kostomuksha\Kostomuksha.mxf because:

%s_original_path% = \\synology.local\InWork\PISMA_IZ_PROVINTSII\Kostomuksha
%s_original_name% = Kostomuksha
%s_original_ext% = mxf


The %s_source% variable can change a lot throughout a job but the %s_original...% will always stay the same; only populated at the very start from the initial %s_source% variable before any nodes are executing.

Hope this helps.

-steinar
emcodem
Posts: 1811
Joined: Wed Sep 19, 2018 8:11 am

Re: FFAudioSource: The index does not match the source file

Post by emcodem »

Ah damnit, my bad... i just assumed that the "name" variables change with s_source because the "media property" variables do so.
Really sorry for bringing you on the wrong path here Vladimir :oops:
emcodem, wrapping since 2009 you got the rhyme?
Post Reply