Page 3 of 6

Re: Insert Media after 10 sec

Posted: Sun Feb 07, 2021 3:25 pm
by authorleon

Code: Select all

#Script for "opener and closer" have 2(or more) tracks, each 1 mono channel:

ffidxfile = "%s_job_work%\idx.idx"
ffidxfile2 = "%s_job_work%\idx.idx"

#trim existing source, creating 2 clips: one up to the point of insert, the other one from the point of insert
clip1=Trim(m_clip, 0,%i_insertion_point_frames%)
clip3=Trim(m_clip, %i_insertion_point_frames%,0)

#generate silent audio for insertion clip
audio_null = BlankClip( length=251 ,width=1920, height=1080, color=$000000, channels=30, audio_rate=48000, fps=25)
#load Clip to insert
_audio_21 = FFAudioSource("%s_clip_to_insert%",1,cachefile=ffidxfile)
_audio_22 = FFAudioSource("%s_clip_to_insert%",2,cachefile=ffidxfile)
_audio_2 = MergeChannels(_audio_21,_audio_22)
_audio_2 = MergeChannels(_audio_2, audio_null)
_video_2 = FFVideoSource("%s_clip_to_insert%",cachefile=ffidxfile,seekmode=0)
clip2 = AudioDub(_video_2,_audio_2)

#load outro
audio_null = BlankClip( length=251 ,width=1920, height=1080, color=$000000, channels=30, audio_rate=48000, fps=25)
_audio_41 = FFAudioSource("%s_outro_locatoin%",1,cachefile=ffidxfile2)
_audio_42 = FFAudioSource("%s_outro_locatoin%",2,cachefile=ffidxfile2)
_audio_4 = MergeChannels(_audio_41, _audio_42)
_audio_4 = MergeChannels(_audio_4, audio_null)
_video_4 = FFVideoSource("%s_outro_locatoin%",cachefile=ffidxfile2,seekmode=0)

clip4 = AudioDub(_video_4,_audio_4)

m_clip = clip1 + clip2 + clip3 + clip4

Return m_clip

I think it is something to do with: ffidxfile2

But I am not sure!

Re: Insert Media after 10 sec

Posted: Sun Feb 07, 2021 5:00 pm
by emcodem
Sorry a copy paste error :

Code: Select all

ffidxfile2 = "%s_job_work%\idx.idx
Should be:

Code: Select all

ffidxfile2 = "%s_job_work%\idx2.idx

Re: Insert Media after 10 sec

Posted: Sun Feb 07, 2021 5:22 pm
by authorleon
emcodem wrote: Sun Feb 07, 2021 5:00 pm Sorry a copy paste error :

Code: Select all

ffidxfile2 = "%s_job_work%\idx.idx
Should be:

Code: Select all

ffidxfile2 = "%s_job_work%\idx2.idx
FFASTRANS Exported.mp4
Video output
(2.14 MiB) Downloaded 424 times
You know I had a feeling it had something to do with that. as I'm starting to learn the code.

I have attached the video output. But, please have a look at 5 seconds. there seems to be a skip in a frame and also some audio distortion.

Thank you very much

please note, I will only ever need stereo. So I'm not truth this audio static noises coming from the fact that there are multiple channels?

Re: Insert Media after 10 sec

Posted: Sun Feb 07, 2021 6:27 pm
by emcodem
Uhm i didnt have glitches using xdcamhd, could you share your source files and the workflow please?

Re: Insert Media after 10 sec

Posted: Sun Feb 07, 2021 6:43 pm
by authorleon
emcodem wrote: Sun Feb 07, 2021 6:27 pm Uhm i didnt have glitches using xdcamhd, could you share your source files and the workflow please?
I just sent you a PM with all the files.

Again. I do not mind working with optimal files formats.

Re: Insert Media after 10 sec

