Merge Audio and Video Files

Questions and answers on how to get the most out of FFAStrans
abul
Posts: 45
Joined: Wed Sep 11, 2019 12:45 pm

Re: Merge Audio and Video Files

Post by abul » Thu Sep 12, 2019 1:23 pm

actually tried to output it in a different format and seems that i cannot as its unwrapping the content and giving m2v

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

Re: Merge Audio and Video Files

Post by emcodem » Thu Sep 12, 2019 1:27 pm

There is a typo in the command that momocampo posted, here is the correct one:
ffmpeg -i video.m2v -i audio.wav -map 0:0 -map 1:0 output.mxf

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

Re: Merge Audio and Video Files

Post by abul » Thu Sep 12, 2019 1:34 pm

ah okay this worked but it does seem that i has reduced the quality alot

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

Re: Merge Audio and Video Files

Post by emcodem » Thu Sep 12, 2019 1:41 pm

I hand over to @momocampo again but here is how you can keep the quality:

ffmpeg -i video.m2v -i audio.wav -map 0:0 -map 1:0 -codec copy output.mxf

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

Re: Merge Audio and Video Files

Post by abul » Thu Sep 12, 2019 1:55 pm

Know why im getting this error

[mxf @ 00000262b9979400] could not get mpeg2 profile and level
av_interleaved_write_frame(): Operation not permitted

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

Re: Merge Audio and Video Files

Post by momocampo » Thu Sep 12, 2019 2:18 pm

Ok first let's talk.
Your m2v file seems to be SD format. What do you want in the end ? SD or HD ? MXF but what codec inside?
If you want SD, I think you can encode you m2v to D-10 end merge it with audio (It works I tried).
If you want something else, tell me.

;)

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

Re: Merge Audio and Video Files

Post by abul » Thu Sep 12, 2019 2:23 pm

File extension
.MXF

Container
MXF OP1a

Video Codec
MPEG2

Video Bitrate
50 Mbps

Profile
4:2:2

Resolution
1920x1080

Standard
PAL

Field Order
Interlaced, Top Field First

Frame Rate
25.00 fps

Audio Codec
BWF Audio

Audio Channels
2

Audio Sample Rate
48kHz

Aspect Ratio
16:9


This is what the specification given by the lecturer says

They gave a folder full of video files and audio

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

Re: Merge Audio and Video Files

Post by momocampo » Thu Sep 12, 2019 2:29 pm

Ok so you want to change M2v which is 720x576 SD format to XDCAM HD 1920x1080.
So you have just to insert a encoder node (xdcam Hd 422) between the monitor folder for video file and first delivery file.
The video m2v will be encode in XDCAM then merge with audio to out in mxf
;)

EDIT: Ok it works. You have to check to accept only *.m2v in video file monitor folder.
Summary :
Take audio file, rename it "audio.wav" and delivery in folder Merge/
Take video file, rename it "video.m2v" and delivery in folder Merge/Encode it XDCAM HD/ take it and merge with "audio.wav"/ deliver %original_name% (so name of video file) .mxf

;)

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

Re: Merge Audio and Video Files

Post by abul » Thu Sep 12, 2019 3:00 pm

Ah yes thank you it has worked.

My question now is that:

If i have 2 video file and 2 audio file, how will it know which audio file belongs to which video. both audio and video names are similar it starts of with category like food
followed by show or movie
followed by a string thats there on all video file P2High
followed by random numbers
EXAMPLE:
food_show_johnsCooking_P2High00c450277201909032309330843.wav
food_show_johnsCooking_P2Highc450277201909032309330827.m2v


and what would happen if there is 2 audio file left and right audio.


sorry i know i am asking alot but i've never used ffmpeg or FFAstrans or given any advice and told us to use this. :(

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

Re: Merge Audio and Video Files

Post by emcodem » Thu Sep 12, 2019 5:59 pm

Pleas describe much more what you want to do. I mean you say you habe 2 videos and 2 audios in a single folder but you only give examles for 1 video and 1 audio.
Finding the wav to the m2v is not a matter of ffmpeg or ffastrans, you would face the same problem using any other transcoder. Ffastrans allows you to do anything you like basically, you just need to get out what you like to do ;)

So please give an exakt description of how you want to work: do you have thousans of files already in a folder or do you plan to have a watchfolder where new pairs of files ate dropped every day?
How does one folder containing m2v and wav exactly look like, how many files are there, whats the filenames, whats the video and audio format, is it alwas exactly the same?

Post Reply