Transcode and merge

Questions and answers on how to get the most out of FFAStrans
Post Reply
APerson
Posts: 12
Joined: Wed Sep 18, 2019 11:13 am

Transcode and merge

Post by APerson »

Hi,

I have a m2v video file and 2 wav files for the video.

They have the same name as the video and are in a separate.

Is there a way for me to merge them and get an mxf file.

i know it requires transdoing and i have done that using the HD_CAM, however once i run the custom ffmpeg command to map them
-c copy -map 0:0 -map 0:1 -map 0:1
and out put it, i get the file without any audio, dead silence.

Can anyone help

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

Re: Transcode and merge

Post by emcodem »

Hey, it is great to see that you write your own question thread :-) This way we can take care about your problem in much better detail.

I'd probably go with a custom avisynth script instead but as you started with a custom ffmpeg, lets go on this way.

What you need to know about the custom ffmpeg cmd is that it works just like a real, standalone ffmpeg on cmd but automatically add the first -i %s_source% to the ffmpeg command (hidden). So the contents of the text field where you enter your command.
So as this works just like a usual ffmpeg commandline, it is best if you FIRST make everything work on commandline without involving ffastrans at all and when you are done, you take the relevant parts of your working ffmpeg command and insert them into a processor.

A standalone ffmpeg commandline for merging m2v and 2 separate wav files could look like this:

Code: Select all

ffmpeg -i c:\file.m2v -i c:\file_A1.wav -i c:\file_A2.wav -map 0:0 -map 1:0 -map 2:0 c:\outputfile.mxf

The equivalent in the custom ffmpeg proc would look like this:

Code: Select all

-i c:\file_A1.wav -i c:\file_A2.wav -map 0:0 -map 1:0 -map 2:0
So the custom ffmpeg processor added the first -i and the outputfile name and path for you.

Whats totally wrong in your command is that you do -map 0:1 which translates to "map input stream 0 (so the m2v stream) to output file 1 (which does not exist because you only have a single output file with mxf extension.

Another thing is that -codec copy will only work if your input files fulfill the requirement of the mxf standard that you target, do you know which standard you want to output (D10 or XDCAMHD)?

Let me know further questions.
emcodem, wrapping since 2009 you got the rhyme?
APerson
Posts: 12
Joined: Wed Sep 18, 2019 11:13 am

Re: Transcode and merge

Post by APerson »

Hi Thanks for the help.

I submitted the video to testing to see if it meets the criteria. but i get some issues that the formatting is not matched.

I attached 2 images with what the criteria is.

A1 - audio track one

A2 - audio track 2

I added

Code: Select all

-qscale 0
before the first map to keep the quality.

even if i am running a command after the output is given, i don't mind.

I know that i can try get few of these done myself like

Code: Select all

-br
and have checked with the forum but seems like im getting errors.

please any support.


Can i assume this will work

Code: Select all

ffmpeg -i output.mxf -vcodec mpeg2video -s 1920x1080 -b:v 50000k -maxrate 50000k -bufsize 3835k -minrate 50000k -r 25 -flags ilme -top 1 -acodec pcm_s24le -ar 48000 -pix_fmt yuv422p  output2.mxf
but then stil turns number of audio tracks from 2 to 1 and thats another issue
- Ash
Attachments
error1.PNG
error1.PNG (26.73 KiB) Viewed 7225 times
erro2.PNG
erro2.PNG (24.2 KiB) Viewed 7225 times
emcodem
Posts: 1811
Joined: Wed Sep 19, 2018 8:11 am

Re: Transcode and merge

Post by emcodem »

Hey, the screenshots from your vidchecker report do not match the ffmpeg command you sent.
However, it looks like you are using Vidchecker with settings for XDCAMHD422, so the settings of your ffmpeg command seem to be ok.
Just make sure to specify encoding settings for each stream taht you have, e.g.

Code: Select all

-map 1:0 -c:a pcm_s24le -ar 48000 -map 2:0 -c:a pcm_s24le -ar 48000
Also, here a copy of the video encoding related settings that ffastrans is using at the "XDCAMHD encoding processor"

Code: Select all

-vf "copy,colorspace=fast=1:all=bt709:format=yuv422p:ispace=bt709:itrc=bt709:iprimaries=bt709,fps=50,setfield=tff,separatefields,select='not(mod(n\\,4))+not(mod(n+1\\,4))',weave=t,setfield=tff,setdar=dar=16/9,setsar=sar=1" -timecode 00:00:00:00 -c:v mpeg2video -r 25 -pix_fmt yuv422p -aspect 16:9 -intra_vlc 1 -b:v 50000000 -minrate 50000000 -maxrate 50000000 -bufsize 17825792 -rc_init_occupancy 17825792 -bf 2 -non_linear_quant 1 -seq_disp_ext 1 -video_format component -color_range 1 -color_primaries 1 -color_trc 1 -colorspace 1 -chroma_sample_location topleft -signal_standard 4 -dc 8 -qmin 3 -qmax 28 -g 12 -field_order tt -top 1 -flags +ildct+ilme -alternate_scan 1 -intra_matrix 8,10,22,27,29,37,37,40,9,12,14,28,29,37,39,40,9,14,27,31,34,37,40,48,12,22,27,29,34,37,40,58,26,27,29,34,37,38,48,58,26,27,29,36,38,38,48,69,18,27,34,36,38,38,48,69,26,26,34,34,38,40,58,79 -inter_matrix 16,20,22,26,28,32,32,36,18,20,22,28,28,32,34,36,18,22,26,30,30,32,36,38,20,22,26,28,30,32,36,42,24,26,28,30,32,34,38,40,24,26,28,32,34,34,38,42,24,26,30,32,34,34,38,42,24,24,30,30,34,36,40,44 -f mxf -max_muxing_queue_size 125 -metadata "creation_time=now"
The qscale parameter will most likely not have any effect because the bitrate is fixed and extremely high anyway.
emcodem, wrapping since 2009 you got the rhyme?
APerson
Posts: 12
Joined: Wed Sep 18, 2019 11:13 am

Re: Transcode and merge

Post by APerson »

Thanks emcodem,

No errors now with the added code you have given for each media. I will now try the XDCAM on FFAstrans and try it and if it doesnt work, ill try the custom command and see if it works there
Post Reply