Hi, please can someone help a poor C*T ?
Consider my MXF source xdcamhd422 C0058.MXF from sony pdw700/pdw-f800 cameras
https://www.dropbox.com/s/b09etl1i2bfryj5/C0058.MXF?dl=0
[Attachment 42788 - Click to enlarge]
there is an audio music only in CH4 (track 4?) [starsailor four to the floor]
I need to generate another file called C0058b.MXF in wich the CH4 is copied on CH2 (the audio content in CH2 it's lost).
IF possible using FFMBC, if not possible.. using FFmpeg
thanks
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays!
+ Reply to Thread
Results 1 to 12 of 12
Thread
-
-
Weren't you told about -map last week already?
https://trac.ffmpeg.org/wiki/Map -
yes but ..............
seems a little compliCatLast edited by marcorocchini; 11th Aug 2017 at 00:58.
-
The link above, I thought, is almost exactly what you want to do.
Just -map 0:0 -map 0:1 -map 0:4
IN Old video channel 0, old audio from channel 1, Old audio from channel 4
OUT New video channel 0, New Audio in channel 1, New audio is channel 2 -
but is possible in 1 only commandline or is necessary more than 1 commandline?
-
I try to extract audio CH1+CH4 and put it on a file called pair1.wav
and audio CH3+CH4 in pair2.wav
Code:ffmpeg.exe -y -i C0058.MXF -filter_complex "[0:1] [0:4] amerge" -c:a pcm_s24le pair1.wav ffmpeg.exe -y -i C0058.MXF -filter_complex "[0:3] [0:4] amerge" -c:a pcm_s24le pair2.wav
-
Yes.
https://trac.ffmpeg.org/wiki/Creating%20multiple%20outputs
But why do you want to create (stereo?) wav files now? Your original file had mono tracks. Some of which you wanted to duplicate/replace. For that you need to use -map like you were told several times now. Can you not make up your mind? -
Marcorocchini,
Usually, I am in favor of over explaining with pictures, programs and alternate methods of describing to people who ask for help because, after all, they say they do not know these things. Looking back I see you have been a member for over 1700 days and have posted almost 1600 times, mostly questions. Most of the time you start out with one request and then end up going through several more requests to get what you finally want, like the last post to concat two videos but what you wanted is a simple one-liner that does a complex job of mapping 2 audios into one with a video portion.
https://forum.videohelp.com/threads/384431-FFMPEG-why-I-cannot-f-concat-this-2-video-files
And after all the help, you must have picked up some knowledge or log of FFMPEG, FFMBC and Avisynth by now. Even if you have not, it would be a lot faster and easier if you just explained what you have and what you want IN DETAIL to start with.
Is the end result you are wanting just to have a one line script that amerges 3 of 4 audios into 2 audio streams or are you going to want them merged with a video that has 2 amerged streams as its audio? Or a video with Left amerged audio1 and right amerged audio2? -
Budman c*t sorry I'm not "people": I'm a ***
What I have to do exactly? In many situations happens that the operator in the camera forget to set the switch of audio CH2 (is the audio from the panoramic microphone of the camera, this
[Attachment 42808 - Click to enlarge]
) to "front" position.
[Attachment 42807 - Click to enlarge]
THis happens for example when during an interview where in CH1 I put audio of interviewd person, and audio of the journalist in CH2. At the end of interview I forget to set the audio CH2 from "rear" (line/mic line) to "front" (microphone camera) so that the audio in CH2 was null, muted. Nle editors-man usually considers overall audio of ch1/ch2 and ignore all the rest of audio channel, or for example during my batch that generates MP4/h264 transcoding of the footage, the batch consider only CH1 and CH2 and generate an MP4 with stereo audio L+R in witch the L channel (CH2 from camera) was null. I try to do a batch that extract CH4 where the audio-camera is alwais recorded [if you see in my photo I have phisically removed the switch to ensure it is alwais set to "front") and rebuild the original MXF with the CH2 (catched from CH4).
The forget to properly set the switch to "front" is not just mine
However I have ideated this cat-script that is redundant redundant redundant and in many steps is probably wrong or can be improved. With the info received above anyway I have build that:
SetLocal DisableDelayedExpansion
Code:Set "EXTLIST=*.MXF" Set "DoPop=0" Set "ARGLVL=0" Set "FileName-DQ=" set "DestFolder=." Set "WorkFolder=%DestFolder%" rem process the arguments one by one :ARGS color rem if there are no further arguments then exit the batch. if [%1]==[] ( if "%ARGLVL%"=="0" ( CALL :GetTargetName EndLocal pause ) goto :eof ) rem wildcard processing Set "FileName=%~1" if "%FileName%"=="" ( SHIFT goto :ARGS ) rem if the argument doesn't exist in the file system in any form skip it. if NOT EXIST %1 ( SHIFT goto :ARGS ) if NOT [%1]==[] if NOT "%FileName:^*=%%FileName:^?=%"=="%FileName%%FileName%" ( for %%w in (%1) DO ( Set /a ARGLVL+=1 CALL :ARGS "%%~fw" Set /a ARGLVL-=1 ) SHIFT goto :ARGS ) Set "FileName=" rem Set search/recursion variables Set "Pattern=%EXTLIST%" Set "STARTLVL=0" Set "FOUNDLVL=1024" rem if the argument is the current directory then process everything in it. if "%~f1"=="%CD%" ( rem echo Processing Directory "%CD%" CALL :START %1 SHIFT goto :ARGS ) rem Test if the argument is a directory, if it is move to it then process everything in it, if not then move to the file's parent directory and process the file. Then return to starting directory. Type NUL pushd "%~f1" 2> nul if NOT "%errorlevel%"=="0" ( if NOT "%CD%\"=="%~dp1" ( pushd "%~dp1" Set "DoPop=1" ) Set Pattern="%~nx1" ) else ( rem echo Processing Directory "%~f1" Set "DoPop=1" ) CALL :START %1 if "%DoPop%"=="1" ( popd Set "DoPop=0" ) SHIFT goto :ARGS :START <CURRENT_ARG> color rem Count is superseded by FOUNDLVL but may still be useful for renaming purposes Set "Count=0" rem Process all files in the current directory fitting the arguments search pattern. for /f "delims=" %%y in ('dir %Pattern% /b /od /a-d') do ( if /I NOT "%%~y"=="File Not Found" CALL :Process_File "%%~fy" ) rem if it didn't find anything search all directories instead goto :eof if "%Count%"=="0" if %STARTLVL% LSS %FOUNDLVL% ( for /d %%b in (*) do ( pushd "%%~fb" rem echo Processing Directory "%%~fb" Set /a STARTLVL+=1 CALL :START "%%~fb" Set /a STARTLVL-=1 popd ) ) goto :eof :Process_File <FILENAME> color @echo off cls set "AudioVolume=1.0" Set /a Count+=1 Set "FOUNDLVL=%STARTLVL%" SetLocal DisableDelayedExpansion rem Find TimeCode Info Set AUCount=0; for /f "tokens=1,2 delims=^=" %%g in ('v:\automazioneclip\virtualdub\FFProbe -hide_banner -loglevel fatal -pretty -select_streams v:0 -show_streams -show_entries stream^=codec_type^,r_frame_rate^,width^,height^,sample_aspect_ratio:stream_disposition^=:format_tags^=timecode^,company_name^,product_name^,product_version "%~1" 2^>^&1') DO ( if "%%~g"=="TAG:company_name" set "T_Company_Name=%%~h" if "%%~g"=="TAG:product_name" set "T_Product_Name=%%~h" if "%%~g"=="TAG:product_version" set "T_Product_Version=%%~h" if "%%~g"=="TAG:timecode" set "TIMECODE=%%~h" if "%%~g"=="r_frame_rate" set "Frame_Rate=%%~h" if "%%~g"=="width" set "V_Width=%%~h" if "%%~g"=="height" set "V_Height=%%~h" if "%%~g"=="sample_aspect_ratio" set "V_PAR=%%~h" if "%%~g"=="codec_type" if "%%~h"=="audio" set /a AUCount+=1 ) if "%V_Width%"=="" ( echo ERROR: Video Width NOT FOUND! timeout /t 3 goto :eof ) if "%V_Height%"=="" ( echo ERROR: Video Height NOT FOUND! pause goto :eof ) if "%Frame_Rate%"=="" ( echo ERROR: Frame_Rate NOT FOUND! ) if "%V_PAR%"=="" ( echo ERROR: Video PAR NOT FOUND! pause ) if %V_Width% GTR 801 if %V_Height% GTR 609 set "V_Q=HD" if %V_Width% LEQ 800 if %V_Height% LEQ 601 Set "V_Q=SD" if "%V_Width%"=="720" if "%V_Height%"=="608" Set "V_Q=XDCAM_IMX" echo Using %V_Q% Mode echo PAR = %V_PAR% rem *** check if file is MXF Set "TokenS=0" Set "isMXF=0" IF "%~x1"==".MXF" Set "TokenS=1" IF "%~x1"==".mxf" Set "TokenS=1" If "%TokenS%"=="1" Set "isMXF=1" IF exist "%DestFolder%\unicodefile.txt" DEL "%DestFolder%\unicodefile.txt" IF exist "%DestFolder%\mediainfo.txt" DEL "%DestFolder%\mediainfo.txt" v:\automazioneclip\virtualdub\mediainfo.exe "%~dpnx1" dumpinfo:unicodefile.txt TYPE unicodefile.txt>mediainfo.txt findstr /c:"Codec ID : 0D01030102020201-0401020202010200" "mediainfo.txt" IF NOT ERRORLEVEL 1 (set "dvcam=1") set "PROGRESSIVE=0" findstr /c:"Scan type : Progressive" "mediainfo.txt" IF NOT ERRORLEVEL 1 (set "PROGRESSIVE=1") set "doubleframrate=0" findstr /c:"Frame rate : 50.000 fps" "mediainfo.txt" IF NOT ERRORLEVEL 1 (set "doubleframrate=1") findstr /c:"Codec ID : YUY2" "mediainfo.txt" IF NOT ERRORLEVEL 1 (set "UNCOMPRESSED=1") set "fullHDinterlace=0" set "xdcamhd422=unknown" set "fps=unknown" set "ch_sub=unknown" set "scanInterlace=unknown" findstr /c:"Format profile : 4:2:2@High" "mediainfo.txt" IF NOT ERRORLEVEL 1 (set "xdcamhd422=yes") findstr /c:"Frame rate : 25.000 fps" "mediainfo.txt" IF NOT ERRORLEVEL 1 (set "fps25=yes") findstr /c:"Chroma subsampling : 4:2:2" "mediainfo.txt" IF NOT ERRORLEVEL 1 (set "ch_sub=yes") findstr /c:"Scan type : Interlaced" "mediainfo.txt" IF NOT ERRORLEVEL 1 (set "scanInterlace=yes") findstr /c:"Scan type : Progressive" "mediainfo.txt" IF NOT ERRORLEVEL 1 (set "scanProgressive=yes") findstr /c:"Scan type : MBAFF" "mediainfo.txt" IF NOT ERRORLEVEL 1 (set "scanMBAFF=1") findstr /c:"Height : 1 088" "mediainfo.txt" IF NOT ERRORLEVEL 1 (set "height1088=1") findstr /c:"Original height : 1 088 pixels" "mediainfo.txt" IF NOT ERRORLEVEL 1 (set "Morgan1088=1") if "%xdcamhd422%"=="yes" if "%fps25%"=="yes" if "%ch_sub%"=="yes" if "%scanInterlace%"=="yes" set "fullHDinterlace=1" if "%xdcamhd422%"=="yes" if "%fps25%"=="yes" if "%ch_sub%"=="yes" if "%scanProgressive%"=="yes" set "fullHDprogressive=1" set "IMX=0" findstr /c:"Commercial name : IMX" "mediainfo.txt" IF NOT ERRORLEVEL 1 (set "IMX=1") set "MXFXDCAMHQorSP25fpsinterlaced=0" set "MXFXDCAMHQorSP25fpsProgressive=0" set "fps25=unknown" set "ch_sub420=unknown" findstr /c:"Commercial name : XDCAM HD 35" "mediainfo.txt" IF NOT ERRORLEVEL 1 (set "xdcamhd35=yes") findstr /c:"Commercial name : XDCAM HD 25" "mediainfo.txt" IF NOT ERRORLEVEL 1 (set "xdcamhd25=yes") findstr /c:"Format : MPEG Video" "mediainfo.txt" IF NOT ERRORLEVEL 1 (set "mpegvideoF335=yes") findstr /c:"Commercial name : HDV 1080i" "mediainfo.txt" IF NOT ERRORLEVEL 1 (set "HDV1080i=yes") findstr /c:"Commercial name : HDV 1080p" "mediainfo.txt" IF NOT ERRORLEVEL 1 (set "HDV1080p=yes") findstr /c:"Frame rate : 25.000 fps" "mediainfo.txt" IF NOT ERRORLEVEL 1 (set "fps25=yes") findstr /c:"Frame rate : 25.000 fps" "mediainfo.txt" IF NOT ERRORLEVEL 1 (set "fps25tag=1") findstr /c:"Chroma subsampling : 4:2:0" "mediainfo.txt" IF NOT ERRORLEVEL 1 (set "ch_sub420=yes") findstr /c:"Scan type : Interlaced" "mediainfo.txt" IF NOT ERRORLEVEL 1 (set "scanInterlace=yes") findstr /c:"Scan type : Progressive" "mediainfo.txt" IF NOT ERRORLEVEL 1 (set "scanProgressive420=yes") rem *** check if is an .avi mjpeg input file Set "TokenS=0" Set "isAVI=0" IF "%~x1"==".AVI" Set "TokenS=1" IF "%~x1"==".avi" Set "TokenS=1" If "%TokenS%"=="1" Set "isAVI=1" Set "TokenS=0" IF "%isAVI%"=="1" (v:\automazioneclip\virtualdub\mediainfo.exe "%~dp1%~n1.avi" dumpinfo:unicodefile.txt TYPE unicodefile.txt>mediainfo.txt) findstr /c:"Codec ID : MJPG" "mediainfo.txt" IF NOT ERRORLEVEL 1 (set "AVImjpeg=1") if "%xdcamhd35%"=="yes" if "%fps25%"=="yes" if "%ch_sub420%"=="yes" if "%scanInterlace%"=="yes" set "MXFXDCAM3525fpsinterlaced=1" if "%HDV1080i%"=="yes" if "%fps25%"=="yes" if "%ch_sub420%"=="yes" if "%scanInterlace%"=="yes" set "MXFXDCAMHDV1080i25fpsinterlaced=1" if "%mpegvideoF335%"=="yes" if "%fps25%"=="yes" if "%ch_sub420%"=="yes" if "%scanInterlace%"=="yes" set "MXFXDCAMF335interlaced=1" set "MXFXDCAMHQorSP25fpsinterlaced=0" if "%isMXF%"=="1" if "%MXFXDCAM3525fpsinterlaced%"=="1" set "MXFXDCAMHQorSP25fpsinterlaced=1" if "%isMXF%"=="1" if "%MXFXDCAMHDV1080i25fpsinterlaced%"=="1" set "MXFXDCAMHQorSP25fpsinterlaced=1" if "%isMXF%"=="1" if "%MXFXDCAMF335interlaced%"=="1" set "MXFXDCAMHQorSP25fpsinterlaced=1" if "%xdcamhd35%"=="yes" if "%fps25%"=="yes" if "%ch_sub420%"=="yes" if "%scanProgressive420%"=="yes" set "MXFXDCAM3525fpsProgressive=1" if "%xdcamhd35%"=="yes" if "%ch_sub420%"=="yes" if "%scanProgressive420%"=="yes" if "%doubleframrate%"=="1" set "MXFXDCAM35_50fps_Progressive=1" if "%xdcamhd25%"=="yes" if "%ch_sub420%"=="yes" if "%scanProgressive420%"=="yes" if "%doubleframrate%"=="1" set "MXFXDCAM25_50fps_Progressive=1" if "%isMXF%"=="1" if "%MXFXDCAM35_50fps_Progressive%"=="1" set "MXFXDCAM35or25_50fps_Progressive=1" if "%isMXF%"=="1" if "%MXFXDCAM25_50fps_Progressive%"=="1" set "MXFXDCAM35or25_50fps_Progressive=1" if "%HDV1080p%"=="yes" if "%fps25%"=="yes" if "%ch_sub420%"=="yes" if "%scanProgressive420%"=="yes" set "MXFXDCAMHDV1080p25fpsProgressive=1" set "MXFXDCAMHQorSP25fpsProgressive=0" if "%isMXF%"=="1" if "%MXFXDCAM3525fpsProgressive%"=="1" set "MXFXDCAMHQorSP25fpsProgressive=1" if "%isMXF%"=="1" if "%MXFXDCAMHDV1080p25fpsProgressive%"=="1" set "MXFXDCAMHQorSP25fpsProgressive=1" set "dvcamPal=0" if "%isMXF%"=="1" if "%dvcam%"=="1" if "%fps25tag%"=="1" Set dvcamPal=1 set "fullHD=0" if "%H1920%"=="yes" if "%V1080%"=="yes" Set "fullHD=1" echo xdcamhd35interlacciato uguale a "%MXFXDCAM3525fpsinterlaced%" echo HDV1080iinterlacciato uguale a "%MXFXDCAMHDV1080i25fpsinterlaced%" echo MXFXDCAMHQorSP25fpsinterlaced "%MXFXDCAMHQorSP25fpsinterlaced%" echo MXFXDCAM3525fpsProgressive "%MXFXDCAM3525fpsProgressive%" echo MXFXDCAMHDV1080p25fpsProgressive "%MXFXDCAMHDV1080p25fpsProgressive%" echo MXFXDCAMHQorSP25fpsProgressive "%MXFXDCAMHQorSP25fpsProgressive%" rem *** check if file is MXF and - at the same time - any HD Set "TokenS=0" Set "isMXF=0" set "HDformat=0" set "mxfHD422=0" set "mxfHD420=0" set "Ch_Sub422=unknown" set "Ch_Sub420=unknown" if %V_Height% GEQ 720 (Set "HDformat=1") IF "%~x1"==".MXF" Set "TokenS=1" IF "%~x1"==".mxf" Set "TokenS=1" If "%TokenS%"=="1" Set "isMXF=1" findstr /c:"Chroma subsampling : 4:2:2" "mediainfo.txt" IF NOT ERRORLEVEL 1 (set "Ch_Sub422=yes") findstr /c:"Chroma subsampling : 4:2:0" "mediainfo.txt" IF NOT ERRORLEVEL 1 (set "Ch_Sub420=yes") if "%TimeCode%"=="" Set "timecode=00:00:00:00" if "%isMXF%"=="1" if "%HDformat%"=="1" if "%Ch_Sub422%"=="yes" if "%PROGRESSIVE%"=="1" if "%doubleframrate%"=="1" (set "mxfHD422progressiveDoubleFrameRate=1") if "%fullHDinterlace%"=="1" (CALL :Make_File_HD2HDinterlace "%WorkFolder%\%~n1.vcf" "%WorkFolder%\%~n1.avs" "%WorkFolder%\%~n1.avi" "%~f1") if "%fullHDProgressive%"=="1" (CALL :Make_File_HD2HDProgressive "%WorkFolder%\%~n1.vcf" "%WorkFolder%\%~n1.avs" "%WorkFolder%\%~n1.avi" "%~f1") if "%mxfHD422progressiveDoubleFrameRate%"=="1" (CALL :Make_File_mxfHD422progressivemode50fps "%WorkFolder%\%~n1.vcf" "%WorkFolder%\%~n1.avs" "%WorkFolder%\%~n1.avi" "%~f1") if "%MXFXDCAM35or25_50fps_Progressive%"=="1" (CALL :Make_File_MXFXDCAM35or25_50fps_Progressive "%WorkFolder%\%~n1.vcf" "%WorkFolder%\%~n1.avs" "%WorkFolder%\%~n1.avi" "%~f1") if "%IMX%"=="1" (CALL :Make_File_IMX "%WorkFolder%\%~n1.vcf" "%WorkFolder%\%~n1.avs" "%WorkFolder%\%~n1.avi" "%~f1") if "%MXFXDCAMHQorSP25fpsinterlaced%"=="1" (CALL :Make_File_MXFXDCAMHQorSP25fpsinterlaced "%WorkFolder%\%~n1.vcf" "%WorkFolder%\%~n1.avs" "%WorkFolder%\%~n1.avi" "%~f1") if "%MXFXDCAMHQorSP25fpsProgressive%"=="1" (CALL :Make_File_MXFXDCAMHQorSP25fpsProgressive "%WorkFolder%\%~n1.vcf" "%WorkFolder%\%~n1.avs" "%WorkFolder%\%~n1.avi" "%~f1") if "%dvcamPAL%"=="1" (CALL :Make_File_dvcam_PALonly "%WorkFolder%\%~n1.vcf" "%WorkFolder%\%~n1.avs" "%WorkFolder%\%~n1.avi" "%~f1") Set "ScanTypeProgressive=0" IF exist "%DestFolder%\unicodefile.txt" DEL "%DestFolder%\unicodefile.txt" IF exist "%DestFolder%\mediainfo.txt" DEL "%DestFolder%\mediainfo.txt" echo FATTO echo. echo --------------------------------------------- echo. EndLocal goto :eof :Process_Item <item_field> <item_data> color if "%~2"=="N/A" goto :eof if "%~1"=="[/STREAM]" ( set "CType=" goto :eof ) if "%~1"=="[/FORMAT]" ( set "CType=" goto :eof ) if "%~1"=="[FORMAT]" ( set "CType=FORMAT" goto :eof ) if "%~1"=="index" Set "cur_index=%~2" if "%~1"=="codec_name" Set "cur_codec=%~2" if "%~1"=="codec_type" ( if "%~2"=="audio" ( set /a AUCount+=1 set "CType=audio" ) if "%~2"=="video" if NOT "%cur_codec%"=="mjpeg" ( Set /a VDCount+=1 set "CType=video" ) if "%~2"=="subtitle" ( Set /a STCount+=1 set "CType=subtitle" ) goto :eof ) if "%CType%"=="FORMAT" ( if "%~1"=="TAG:company_name" set "T_Company_Name=%~2" if "%~1"=="TAG:product_name" set "T_Product_Name=%~2" if "%~1"=="TAG:product_version" set "T_Product_Version=%~2" if "%~1"=="TAG:timecode" set "TIMECODE=%~2" goto :eof ) if "%CType%"=="video" ( if %VDCount% GTR 1 ( echo Multiple Video Streams!!!! pause ) if "%~1"=="time_base" set "V_Time_Base=%~2" if "%~1"=="r_frame_rate" set "V_Frame_Rate=%~2" if "%~1"=="duration_ts" set "V_Duration=%~2" if "%~1"=="width" set "V_Width=%~2" if "%~1"=="height" set "V_Height=%~2" if "%~1"=="sample_aspect_ratio" set "V_PAR=%~2" if "%~1"=="nb_frames" set "V_Number_Of_Frames=%~2" goto :eof ) goto :eof :Make_File_HD2HDinterlace <VCF_FILENAME> <AVS_FILENAME> <FILENAME> <ORG_FILENAME> echo *** procedura da MXF fullHD 4:2:2 25fps *** timeout /t 1 color f if exist "%~n1.ORG" del "%~n1.ORG" if exist "%cd%\tempAUDIOpair1.wav" del "%cd%\tempAUDIOpair1.wav" if exist "%cd%\tempRebuild.MXF" del "%cd%\tempRebuild.MXF" ffmpeg.exe -y -i %4 -filter_complex "[0:1] [0:4] amerge,volume=1.0" -c:a pcm_s24le "%cd%\tempAUDIOpair1.wav" ffmpeg.exe -y -i %4 -filter_complex "[0:3] [0:4] amerge,volume=1.0" -c:a pcm_s24le "%cd%\tempAUDIOpair2.wav" ffmbc074.exe -threads 12 -y -i %4 -i "%cd%\tempAUDIOpair1.wav" -i "%cd%\tempAUDIOpair2.wav" -target xdcamhd422 -vcodec copy -timecode %timecode% -an tempRebuild.MXF -acodec pcm_s24le -ar 48000 -newaudio -map_audio_channel 1:0:0:0:1:0 -acodec pcm_s24le -ar 48000 -newaudio -map_audio_channel 1:0:1:0:2:0 -acodec pcm_s24le -ar 48000 -newaudio -map_audio_channel 2:0:0:0:3:0 -acodec pcm_s24le -ar 48000 -newaudio -map_audio_channel 2:0:1:0:4:0 -acodec pcm_s24le -ar 48000 if exist "%cd%\tempRebuild.MXF" color a if not exist "%cd%\tempRebuild.MXF" color c & echo *** probabile Errore nella generazione del file tempRebuild.MXF *** && pause ren "%cd%\%~nx4" "%~n1.ORG" ren "%cd%\tempRebuild.MXF" "%~nx4" if exist "%cd%\tempAUDIOpair1.wav" del "%cd%\tempAUDIOpair1.wav" if exist "%cd%\tempAUDIOpair2.wav" del "%cd%\tempAUDIOpair2.wav" IF exist "%DestFolder%\unicodefile.txt" DEL "%DestFolder%\unicodefile.txt" IF exist "%DestFolder%\mediainfo.txt" DEL "%DestFolder%\mediainfo.txt" goto :eof :Make_File_HD2HDprogressive <VCF_FILENAME> <AVS_FILENAME> <FILENAME> <ORG_FILENAME> echo *** procedura da MXF HD 1920x1080 4:2:2 25fps progressivo *** timeout /t 1 color f if exist "%~n1.ORG" del "%~n1.ORG" if exist "%cd%\tempAUDIOpair1.wav" del "%cd%\tempAUDIOpair1.wav" if exist "%cd%\tempRebuild.MXF" del "%cd%\tempRebuild.MXF" ffmpeg.exe -y -i %4 -filter_complex "[0:1] [0:4] amerge,volume=1.0" -c:a pcm_s24le "%cd%\tempAUDIOpair1.wav" ffmpeg.exe -y -i %4 -filter_complex "[0:3] [0:4] amerge,volume=1.0" -c:a pcm_s24le "%cd%\tempAUDIOpair2.wav" ffmbc074.exe -threads 12 -y -i %4 -i "%cd%\tempAUDIOpair1.wav" -i "%cd%\tempAUDIOpair2.wav" -target xdcamhd422 -vcodec copy -timecode %timecode% -an tempRebuild.MXF -acodec pcm_s24le -ar 48000 -newaudio -map_audio_channel 1:0:0:0:1:0 -acodec pcm_s24le -ar 48000 -newaudio -map_audio_channel 1:0:1:0:2:0 -acodec pcm_s24le -ar 48000 -newaudio -map_audio_channel 2:0:0:0:3:0 -acodec pcm_s24le -ar 48000 -newaudio -map_audio_channel 2:0:1:0:4:0 -acodec pcm_s24le -ar 48000 if exist "%cd%\tempRebuild.MXF" color a if not exist "%cd%\tempRebuild.MXF" color c & echo *** probabile Errore nella generazione del file tempRebuild.MXF *** && pause ren "%cd%\%~nx4" "%~n1.ORG" ren "%cd%\tempRebuild.MXF" "%~nx4" if exist "%cd%\tempAUDIOpair1.wav" del "%cd%\tempAUDIOpair1.wav" if exist "%cd%\tempAUDIOpair2.wav" del "%cd%\tempAUDIOpair2.wav" IF exist "%DestFolder%\unicodefile.txt" DEL "%DestFolder%\unicodefile.txt" IF exist "%DestFolder%\mediainfo.txt" DEL "%DestFolder%\mediainfo.txt" goto :eof :Make_File_mxfHD422progressivemode50fps <VCF_FILENAME> <AVS_FILENAME> <FILENAME> <ORG_FILENAME> echo *** procedura Make_File_mxfHD422progressivemode50fps da MXF HD 4:2:2 50fpsPROGRESSIVO qualsiasi risoluzione HD tranne fullHD da ridurre *** timeout /t 1 color f if exist "%~n1.ORG" del "%~n1.ORG" if exist "%cd%\tempAUDIOpair1.wav" del "%cd%\tempAUDIOpair1.wav" if exist "%cd%\tempRebuild.MXF" del "%cd%\tempRebuild.MXF" ffmpeg.exe -y -i %4 -filter_complex "[0:1] [0:4] amerge,volume=1.0" -c:a pcm_s24le "%cd%\tempAUDIOpair1.wav" ffmpeg.exe -y -i %4 -filter_complex "[0:3] [0:4] amerge,volume=1.0" -c:a pcm_s24le "%cd%\tempAUDIOpair2.wav" ffmbc074.exe -threads 12 -y -i %4 -i "%cd%\tempAUDIOpair1.wav" -i "%cd%\tempAUDIOpair2.wav" -target xdcamhd422 -vcodec copy -timecode %timecode% -an tempRebuild.MXF -acodec pcm_s24le -ar 48000 -newaudio -map_audio_channel 1:0:0:0:1:0 -acodec pcm_s24le -ar 48000 -newaudio -map_audio_channel 1:0:1:0:2:0 -acodec pcm_s24le -ar 48000 -newaudio -map_audio_channel 2:0:0:0:3:0 -acodec pcm_s24le -ar 48000 -newaudio -map_audio_channel 2:0:1:0:4:0 -acodec pcm_s24le -ar 48000 if exist "%cd%\tempRebuild.MXF" color a if not exist "%cd%\tempRebuild.MXF" color c & echo *** probabile Errore nella generazione del file tempRebuild.MXF *** && pause ren "%cd%\%~nx4" "%~n1.ORG" ren "%cd%\tempRebuild.MXF" "%~nx4" if exist "%cd%\tempAUDIOpair1.wav" del "%cd%\tempAUDIOpair1.wav" if exist "%cd%\tempAUDIOpair2.wav" del "%cd%\tempAUDIOpair2.wav" IF exist "%DestFolder%\unicodefile.txt" DEL "%DestFolder%\unicodefile.txt" IF exist "%DestFolder%\mediainfo.txt" DEL "%DestFolder%\mediainfo.txt" goto :eof :Make_File_MXFXDCAM35or25_50fps_Progressive <VCF_FILENAME> <AVS_FILENAME> <FILENAME> <ORG_FILENAME> echo *** procedura Make_File_MXFXDCAM35or25_50fps_Progressive da MXF HD 4:2:0 SP o HQ 50fpsPROGRESSIVO da upscalare *** timeout /t 1 color f if exist "%~n1.ORG" del "%~n1.ORG" if exist "%cd%\tempAUDIOpair1.wav" del "%cd%\tempAUDIOpair1.wav" if exist "%cd%\tempRebuild.MXF" del "%cd%\tempRebuild.MXF" ffmpeg.exe -y -i %4 -filter_complex "[0:1] [0:4] amerge,volume=1.0" -c:a pcm_s24le "%cd%\tempAUDIOpair1.wav" ffmbc074.exe -threads 12 -y -i %4 -i "%DestFolder%\tempAUDIOpair1.wav" -vcodec copy -timecode %timecode% -an tempRebuild.MXF -acodec pcm_s16le -ar 48000 -newaudio -map_audio_channel 0:1:0:0:1:0 -acodec pcm_s16le -ar 48000 -newaudio -map_audio_channel 0:4:0:0:2:0 -acodec pcm_s16le -ar 48000 -newaudio -acodec pcm_s16le -ar 48000 -newaudio -map_audio_channel 0:3:0:0:3:0 -map_audio_channel 0:4:0:0:4:0 if exist "%cd%\tempRebuild.MXF" color a if not exist "%cd%\tempRebuild.MXF" color c & echo *** probabile Errore nella generazione del file tempRebuild.MXF *** && pause ren "%cd%\%~nx4" "%~n1.ORG" ren "%cd%\tempRebuild.MXF" "%~nx4" if exist "%cd%\tempAUDIOpair1.wav" del "%cd%\tempAUDIOpair1.wav" IF exist "%DestFolder%\unicodefile.txt" DEL "%DestFolder%\unicodefile.txt" IF exist "%DestFolder%\mediainfo.txt" DEL "%DestFolder%\mediainfo.txt" goto :eof :Make_File_MXFXDCAMHQorSP25fpsinterlaced <VCF_FILENAME> <AVS_FILENAME> <FILENAME> <ORG_FILENAME> echo *** procedura da MXF HD varie risoluzioni XDCAM HQ o SP o xdcam F335 4:2:0 25fps interlaced *** timeout /t 1 color f if exist "%~n1.ORG" del "%~n1.ORG" if exist "%cd%\tempAUDIOpair1.wav" del "%cd%\tempAUDIOpair1.wav" if exist "%cd%\tempRebuild.MXF" del "%cd%\tempRebuild.MXF" ffmpeg.exe -y -i %4 -filter_complex "[0:1] [0:4] amerge,volume=1.0" -c:a pcm_s24le "%cd%\tempAUDIOpair1.wav" ffmbc074.exe -threads 12 -y -i %4 -i "%DestFolder%\tempAUDIOpair1.wav" -vcodec copy -timecode %timecode% -an tempRebuild.MXF -acodec pcm_s16le -ar 48000 -newaudio -map_audio_channel 0:1:0:0:1:0 -acodec pcm_s16le -ar 48000 -newaudio -map_audio_channel 0:4:0:0:2:0 -acodec pcm_s16le -ar 48000 -newaudio -acodec pcm_s16le -ar 48000 -newaudio -map_audio_channel 0:3:0:0:3:0 -map_audio_channel 0:4:0:0:4:0 if exist "%cd%\tempRebuild.MXF" color a if not exist "%cd%\tempRebuild.MXF" color c & echo *** probabile Errore nella generazione del file tempRebuild.MXF *** && pause ren "%cd%\%~nx4" "%~n1.ORG" ren "%cd%\tempRebuild.MXF" "%~nx4" if exist "%cd%\tempAUDIOpair1.wav" del "%cd%\tempAUDIOpair1.wav" IF exist "%DestFolder%\unicodefile.txt" DEL "%DestFolder%\unicodefile.txt" IF exist "%DestFolder%\mediainfo.txt" DEL "%DestFolder%\mediainfo.txt" goto :eof :Make_File_MXFXDCAMHQorSP25fpsProgressive <VCF_FILENAME> <AVS_FILENAME> <FILENAME> <ORG_FILENAME> echo *** procedura da MXF HD varie risoluzioni XDCAM HQ o SP o xdcam F335 4:2:0 25fps progressive *** timeout /t 1 color f if exist "%~n1.ORG" del "%~n1.ORG" if exist "%cd%\tempAUDIOpair1.wav" del "%cd%\tempAUDIOpair1.wav" if exist "%cd%\tempRebuild.MXF" del "%cd%\tempRebuild.MXF" ffmpeg.exe -y -i %4 -filter_complex "[0:1] [0:4] amerge,volume=1.0" -c:a pcm_s24le "%cd%\tempAUDIOpair1.wav" ffmbc074.exe -threads 12 -y -i %4 -i "%DestFolder%\tempAUDIOpair1.wav" -vcodec copy -timecode %timecode% -an tempRebuild.MXF -acodec pcm_s16le -ar 48000 -newaudio -map_audio_channel 0:1:0:0:1:0 -acodec pcm_s16le -ar 48000 -newaudio -map_audio_channel 0:4:0:0:2:0 -acodec pcm_s16le -ar 48000 -newaudio -acodec pcm_s16le -ar 48000 -newaudio -map_audio_channel 0:3:0:0:3:0 -map_audio_channel 0:4:0:0:4:0 if exist "%cd%\tempRebuild.MXF" color a if not exist "%cd%\tempRebuild.MXF" color c & echo *** probabile Errore nella generazione del file tempRebuild.MXF *** && pause ren "%cd%\%~nx4" "%~n1.ORG" ren "%cd%\tempRebuild.MXF" "%~nx4" if exist "%cd%\tempAUDIOpair1.wav" del "%cd%\tempAUDIOpair1.wav" IF exist "%DestFolder%\unicodefile.txt" DEL "%DestFolder%\unicodefile.txt" IF exist "%DestFolder%\mediainfo.txt" DEL "%DestFolder%\mediainfo.txt" goto :eof :Make_File_IMX <VCF_FILENAME> <AVS_FILENAME> <FILENAME> <ORG_FILENAME> echo *** procedura da MXF IMX a morgan mjpeg AVI HD usando solo virtualdub per velocizzare *** timeout /t 1 rem *** al momento l'ouput MXF IMX 50 rimane a soli CH1 e CH2 stante la copia preventiva CH4 su CH2 da originale, vengono persi quindi CH3 e CH4 in USCITA *** color f if exist "%~n1.ORG" del "%~n1.ORG" if exist "%cd%\tempAUDIOpair1.wav" del "%cd%\tempAUDIOpair1.wav" if exist "%cd%\tempRebuild.MXF" del "%cd%\tempRebuild.MXF" ffmpeg.exe -y -i %4 -af "pan=stereo:c0=c0:c1=c3" -c:a pcm_s24le -ar 48000 "%cd%\tempAUDIOpair1.wav" ffmbc074.exe -threads 12 -y -i "%DestFolder%\tempAUDIOpair1.wav" -i %4 -vcodec copy -timecode %timecode% -target imx50 tempRebuild.MXF if exist "%cd%\tempRebuild.MXF" color a if not exist "%cd%\tempRebuild.MXF" color c & echo *** probabile Errore nella generazione del file tempRebuild.MXF *** && pause ren "%cd%\%~nx4" "%~n1.ORG" ren "%cd%\tempRebuild.MXF" "%~nx4" if exist "%cd%\tempAUDIOpair1.wav" del "%cd%\tempAUDIOpair1.wav" IF exist "%DestFolder%\unicodefile.txt" DEL "%DestFolder%\unicodefile.txt" IF exist "%DestFolder%\mediainfo.txt" DEL "%DestFolder%\mediainfo.txt" goto :eof :Make_File_dvcam_PALonly <VCF_FILENAME> <AVS_FILENAME> <FILENAME> <ORG_FILENAME> echo *** procedura DVCAM *** timeout /t 1 color f if exist "%~n1.ORG" del "%~n1.ORG" if exist "%cd%\tempAUDIOpair1.wav" del "%cd%\tempAUDIOpair1.wav" if exist "%cd%\tempRebuild.MXF" del "%cd%\tempRebuild.MXF" ffmpeg.exe -y -i %4 -filter_complex "[0:1] [0:4] amerge,volume=1.0" -c:a pcm_s16le -ar 48000 "%cd%\tempAUDIOpair1.wav" ffmbc074.exe -threads 12 -y -i %4 -i "%DestFolder%\tempAUDIOpair1.wav" -vcodec copy -timecode %timecode% -target dvcam -an tempRebuild.MXF -acodec pcm_s16le -ar 48000 -newaudio -map_audio_channel 0:1:0:0:1:0 -acodec pcm_s16le -ar 48000 -newaudio -map_audio_channel 0:4:0:0:2:0 -acodec pcm_s16le -ar 48000 -newaudio -acodec pcm_s16le -ar 48000 -newaudio -map_audio_channel 0:3:0:0:3:0 -map_audio_channel 0:4:0:0:4:0 if exist "%cd%\tempRebuild.MXF" color a if not exist "%cd%\tempRebuild.MXF" color c & echo *** probabile Errore nella generazione del file tempRebuild.MXF *** && pause ren "%cd%\%~nx4" "%~n1.ORG" ren "%cd%\tempRebuild.MXF" "%~nx4" if exist "%cd%\tempAUDIOpair1.wav" del "%cd%\tempAUDIOpair1.wav" IF exist "%DestFolder%\unicodefile.txt" DEL "%DestFolder%\unicodefile.txt" IF exist "%DestFolder%\mediainfo.txt" DEL "%DestFolder%\mediainfo.txt" goto :eof :GetTargetName color Set "FileName=" Set /p FileName=InputFileName rem Add or remove double-quotes if necessary if NOT DEFINED FileName ( Set "FileName-DQ=" goto :DQSkip ) Set "FileName-DQ=%FileName:"=%" if NOT DEFINED FileName-DQ ( Set "FileName=" Set "FileName-DQ=" goto :DQSkip ) if EXIST "%FileName-DQ%" ( if "%FileName-DQ%"=="%FileName-DQ: =%" ( Set "FileName=%FileName-DQ%" ) else ( Set FileName="%FileName-DQ%" ) ) :DQSkip color if /I "%FileName-DQ%"=="" Set FileName="%CD%" if /I "%FileName-DQ%"=="CD" Set FileName="%CD%" if /I "%FileName-DQ%"=="EXIT" goto :eof if /I "%FileName-DQ%"=="NOEXIT" goto :GetTargetName if DEFINED FileName ( Set /a ARGLVL+=1 CALL :ARGS %FileName% Set /a ARGLVL-=1 ) goto :GetTargetName
The other post is a an exceptional case: the 2 files seems absolutely identical (but different).
In this scrpt if possible I try to understand if is there possible to do all in one commaline of ffmbc, instead of 2 ffmpeg + 1 fmmbc
ffmpeg.exe -y -i %4 -filter_complex "[0:1] [0:4] amerge,volume=1.0" -c:a pcm_s24le "%cd%\tempAUDIOpair1.wav"
ffmpeg.exe -y -i %4 -filter_complex "[0:3] [0:4] amerge,volume=1.0" -c:a pcm_s24le "%cd%\tempAUDIOpair2.wav"
ffmbc074.exe -threads 12 -y -i %4 -i "%cd%\tempAUDIOpair1.wav" -i "%cd%\tempAUDIOpair2.wav" -target xdcamhd422 -vcodec copy -timecode %timecode% -an tempRebuild.MXF -acodec pcm_s24le -ar 48000 -newaudio -map_audio_channel 1:0:0:0:1:0 -acodec pcm_s24le -ar 48000 -newaudio -map_audio_channel 1:0:1:0:2:0 -acodec pcm_s24le -ar 48000 -newaudio -map_audio_channel 2:0:0:0:3:0 -acodec pcm_s24le -ar 48000 -newaudio -map_audio_channel 2:0:1:0:4:0 -acodec pcm_s24le -ar 48000Last edited by marcorocchini; 11th Aug 2017 at 12:37.
-
1 video + 2 stereo tracks in mxf ? (audio 1+4, audio 3+4) ? ffmbc ?
use -map_audio_channel on the original
Code:-map_audio_channel (in_file):(in_stream):(in_channel):(out_file):(out_stream):(out_channel)
Code:ffmbc -i INPUT.mxf -vcodec copy -map_audio_channel 0:1:0:0:1:0 -map_audio_channel 0:4:0:0:1:1 -acodec pcm_s24le -ar 48000 -ac 2 -map_audio_channel 0:3:0:0:2:0 -map_audio_channel 0:4:0:0:2:1 -acodec pcm_s24le -ar 48000 -ac 2 -f mxf OUTPUT.mxf -newaudio
Code:Stream #0.0(und): Video: mpeg2video, yuv422p, 1920x1080i tff [PAR 1:1 DAR 16 :9], stream copy, 25.00 fps Stream #0.1(und): Audio: pcm_s24le, 48000 Hz, 2 channels, s32, 2304 kb/s Stream #0.2(und): Audio: pcm_s24le, 48000 Hz, 2 channels, s32, 2304 kb/s Stream mapping: Stream #0.0 -> #0.0 Stream #0.1 -> #0.1 [channel: 0 -> 0] Stream #0.4 -> #0.1 [channel: 0 -> 1] Stream #0.3 -> #0.2 [channel: 0 -> 0] Stream #0.4 -> #0.2 [channel: 0 -> 1]
-
[Attachment 42809 - Click to enlarge]
now it's all clear, thanks :d:d:d:d:d:d
Similar Threads
-
FFMBC 0.7.4 now encode XDCAM ok, and FFMPEG?
By marcorocchini in forum Newbie / General discussionsReplies: 7Last Post: 6th Oct 2017, 04:24 -
FFMPEG|FFMBC pipe to encode from .avi to .mxf files
By marcorocchini in forum Newbie / General discussionsReplies: 2Last Post: 21st May 2014, 03:51 -
ffmpeg/ffmbc metadata
By marcorocchini in forum Newbie / General discussionsReplies: 21Last Post: 16th May 2014, 18:54 -
FFMBC remux .mxf files and audio
By marcorocchini in forum Newbie / General discussionsReplies: 1Last Post: 20th Jun 2013, 00:26 -
FFMBC: How do I batch remove all audio from MOV files in a folder?
By newhampshirefarms in forum Video ConversionReplies: 2Last Post: 9th Oct 2012, 21:57