Merge Audio and Video Files

Questions and answers on how to get the most out of FFAStrans
momocampo
Posts: 323
Joined: Thu Jun 08, 2017 12:36 pm
Location: France-Paris

Re: Merge Audio and Video Files

Post by momocampo » Fri Sep 13, 2019 8:26 am

Hello,
Yes, as Encodem said, try to explain what is your goal and we will see.
Anyway, maybe you could do what you say, just keep the beginning of your filename to avoid FFastrans catch the bad files. Catch the 2 good ones, merge them and deliver, etc.
;)

abul
Posts: 31
Joined: Wed Sep 11, 2019 12:45 pm

Re: Merge Audio and Video Files

Post by abul » Fri Sep 13, 2019 8:34 am

:arrow: Okay So:

I have a 2 folders, video and audio where all the unwrapped files get placed into.
The video files contains 100+ files all have same naming convention.

E.g

food_show_johnsCooking_P2Highc450277201909032309330827.m2v

or

travel_Doc_worldOfWonders_P2High00c4502772015445548438484.m2v

same structure for audio.

food_show_johnsCooking_P2High00c450277201909032309330843.wav


audio have the exact same name as the video except for the random numbers that get added at the end and from the files I've seen, its not exact amount of random strings that are added.


What i need to do is take the video and its audio file either single stereo (or some which have a left and right audio file) and merge them to give me an output of a single file which is the video that has audio in it.

the original videos in the video file do not have audio and my task is to get the right audio for each of the video and merge them together

All video files are .m2v
All audio files are .wav

When the audio ad video folder is empty, the lecture will place a video and audio to its folder to see if the new placed files get picked up and merged.

i was going to move the video and audio file from the original location to the in folder and then process them bu merging.
The issue i'm having is i do not know how to make sure that the correct audio and video file is pulled into the in folder.



I really do appreciate for all the help :) :P

emcodem
Posts: 369
Joined: Wed Sep 19, 2018 8:11 am

Re: Merge Audio and Video Files

Post by emcodem » Fri Sep 13, 2019 12:00 pm

Hey, thanks!
could you just clear up 2 more questions please:
1) do all m2v and wav files have P2High00c in their Name? - is it possible to find the matching wav by matching "everything before P2High00c" in their name?

2) all files are m2v and wav but do they all have the exact same video codec and audio codec parameters like bitrate, framerate, resolution, bit depth etc...

abul
Posts: 31
Joined: Wed Sep 11, 2019 12:45 pm

Re: Merge Audio and Video Files

Post by abul » Fri Sep 13, 2019 12:09 pm

They have P2High part not the 00c. Everything before the P2High bit have the same name for audio and video.

All files are processed the same way and outputted the same, the codec parameters are same

momocampo
Posts: 323
Joined: Thu Jun 08, 2017 12:36 pm
Location: France-Paris

Re: Merge Audio and Video Files

Post by momocampo » Fri Sep 13, 2019 1:57 pm

I think Mister Encodem wants to use some Regex, isn't it ?
Please don't ask me :) :) you're better than me.
;)

emcodem
Posts: 369
Joined: Wed Sep 19, 2018 8:11 am

Re: Merge Audio and Video Files

Post by emcodem » Fri Sep 13, 2019 2:00 pm

momocampo wrote:
Fri Sep 13, 2019 1:57 pm
I think Mister Encodem wants to use some Regex, isn't it ?
Hehe you can bet your ass on it ;-)
But you need to learn about it and this is a really simple thing! Dont want to try? :-) One hint: you need to use parantheses ()

abul
Posts: 31
Joined: Wed Sep 11, 2019 12:45 pm

Re: Merge Audio and Video Files

Post by abul » Fri Sep 13, 2019 2:03 pm

I just noticed one thing with the previous set up. Whilst usisng the XDCAM for the video, the audio is untouched. i used the media info tool to check and see the final output and the audio format is not giving the right configuration.

I tried adding an XDCAM for the audio and making sure that the ffmpeg title is changed from audio.wav to audio.mxf as the audio is now in mxf format, but then it gives the error of not being able to find the media.
Attachments
changing_ffmpeg.xml
(18.39 KiB) Downloaded 7 times
audio_with_xd.xml
(19.94 KiB) Downloaded 5 times
attempt_8_fail.xml
(21.25 KiB) Downloaded 5 times

momocampo
Posts: 323
Joined: Thu Jun 08, 2017 12:36 pm
Location: France-Paris

Re: Merge Audio and Video Files

Post by momocampo » Fri Sep 13, 2019 2:19 pm

emcodem wrote:
Fri Sep 13, 2019 2:00 pm
momocampo wrote:
Fri Sep 13, 2019 1:57 pm
I think Mister Encodem wants to use some Regex, isn't it ?
Hehe you can bet your ass on it ;-)
But you need to learn about it and this is a really simple thing! Dont want to try? :-) One hint: you need to use parantheses ()
Is it something like :
/(.+)_P2High/
I think it can be ok, right?

@Abul : What do you mean by " the audio format is not giving the right configuration." ?

emcodem
Posts: 369
Joined: Wed Sep 19, 2018 8:11 am

Re: Merge Audio and Video Files

Post by emcodem » Fri Sep 13, 2019 2:26 pm

momocampo wrote:
Fri Sep 13, 2019 1:57 pm
Is it something like :
/(.+)_P2High/
Just perfect, that should be enough! Congratulations!!

abul
Posts: 31
Joined: Wed Sep 11, 2019 12:45 pm

Re: Merge Audio and Video Files

Post by abul » Fri Sep 13, 2019 2:27 pm

You can ignore that post sorry, i was just trying to make the audio use 24 bits per sample and 1152kb/s bit rate but the output gives 1536kb/s and 16 bits sample.

I don't see that as much issue no worth that much marks on this will try maybe later to get that done. I should really make sure all other functions work first :D

Post Reply