to precisate: ALL this in avisynth is done by the "generic routine": when is not possible to transcode all .mxf file with vitualdub, the batch use avisynth
and all is okCode::Make_File_generic <VCF_FILENAME> <AVS_FILENAME> <FILENAME> <ORG_FILENAME> echo inizio routine generic pause rem *** TRY extract audio from .MXF IMX SD FILE *** Set "TokenS=0" IF "%~x4"==".MXF" Set "TokenS=1" IF "%~x4"==".mxf" Set "TokenS=1" If "%TokenS%"=="1" (if "%V_Width%"=="720" (v:\automazioneclip\core\ffmpeg.exe -loglevel fatal -y -i %4 -map_channel 0.1.0 -map_channel 0.1.1 -af "volume=volume=9dB:precision=fixed" "%DestFolder%\%~n1_SD.wav")) If "%TokenS%"=="1" (if "%V_Width%"=="720" (v:\automazioneclip\core\ffmpeg.exe -loglevel fatal -y -i %4 -map_channel 0.1.2 -map_channel 0.1.3 -af "volume=volume=9dB:precision=fixed" "%DestFolder%\%~n1ch3ch4_SD.wav")) rem *** TRY extract audio from .MXF XDCAM-HD 4:2:2 FILE *** Set "TokenS=0" IF "%~x4"==".MXF" Set "TokenS=1" IF "%~x4"==".mxf" Set "TokenS=1" If "%TokenS%"=="1" (if "%V_Width%"=="1920" (v:\automazioneclip\core\ffmpeg.exe -y -i %4 -filter_complex "[0:1] [0:2] amerge,volume=1.5" -c:a pcm_s16le "%DestFolder%\%~n1_SD.wav")) If "%TokenS%"=="1" (if "%V_Width%"=="1920" (v:\automazioneclip\core\ffmpeg.exe -y -i %4 -filter_complex "[0:3] [0:4] amerge,volume=1.5" -c:a pcm_s16le "%DestFolder%\%~n1ch3ch4_SD.wav")) rem *** TRY extract audio from .MXF DVCAM *** Set "TokenS=0" IF "%~x4"==".MXF" Set "TokenS=1" IF "%~x4"==".mxf" Set "TokenS=1" If "%TokenS%"=="1" (if "%dvcam%"=="1" (v:\automazioneclip\core\ffmpeg.exe -y -i %4 -filter_complex "[0:1] [0:2] amerge,volume=1.5" -c:a pcm_s16le "%DestFolder%\%~n1_SD.wav")) If "%TokenS%"=="1" (if "%dvcam%"=="1" (v:\automazioneclip\core\ffmpeg.exe -y -i %4 -filter_complex "[0:3] [0:4] amerge,volume=1.5" -c:a pcm_s16le "%DestFolder%\%~n1ch3ch4_SD.wav")) rem *** TRY extract audio from GOPRO MP4 file *** Set "TokenS=0" IF "%~x4"==".MP4" Set "TokenS=1" IF "%~x4"==".mp4" Set "TokenS=1" If "%TokenS%"=="1" (v:\automazioneclip\core\ffmpeg.exe -y -i %4 -filter_complex "[0:1] volume=1.5" -c:a pcm_s16le "%DestFolder%\%~n1_SD.wav") rem *** TRY extract audio from .MP4 OTHER TYPE *** Set "TokenS=0" IF "%~x4"==".MP4" Set "TokenS=1" IF "%~x4"==".mp4" Set "TokenS=1" If "%TokenS%"=="1" (v:\automazioneclip\core\ffmpeg.exe -y -i %4 -filter_complex "[0:0] volume=1.5" -c:a pcm_s16le "%DestFolder%\%~n1_SD.wav") echo *** from various format to MorganMJPEG AVI SD 720x576i@25fps using Avisynth+Virtualdub *** rem ***Make The .vcf Script File*** echo VirtualDub.audio.SetSource^(0^);>%1cho VirtualDub.audio.SetMode^(0^);>>%1 VirtualDub.audio.SetInterleave^(1,500,1,0,0^);>>%1 VirtualDub.audio.SetClipMode^(1,1^);>>%1 VirtualDub.audio.SetEditMode^(1^);>>%1 VirtualDub.audio.SetConversion^(0,0,0,0,0^);>>%1 VirtualDub.audio.SetVolume^(^);>>%1 VirtualDub.audio.SetCompression^(^);>>%1 VirtualDub.audio.EnableFilterGraph^(0^);>>%1 VirtualDub.video.SetInputFormat^(0^);>>%1 VirtualDub.video.SetOutputFormat^(11^);>>%1 echo VirtualDub.video.SetMode^(1^);>>%1 echo VirtualDub.video.SetSmartRendering^(0^);>>%1 VirtualDub.video.SetPreserveEmptyFrames^(0^);>>%1 VirtualDub.video.SetFrameRate2^(0,0,1^);>>%1 VirtualDub.video.SetIVTC^(0, 0, 0, 0^);>>%1 echo VirtualDub.video.SetCompression^(0x6a6d7674,0,10000,0^);>>%1 VirtualDub.video.SetCompData^(28,"TUpQRxgAAAAAAAAAAgAAAAgAAAACAAAAAQAAAA=="^);>>%1VirtualDuVirtualDub.video.filters.Clear^(^);>>%1 echo VirtualDub.video.filters.Add^("deinterlace"^);>>%1ViVirtualDub.video.filters.instance[0].Config^(0,1,1^);>>%1 echo VirtualDub.video.filters.Add^("resize"^);>>%1ViVirtualDub.video.filters.instance[1].Config^(720,576,0,4,3,0,320,240,4,3,0,135,1,0x000000^);>>%1 echo VirtualDub.video.filters.Add^("interlace"^);>>%1ViVirtualDub.video.filters.instance[2].Config^(0, 0^);>>%1 echo VirtualDub.audio.filters.Clear^(^);>>%1 echo VirtualDub.audio.filters.Clear^(^);>>%1 if NOT "%TimeCode%"=="" echo VirtualDub.project.ClearTextInfo^(^);>>%1 if NOT "%TimeCode%"=="" echo VirtualDub.project.AddTextInfo^("ISMP", "%TIMECODE%"^);>>%1 echo VirtualDub.SaveAVI^("%DestFolder%\\%~n1_SD.avi"^);>>%1 echo VirtualDub.Close^(^);>>%1m ***Make The .avs Script File*** echo Import("C:\Program Files\AviSynth\plugins\IResize.avsi")>%2 echo FFVideoSource^(%4^)>>%2 echo ConvertToYUY2^(interlaced=true^)>>%2 if "%dvcam%"=="1" echo ReverseFieldDominance^(^)>>%2 echo src = last >>%2 echo src = src.width==720^&^&src.height==608?src.crop^(0,32,0,0^):src >>%2 echo src = src.width==1920 ^&^& src.height==1088 ? src.crop^(0,0,1920,1080^): src >>%2 echo src = src.width^>720^| src.height^>608?src.ColorMatrix^(mode="Rec.709->Rec.601: src >>%2 echo src.width!=720 ^|^| src.height!=576 ? src.IResize^(720,576^): src >>%2 if "%Frame_Rate%" == "50/1" echo src.framerate^<26 ? AssumeTFF^(^).SeparateFields^(^).SelectEvery^(4,0,3^).Weave^(^) >>%2 echo AssumeFPS^(25^)>>%2 echo processing source file %4 rem ***Call VirtualDub*** if NOT EXIST %VD_LOC% ( echo Um, where the hell is VirtualDubMod? pause ) %VD_LOC% /min %2 /s %1 for %%v in ("%DestFolder%\\%~n1_SD.avi") do ( if %%~zv LSS 128 ( echo ERROR!!! Extra Small File Size Detected!!! pause ) ) v:\automazioneclip\virtualdub\cfourcc.exe -i "%CD%\%~n1_SD.avi" -u MJPG -d MJPG DEL "%DestFolder%\*.ffindex" DEL "%DestFolder%\*.VCF" rem DEL "%DestFolder%\*.avs" DEL "%DestFolder%\unicodefile.txt" DEL "%DestFolder%\mediainfo.txt" v:\automazioneclip\virtualdub\cfourcc.exe -i "%CD%\%~n1_SD.avi" -u MJPG -d MJPG goto :eof
But the only problem of avisynth is the time wasted for the indexing process of the ffms2. To load a 45GB .mxf file, virtualdub (with the ffmpeg plugin) employs 3 seconds. Avisynth employs 15 minutes due to the indexing.
What I should try to do is a batch that use, if possible, virtualdub in all possible cases, and avisynth for all the rest because of the indexing problem of avisynth
+ Reply to Thread
Results 31 to 55 of 55
-
-
and this can convert all .mxf files into fullHD (but IResize is already a little slow)
Code:echo Import("C:\Program Files\AviSynth\plugins\IResize.avsi")>%2 echo FFVideoSource^(%4^)>>%2 echo ConvertToYUY2^(interlaced=true^)>>%2 if "%dvcam%"=="1" echo ReverseFieldDominance^(^)>>%2 echo src = last >>%2 echo src = src.width==720^&^&src.height==608?src.crop^(0,32,0,0^):src >>%2 echo src = src.width==1920 ^&^& src.height==1088 ? src.crop^(0,0,1920,1080^): src >>%2 echo src = src.width^<721 ^|^| src.height^<609?src.ColorMatrix^(mode="Rec.601->Rec.709"^): src >>%2 echo src.width!=1920 ^|^| src.height!=1080 ? src.IResize^(1920,1080^): src >>%2 if "%Frame_Rate%" == "50/1" echo src.framerate^<26 ? AssumeTFF^(^).SeparateFields^(^).SelectEvery^(4,0,3^).Weave^(^) >>%2 echo AssumeFPS^(25^)>>%2 echo processing source file %4 rem ***Call VirtualDub*** if NOT EXIST %VD_LOC% ( echo Um, where the hell is VirtualDubMod? pause ) %VD_LOC% /min %2 /s %1 for %%v in ("%DestFolder%\\%~n1_HD.avi") do ( if %%~zv LSS 128 ( echo ERROR!!! Extra Small File Size Detected!!! pause ) ) v:\automazioneclip\virtualdub\cfourcc.exe -i "%CD%\%~n1_HD.avi" -u MJPG -d MJPG DEL "%DestFolder%\*.ffindex" DEL "%DestFolder%\*.VCF" DEL "%DestFolder%\*.avs" DEL "%DestFolder%\unicodefile.txt" DEL "%DestFolder%\mediainfo.txt" set "dvcam=0" v:\automazioneclip\virtualdub\cfourcc.exe -i "%CD%\%~n1_HD.avi" -u MJPG -d MJPG goto :eof
-
sorry jagabo, what I have to do?
when camera works @ 50P I set the detail = 0
however the problem of aliasing I think is resolvible. The problem that I cannot resolve is that:
using the "interlaced" filter in virtualdub as .vcf (because I have to batch automate) causes an abnormal duplication of the original time duration. If you load manually the filter and save the avi, all is ok
If you do it via .vcf / batch automate the problem is presenting.
clear about the resize procedure, it remains to understand why it happens this in virtualdub -
I try to explain the problem:
please download the source (1280x720/50fps it have duration of 7,5 seconds):
https://www.dropbox.com/s/l44obigzqyhfwua/C0030.MXF?dl=0
I have load it on virtualdub 1.10.04 with the ffmpeg plugin v0.8.1.4
and insert the only "interlace" filter so that
---> SAVE AVI file and all is ok
Now in virtualdub I "save the processing settings" into the cat.vcf
close virtualdub and reopen it, -->open the C0030.mxf and load the cat.vcf
--> save avi ... but it do a file that have duration doubled (15 seconds) and video, of course, plays only until the half of the entire file and the freeze at the half: this is the problem
https://www.dropbox.com/s/o7yutkar1ucbfhj/c0030.mp4?dl=0
summarizing: when the interlace filter is manually set in virtualdub all is ok. When it where load by a .vcf file (for batch automation) do the problem
Is there a way to remediate? thanks -
I had no such problem with your earlier c0016.mxf. So you probably have a source plugin issue.
-
mhh are you sure?
- so have you saved the cat.vcf (cat.vdscript), closed VD --> reopen VD, load C0016.mxf and apply cat.vdscript using the "load processing settings" and saved all as avi file? and the saved avi file is really ok?
- what version of virtualdub do you have?
- what version of the ffmpeg plugin to open the c0016.mxf have?
I do all proof with this configuration of the plugin:
thanksLast edited by marcorocchini; 30th Sep 2014 at 07:54.
-
I have try also opening the .mxf with DirectShow plugin for Virtualdub == same problem
so I have try opening the .mxf with avisynth == same problem
I try to understand if the problem is virtualdub or the plugin that opens the .mxf file -
Last edited by jagabo; 30th Sep 2014 at 15:03.
-
you sayd: I don't use the ffmpeg source plugin -- it causes too many problems. I used the MPEG2 source plugin. But that does corrupt the MXF picture here and there so it's not a solution for you.
so I'm wondering: but can you see the problem of duration o not?
because in the previous post you sayd
jagabo: I'm a soft cat, perhaps I cannot translate very well english -
Since it happens with AVI files it's probably a bug in VirtualDub. Contact the author for a fix. For the time being, a workaround is to load the vdscript first, then open the video.
-
so we 5 cats have try to understand:
problem maybe that in vfc has been write the total leght / 2 due to the 25 interlaced e.g my brother cat C0016.mxf have 2982 frames. When adding the "interlace" filter, due to the 25 interlace mode, the duration become decimate (?) by 2, or 1491 frames
When saved a .vfc script that recognize the correct duration of my cat (when adding the filter interlace" it write in the vcf that my brother have a duration of 1491 frames
VirtualDub.subset.Clear();
VirtualDub.subset.AddRange(0,1491);
VirtualDub.video.SetRange();
so that that seems to me that a batch have to calculate the total frames / 2 (2982 / 2 = 1491 frames)
To do this ffprobe can recognize in .mxf files the total number of frames with this procedure:
Code: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 ) for /f "tokens=1,2 delims=^=" %%g in ('v:\automazioneclip\virtualdub\FFProbe -hide_banner -loglevel fatal -pretty -select_streams v:0 -show_streams "%~1"') DO ( if "%%~g"=="duration_ts" set "NumberOfFrame=%%~h") echo the variabile T_Company_Name assume this value "%T_Company_Name%" echo the variabile T_Product_Name assume this value "%T_Product_Name%" echo the variabile T_Product_Version assume this value "%T_Product_Version%" echo the variabile TIMECODE assume this value "%TIMECODE%" echo the variabile Frame_Rate assume this value "%Frame_Rate%" echo the variabile V_Width assume this value "%V_Width%" echo the variabile V_Height assume this value "%V_Height%" echo the variabile V_PAR assume this value "%V_PAR%" set /a "forVirtualDubAddRangeWhenDoubleFrameRate"=%NumberOfFrame%/2 echo the variabile NumberOfFrame assume this value "%NumberOfFrame%" so the half is echo "%forVirtualDubAddRangeWhenDoubleFrameRate%" if "%V_Width%"=="" ( echo ERROR: Video Width NOT FOUND! pause 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 goto :eof ) rem Set "V_Q=UD" rem if %V_Width% LEQ 1920 if %V_Height% LEQ 1120 \\ Set "V_Q=HD" rem if %V_Width% LEQ 1280 if %V_Height% LEQ 752 Set "V_Q=MD" if %V_Width% LEQ 1024 if %V_Height% LEQ 608 Set "V_Q=SD" echo Using %V_Q% Mode echo PAR = %V_PAR% echo Frame_Rate = %Frame_Rate% if "%TimeCode%"=="" echo Warning! no TimeCode Found! if NOT "%TimeCode%"=="" echo Timecode= %TIMECODE%
Code:echo VirtualDub.audio.SetSource^(0^);>%1 echo VirtualDub.audio.SetMode^(0^);>>%1 echo VirtualDub.audio.SetInterleave^(1,500,1,0,0^);>>%1 echo VirtualDub.audio.SetClipMode^(1,1^);>>%1 echo VirtualDub.audio.SetEditMode^(1^);>>%1 echo VirtualDub.audio.SetConversion^(0,0,0,0,0^);>>%1 echo VirtualDub.audio.SetVolume^(^);>>%1 echo VirtualDub.audio.SetCompression^(^);>>%1 echo VirtualDub.audio.EnableFilterGraph^(0^);>>%1 echo VirtualDub.video.SetInputFormat^(0^);>>%1 echo VirtualDub.video.SetOutputFormat^(11^);>>%1 echo VirtualDub.video.SetMode^(3^);>>%1 echo VirtualDub.video.SetSmartRendering^(0^);>>%1 echo VirtualDub.video.SetPreserveEmptyFrames^(0^);>>%1 echo VirtualDub.video.SetFrameRate2^(0,0,1^);>>%1 echo VirtualDub.video.SetIVTC^(0, 0, 0, 0^);>>%1 echo VirtualDub.video.SetCompression^(0x6a6d7674,0,10000,0^);>>%1 echo VirtualDub.video.SetCompData^(28,"TUpQRxgAAAAAAAAAAgAAAAgAAAACAAAAAQAAAA=="^);>>%1 echo VirtualDub.video.filters.Clear^(^);>>%1 echo VirtualDub.video.filters.Add^("alias format"^);>>%1 echo VirtualDub.video.filters.instance[0].Config^(2, 0^);>>%1 echo VirtualDub.video.filters.Add^("resize"^);>>%1 echo VirtualDub.video.filters.instance[1].Config^(720,576,0,4,3,0,320,240,4,3,0,135,1,0x000000^);>>%1 echo VirtualDub.video.filters.Add^("interlace"^);>>%1 echo VirtualDub.video.filters.instance[2].Config^(0, 0^);>>%1 echo VirtualDub.video.filters.Add^("convert format"^);>>%1 echo VirtualDub.video.filters.instance[3].Config^(32^);>>%1 echo VirtualDub.audio.filters.Clear^(^);>>%1 if "%doubleframrate%"=="1" echo VirtualDub.subset.Clear^(^);>>%1 if "%doubleframrate%"=="1" echo VirtualDub.subset.AddRange^(0,%forVirtualDubAddRangeWhenDoubleFrameRate%^);>>%1 if "%doubleframrate%"=="1" echo VirtualDub.video.SetRange^(^);>>%1 if NOT "%TimeCode%"=="" echo VirtualDub.project.ClearTextInfo^(^);>>%1 if NOT "%TimeCode%"=="" echo VirtualDub.project.AddTextInfo^("ISMP", "%TIMECODE%"^);>>%1 echo VirtualDub.SaveAVI^("%DestFolder%\\%~n1_SD.avi"^);>>%1 echo VirtualDub.Close^(^);>>%1 %VD_LOC% /min %4 /s %1 for %%v in ("%DestFolder%\\%~n1_SD.avi") do ( if %%~zv LSS 128 ( echo ERROR!!! Extra Small File Size Detected!!! pause ) ) v:\automazioneclip\virtualdub\cfourcc.exe -i "%CD%\%~n1_SD.avi" -u MJPG -d MJPG rem DEL "%DestFolder%\*.VCF" DEL "%DestFolder%\unicodefile.txt" DEL "%DestFolder%\mediainfo.txt" v:\automazioneclip\virtualdub\cfourcc.exe -i "%CD%\%~n1_SD.avi" -u MJPG -d MJPG goto :eof
Code:VirtualDub.audio.SetSource(0); VirtualDub.audio.SetMode(0); VirtualDub.audio.SetInterleave(1,500,1,0,0); VirtualDub.audio.SetClipMode(1,1); VirtualDub.audio.SetEditMode(1); VirtualDub.audio.SetConversion(0,0,0,0,0); VirtualDub.audio.SetVolume(); VirtualDub.audio.SetCompression(); VirtualDub.audio.EnableFilterGraph(0); VirtualDub.video.SetInputFormat(0); VirtualDub.video.SetOutputFormat(11); VirtualDub.video.SetMode(3); VirtualDub.video.SetSmartRendering(0); VirtualDub.video.SetPreserveEmptyFrames(0); VirtualDub.video.SetFrameRate2(0,0,1); VirtualDub.video.SetIVTC(0, 0, 0, 0); VirtualDub.video.SetCompression(0x6a6d7674,0,10000,0); VirtualDub.video.SetCompData(28,"TUpQRxgAAAAAAAAAAgAAAAgAAAACAAAAAQAAAA=="); VirtualDub.video.filters.Clear(); VirtualDub.video.filters.Add("alias format"); VirtualDub.video.filters.instance[0].Config(2, 0); VirtualDub.video.filters.Add("resize"); VirtualDub.video.filters.instance[1].Config(720,576,0,4,3,0,320,240,4,3,0,135,1,0x000000); VirtualDub.video.filters.Add("interlace"); VirtualDub.video.filters.instance[2].Config(0, 0); VirtualDub.video.filters.Add("convert format"); VirtualDub.video.filters.instance[3].Config(32); VirtualDub.audio.filters.Clear(); VirtualDub.subset.Clear(); VirtualDub.subset.AddRange(0,1491); VirtualDub.video.SetRange(); VirtualDub.project.ClearTextInfo(); VirtualDub.project.AddTextInfo("ISMP", "00:05:04:40");
-
Hm, that's a ton of code you've been posting. You're probably as confused as the rest of us. Seems to be a difficult way of doing it.
I used the C0016.XMF sample from an earlier post. Sorry to be late with this, I had some learning to do with this. HD to SD is always painful. C0016,MXF had a few problems anyway, with some of the twitter already present along with over exposure, over saturation, and over sharpening. The linked mkv below has the line twitter (aliasing) smoothed ...well, most of it, without too much damage. Processed with Avisynth. See what you think. Ciao.
C0016MXF_NDi.mkv, 25fps PAL interlaced, 720x576, 16:9 DAR, ~45MB
https://www.mediafire.com/?o8tb9m6i3df1rvn- My sister Ann's brother -
thanks, so what script of avisynth have you used?
over sharpen is guilty of the camcorderthat do this artifacts when use the 1280x720/50P. Unfortunately don't do the 1080p
If you want to see my brother at 1920x1080 25P:
https://www.dropbox.com/s/instjq4dpq4ue7t/C0018.MXF?dl=0
TMPGEnc Video Mastering Works 5 can encode in 422? -
TVMW5 encodes to standard BluRay, AVCHD, and DVD, all of which are encoded as YV12. You can encode the losssless AVI from Avisynth into whatever format and colorspace you use for broadcast, using the encoder for 4:2:2 that you use now, whatever it is. To change the colorspace of the AVI, use this if necessary:
for interlaced video:
Code:ConvertToYUY2(interlaced=true)
Code:ConvertToYUY2(interlaced=false)
Code:ffvideosource("drive:\path\to\C0016.MXF") ColorMatrix(mode="Rec.709->Rec.601") ColorYUV(off_y=-8) Tweak(coring=false,sat=0.8) Blur(0,1).Blur(0,1.5).Blur(0,1.5) Spline36Resize(720,288) ##### <- extra resize step to help repair over sharpening effects Spline36Resize(720,576) Sharpen(0.3, 0.2) AssumeTFF().SeparateFields().SelectEvery(4,0,3).Weave()
- My sister Ann's brother -
interesting but I have some question:
"Tweak" need of an .avsi?
the "(off_y=-8)" what are?
the sat=0.8 is specific only for this video of my cat or it be applyable for all?
Spline36resize is the IResize?
the ConvertYUY2(interlace=?) is intended for the format of the input or output
because the output have to be interlaced, so I think the correct convertToYUY2 is the convertToYUY2(interlaced=true) that have to be putted at the end of the script or at the beginning? or just below the ffvideosource?Last edited by marcorocchini; 1st Oct 2014 at 16:05.
-
If my files are any indication nb_frames may actually work with the MP4s, or else you could try dividing duration_ts by 1000.
If neither of those work the mp4s may be small enough for -count_frames/nb_read_frames to be an option.
-Edit- In MKVs the Duration_TS field seem to be full of useless junk.
-Edit2- OK then, if I take Duration_TS, multiply it by the frame rate then divide that number by 1000 I get a pretty good estimation of the number of frames in the stream.Last edited by ndjamena; 1st Oct 2014 at 16:31.
-
Code:
FFVideoSource("v:\test\gatto\C0016.MXF") ConvertToYUY2(interlaced=true) ColorMatrix(mode="Rec.709->Rec.601") Tweak(coring=false,sat=0.8) Blur(0,1).Blur(0,1.5).Blur(0,1.5) Spline36Resize(720,288) ##### <- extra resize step to help repair over sharpening effects Spline36Resize(720,576) Sharpen(0.3, 0.2) AssumeTFF().SeparateFields().SelectEvery(4,0,3).Weave()
only I don't know if is right the ConvertToYUY2(interlaced=true) and if have to be putted below the ffvideosource line
-
CC016.MXF is not interlaced and is already YUY2. You don't need that conversion. The code in that script executes in YUY2. And "interlaced=true" is not correct in this case. You use interlaced=true or interlaced=false depending on the current state of the video at the point in the processing chain where that conversion is made. When CC0016 is first opened, it's progressive YUY2. When the script ends, the output video is interlaced YUY2.
- My sister Ann's brother -
LMotlow can I ask you another thing?
supposing the video clip can have a framerate different, e.g. 48fps or 100 fps or 60fps if is a ntsc (but however more of 25fps) can I include a routine that adapt the framerate using motion interpolation to made output in all cases a 50i (this actual framerate)? -
It takes a while to grow accustomed to some of this.
So far, you haven't encountered some AVisynth plugins that work only in YV12, which includes many of them. Handle that when you come to it. I always try to work as much as possible in the same color space and convert only when needed. It's not always in the cards that you can do it that way, but try to avoid back-and-forth conversions when possible. Sometimes you just don't have a choice.- My sister Ann's brother -
I understand, this thing should be evaluated from time to time depending on the source because the results can be different right or wrong so it is necessary evaluate each time the results . Anyway, thank you cat ^^