Posted: Mon Feb 08, 2021 9:05 am
by emcodem
Just perfect, thanks for the uploads.
So, i found one more error in the last custom avisynth scripts that i posted: the "lenght" of the generated Audio "BlankClip" was set to 251 fixed.
Also there are some clicks in the "main clip" 02.mxf at about 00:00:04:08 which made me have some doubts about the final result but i think it works now as it should.
TEST 1 - Working.json
(16.25 KiB) Downloaded 468 times
Also, as you brought up the discussion about "which file is used to start the job", e.g. the .mxf or the .txt file, so i also created a version that takes the .txt file instead of the .mxf file for starting the job. (sorry if this causes some confusion but i was under the impression that you want to start your jobs at the arrival of a txt file, not mxf file.)

Re: Insert Media after 10 sec

Posted: Mon Feb 08, 2021 12:17 pm
by authorleon
Hello emcodem,

I am not sure if I am missing something, but in the work flow: TEST 1 - Working. We had the connected node for: #Script for "opener and closer" have 2(or more) tracks, each 1 mono channel:

However, I am not sure if the code has been change for that node?

Image

Code: Select all

#Script for "opener and closer" have 2(or more) tracks, each 1 mono channel:

ffidxfile = "%s_job_work%\idx.idx"
ffidxfile2 = "%s_job_work%\idx2.idx"

#trim existing source, creating 2 clips: one up to the point of insert, the other one from the point of insert
clip1=Trim(m_clip, 0,%i_insertion_point_frames%)
clip3=Trim(m_clip, %i_insertion_point_frames%,0)

#generate silent audio for insertion clip
audio_null = BlankClip( length=251 ,width=1920, height=1080, color=$000000, channels=30, audio_rate=48000, fps=25)
#load Clip to insert
_audio_21 = FFAudioSource("%s_clip_to_insert%",1,cachefile=ffidxfile)
_audio_22 = FFAudioSource("%s_clip_to_insert%",2,cachefile=ffidxfile)
_audio_2 = MergeChannels(_audio_21,_audio_22)
_audio_2 = MergeChannels(_audio_2, audio_null)
_video_2 = FFVideoSource("%s_clip_to_insert%",cachefile=ffidxfile,seekmode=0)
clip2 = AudioDub(_video_2,_audio_2)

#load outro
audio_null = BlankClip( length=251 ,width=1920, height=1080, color=$000000, channels=30, audio_rate=48000, fps=25)
_audio_41 = FFAudioSource("%s_outro_locatoin%",1,cachefile=ffidxfile2)
_audio_42 = FFAudioSource("%s_outro_locatoin%",2,cachefile=ffidxfile2)
_audio_4 = MergeChannels(_audio_41, _audio_42)
_audio_4 = MergeChannels(_audio_4, audio_null)
_video_4 = FFVideoSource("%s_outro_locatoin%",cachefile=ffidxfile2,seekmode=0)

clip4 = AudioDub(_video_4,_audio_4)

m_clip = clip1 + clip2 + clip3 + clip4

Return m_clip
I would suggest we get the mono script working perfectly. Thank you emcodem....

Re: Insert Media after 10 sec

Posted: Mon Feb 08, 2021 12:25 pm
by emcodem
Yes that is because i was so sluggish and uploaded the same workflow that you sent, please forgive.
TEST 1 - Working_now_Really.json
(12.88 KiB) Downloaded 464 times

Re: Insert Media after 10 sec

Posted: Mon Feb 08, 2021 12:44 pm
by authorleon
emcodem wrote: Mon Feb 08, 2021 12:25 pm Yes that is because i was so sluggish and uploaded the same workflow that you sent, please forgive.
TEST 1 - Working_now_Really.json

Oh come on.. Nothing to forgive.. I am testing it right now...

also you might be onto something.. When exporting from Adobe Premier, there is a little pop sound...

I will keep you fully updated and thank you very much!!!

Re: Insert Media after 10 sec

Posted: Mon Feb 08, 2021 12:55 pm
by authorleon
okay.

So it looks like there is an issue with Adobe Premier regarding popping sound on exporting. I will research that myself. As there has to be some kind of solution.


but there is a problem with the clip insert. Please have a look at the attached GIF. with the provided nifty software, I step through and you can see it clearly in the GIF.

Please have a look and let me know.
Clip Error
Clip Error
08-02-21--x--55.gif (228.36 KiB) Viewed 8979 times
it is adding a frame unnecessarily. I'm not quite sure why.