View Full Version : Using MVTools with a linear access only script
FranceBB
4th September 2020, 13:17
Here's the thing: unfortunately I'm hog-tied to linear access seeking which means that I can't request frames to the indexer in a non linear fashion, but I need to use MVTools.
In this case, I kinda need to use
super = MSuper(pel=2, sharp=1)
bv1 = MAnalyse(super, isb = true, delta = 1, overlap=4)
fv1 = MAnalyse(super, isb = false, delta = 1, overlap=4)
bv2 = MAnalyse(super, isb = true, delta = 2, overlap=4)
fv2 = MAnalyse(super, isb = false, delta = 2, overlap=4)
MDegrain2(super,bv1,fv1,bv2,fv2,thSADC=200, thSAD=200)
but of course when I use it, it prompts me to a non linear access (non linear seeking). Is there a way to use MDegrain with vector calculations in a way that doesn't require non linear access? I really need it in an automated workflow which is strictly required to use linear access... :(
As always, thank you in andvance,
Frank
StainlessS
4th September 2020, 15:41
EDIT: Below intended to show where is non linear, see later posts.
AviSource("D:\parade.avi").trim(1000,-50)
Global G_PreviousFrame = -666
SSS="""
n = current_frame
RT_debugF("%d] %s",n,(n == G_PreviousFrame + 1)?"":"***",name="FranceBB: ")
Global G_PreviousFrame = n
Return Last
"""
ScriptClip(SSS)
super = MSuper(pel=2, sharp=1)
bv1 = MAnalyse(super, isb = true, delta = 1, overlap=4)
fv1 = MAnalyse(super, isb = false, delta = 1, overlap=4)
bv2 = MAnalyse(super, isb = true, delta = 2, overlap=4)
fv2 = MAnalyse(super, isb = false, delta = 2, overlap=4)
MDegrain2(super,bv1,fv1,bv2,fv2,thSADC=200, thSAD=200)
#Prefetch(4)
Return Last
No prefetch
00001458 15:38:00 [3632] FranceBB: 0] ***
00001459 15:38:00 [3632] FranceBB: 1]
00001460 15:38:00 [3632] FranceBB: 0] ***
00001461 15:38:00 [3632] FranceBB: 2] ***
00001462 15:38:00 [3632] FranceBB: 0] ***
00001463 15:38:00 [3632] FranceBB: 1]
00001464 15:38:00 [3632] FranceBB: 3] ***
00001465 15:38:00 [3632] FranceBB: 4]
00001466 15:38:00 [3632] FranceBB: 2] ***
00001467 15:38:00 [3632] FranceBB: 0] ***
00001468 15:38:01 [3632] FranceBB: 5] ***
00001469 15:38:01 [3632] FranceBB: 6]
00001470 15:38:01 [3632] FranceBB: 7]
00001471 15:38:01 [3632] FranceBB: 8]
00001472 15:38:01 [3632] FranceBB: 9]
00001473 15:38:01 [3632] FranceBB: 10]
00001474 15:38:01 [3632] FranceBB: 11]
00001475 15:38:01 [3632] FranceBB: 12]
00001476 15:38:01 [3632] FranceBB: 13]
00001477 15:38:01 [3632] FranceBB: 14]
00001478 15:38:01 [3632] FranceBB: 15]
00001479 15:38:01 [3632] FranceBB: 16]
00001480 15:38:01 [3632] FranceBB: 17]
00001481 15:38:02 [3632] FranceBB: 18]
00001482 15:38:02 [3632] FranceBB: 19]
00001483 15:38:02 [3632] FranceBB: 20]
00001484 15:38:02 [3632] FranceBB: 21]
00001485 15:38:02 [3632] FranceBB: 22]
00001486 15:38:02 [3632] FranceBB: 23]
00001487 15:38:02 [3632] FranceBB: 24]
00001488 15:38:02 [3632] FranceBB: 25]
00001489 15:38:02 [3632] FranceBB: 26]
00001490 15:38:02 [3632] FranceBB: 27]
00001491 15:38:02 [3632] FranceBB: 28]
00001492 15:38:02 [3632] FranceBB: 29]
00001493 15:38:02 [3632] FranceBB: 30]
00001494 15:38:03 [3632] FranceBB: 31]
00001495 15:38:03 [3632] FranceBB: 32]
00001496 15:38:03 [3632] FranceBB: 33]
00001497 15:38:03 [3632] FranceBB: 34]
00001498 15:38:03 [3632] FranceBB: 35]
00001499 15:38:03 [3632] FranceBB: 36]
00001500 15:38:03 [3632] FranceBB: 37]
00001501 15:38:03 [3632] FranceBB: 38]
00001502 15:38:03 [3632] FranceBB: 39]
00001503 15:38:03 [3632] FranceBB: 40]
00001504 15:38:03 [3632] FranceBB: 41]
00001505 15:38:03 [3632] FranceBB: 42]
00001506 15:38:03 [3632] FranceBB: 43]
00001507 15:38:04 [3632] FranceBB: 44]
00001508 15:38:04 [3632] FranceBB: 45]
00001509 15:38:04 [3632] FranceBB: 46]
00001510 15:38:04 [3632] FranceBB: 47]
00001511 15:38:04 [3632] FranceBB: 48]
00001512 15:38:04 [3632] FranceBB: 49]
Prefetch(4)
00001613 15:39:15 [4980] FranceBB: 4] ***
00001614 15:39:15 [4980] FranceBB: 2] ***
00001615 15:39:15 [4980] FranceBB: 1] ***
00001616 15:39:15 [4980] FranceBB: 3] ***
00001617 15:39:15 [4980] FranceBB: 0] ***
00001618 15:39:15 [4980] FranceBB: 2] ***
00001619 15:39:15 [4980] FranceBB: 0] ***
00001620 15:39:15 [4980] FranceBB: 1]
00001621 15:39:15 [4980] FranceBB: 4] ***
00001622 15:39:15 [4980] FranceBB: 2] ***
00001623 15:39:15 [4980] FranceBB: 3]
00001624 15:39:15 [4980] FranceBB: 5] ***
00001625 15:39:15 [4980] FranceBB: 6]
00001626 15:39:15 [4980] FranceBB: 7]
00001627 15:39:15 [4980] FranceBB: 8]
00001628 15:39:16 [4980] FranceBB: 9]
00001629 15:39:16 [4980] FranceBB: 10]
00001630 15:39:16 [4980] FranceBB: 11]
00001631 15:39:16 [4980] FranceBB: 12]
00001632 15:39:16 [4980] FranceBB: 13]
00001633 15:39:16 [4980] FranceBB: 14]
00001634 15:39:16 [4980] FranceBB: 15]
00001635 15:39:16 [4980] FranceBB: 16]
00001636 15:39:16 [4980] FranceBB: 17]
00001637 15:39:16 [4980] FranceBB: 18]
00001638 15:39:16 [4980] FranceBB: 19]
00001639 15:39:16 [4980] FranceBB: 20]
00001640 15:39:16 [4980] FranceBB: 21]
00001641 15:39:16 [4980] FranceBB: 22]
00001642 15:39:16 [4980] FranceBB: 23]
00001643 15:39:16 [4980] FranceBB: 24]
00001644 15:39:16 [4980] FranceBB: 25]
00001645 15:39:16 [4980] FranceBB: 26]
00001646 15:39:16 [4980] FranceBB: 27]
00001647 15:39:16 [4980] FranceBB: 28]
00001648 15:39:16 [4980] FranceBB: 29]
00001649 15:39:16 [4980] FranceBB: 30]
00001650 15:39:16 [4980] FranceBB: 31]
00001651 15:39:16 [4980] FranceBB: 32]
00001652 15:39:16 [4980] FranceBB: 33]
00001653 15:39:17 [4980] FranceBB: 34]
00001654 15:39:17 [4980] FranceBB: 35]
00001655 15:39:17 [4980] FranceBB: 36]
00001656 15:39:17 [4980] FranceBB: 37]
00001657 15:39:17 [4980] FranceBB: 38]
00001658 15:39:17 [4980] FranceBB: 39]
00001659 15:39:17 [4980] FranceBB: 40]
00001660 15:39:17 [4980] FranceBB: 41]
00001661 15:39:17 [4980] FranceBB: 42]
00001662 15:39:17 [4980] FranceBB: 43]
00001663 15:39:17 [4980] FranceBB: 44]
00001664 15:39:17 [4980] FranceBB: 45]
00001665 15:39:17 [4980] FranceBB: 46]
00001666 15:39:17 [4980] FranceBB: 47]
00001667 15:39:17 [4980] FranceBB: 48]
00001668 15:39:17 [4980] FranceBB: 49]
You could also look at RequestLinear() [cant remember where it resides].
EDIT: TIVTC:- http://avisynth.nl/index.php/TIVTC
StainlessS
4th September 2020, 16:23
This
AviSource("D:\parade.avi").trim(1000,-50)
Global G_PreviousFrame = -666
SSS="""
n = current_frame
RT_debugF("%d] %s",n,(n == G_PreviousFrame + 1)?"":"***",name="FranceBB: ")
Global G_PreviousFrame = n
Return Last
"""
ScriptClip(SSS,after_frame=true)
RequestLinear()
super = MSuper(pel=2, sharp=1)
bv1 = MAnalyse(super, isb = true, delta = 1, overlap=4)
fv1 = MAnalyse(super, isb = false, delta = 1, overlap=4)
bv2 = MAnalyse(super, isb = true, delta = 2, overlap=4)
fv2 = MAnalyse(super, isb = false, delta = 2, overlap=4)
MDegrain2(super,bv1,fv1,bv2,fv2,thSADC=200, thSAD=200)
#Prefetch(4)
Return Last
Produces
00006491 16:20:20 [1124] FranceBB: 0] *** # This is OK, is not frame after -666, ignore it
00006492 16:20:20 [1124] FranceBB: 1]
00006493 16:20:20 [1124] FranceBB: 2]
00006494 16:20:21 [1124] FranceBB: 3]
00006495 16:20:21 [1124] FranceBB: 4]
00006496 16:20:21 [1124] FranceBB: 5]
00006497 16:20:21 [1124] FranceBB: 6]
00006498 16:20:21 [1124] FranceBB: 7]
00006499 16:20:21 [1124] FranceBB: 8]
00006500 16:20:21 [1124] FranceBB: 9]
00006501 16:20:21 [1124] FranceBB: 10]
00006502 16:20:22 [1124] FranceBB: 11]
00006503 16:20:22 [1124] FranceBB: 12]
00006504 16:20:22 [1124] FranceBB: 13]
00006505 16:20:22 [1124] FranceBB: 14]
00006506 16:20:22 [1124] FranceBB: 15]
00006507 16:20:22 [1124] FranceBB: 16]
00006508 16:20:22 [1124] FranceBB: 17]
00006509 16:20:22 [1124] FranceBB: 18]
00006510 16:20:22 [1124] FranceBB: 19]
00006511 16:20:22 [1124] FranceBB: 20]
00006512 16:20:22 [1124] FranceBB: 21]
00006513 16:20:22 [1124] FranceBB: 22]
00006514 16:20:22 [1124] FranceBB: 23]
00006515 16:20:23 [1124] FranceBB: 24]
00006516 16:20:23 [1124] FranceBB: 25]
00006517 16:20:23 [1124] FranceBB: 26]
00006518 16:20:23 [1124] FranceBB: 27]
00006519 16:20:23 [1124] FranceBB: 28]
00006520 16:20:23 [1124] FranceBB: 29]
00006521 16:20:23 [1124] FranceBB: 30]
00006522 16:20:23 [1124] FranceBB: 31]
00006523 16:20:23 [1124] FranceBB: 32]
00006524 16:20:23 [1124] FranceBB: 33]
00006525 16:20:23 [1124] FranceBB: 34]
00006526 16:20:23 [1124] FranceBB: 35]
00006527 16:20:23 [1124] FranceBB: 36]
00006528 16:20:24 [1124] FranceBB: 37]
00006529 16:20:24 [1124] FranceBB: 38]
00006530 16:20:24 [1124] FranceBB: 39]
00006531 16:20:24 [1124] FranceBB: 40]
00006532 16:20:24 [1124] FranceBB: 41]
00006533 16:20:24 [1124] FranceBB: 42]
00006534 16:20:24 [1124] FranceBB: 43]
00006535 16:20:24 [1124] FranceBB: 44]
00006536 16:20:24 [1124] FranceBB: 45]
00006537 16:20:24 [1124] FranceBB: 46]
00006538 16:20:24 [1124] FranceBB: 47]
00006539 16:20:24 [1124] FranceBB: 48]
00006540 16:20:24 [1124] FranceBB: 49]
However, if you uncomment Prefetch(4),
it puts up an error message on frame, that RT_DebugF has an unexpected data arg 3,
it interprets the Name="FranceBB: " as a data arg to RT_DebugF, instead of a named optional argument, named "name", [ie name="FranceBB: "]
I tried with v3.5.1 and v3.6.2 test 1, both same, I think is Avs+ problem.
StainlessS
4th September 2020, 16:32
This
AviSource("D:\parade.avi").trim(1000,-50)
Global G_PreviousFrame = -1
SSS="""
n = current_frame
# RT_debugF("%d] %s",n,(n == G_PreviousFrame + 1)?"":"***",name="FramceBB: ") # BUG at name="FramceBB: " when Prefetch(4)
RT_debugF("%d] %s",n,(n == G_PreviousFrame + 1)?"":"***")
Global G_PreviousFrame = n
Return Last
"""
ScriptClip(SSS)
RequestLinear()
super = MSuper(pel=2, sharp=1)
bv1 = MAnalyse(super, isb = true, delta = 1, overlap=4)
fv1 = MAnalyse(super, isb = false, delta = 1, overlap=4)
bv2 = MAnalyse(super, isb = true, delta = 2, overlap=4)
fv2 = MAnalyse(super, isb = false, delta = 2, overlap=4)
MDegrain2(super,bv1,fv1,bv2,fv2,thSADC=200, thSAD=200)
#Prefetch(4)
Return Last
Produces this and no error, however looks like AVS+ does indeed have a problem somewhere (where optional named arg and Prefetch, EDIT: where named arg follows data arg array)
00000419 16:30:17 [2412] RT_DebugF: 0]
00000420 16:30:17 [2412] RT_DebugF: 1]
00000421 16:30:17 [2412] RT_DebugF: 2]
00000422 16:30:17 [2412] RT_DebugF: 3]
00000423 16:30:17 [2412] RT_DebugF: 4]
00000424 16:30:18 [2412] RT_DebugF: 5]
00000425 16:30:18 [2412] RT_DebugF: 6]
00000426 16:30:18 [2412] RT_DebugF: 7]
00000427 16:30:18 [2412] RT_DebugF: 8]
00000428 16:30:18 [2412] RT_DebugF: 9]
00000429 16:30:18 [2412] RT_DebugF: 10]
00000430 16:30:18 [2412] RT_DebugF: 11]
00000431 16:30:18 [2412] RT_DebugF: 12]
00000432 16:30:18 [2412] RT_DebugF: 13]
00000433 16:30:18 [2412] RT_DebugF: 14]
00000434 16:30:18 [2412] RT_DebugF: 15]
00000435 16:30:18 [2412] RT_DebugF: 16]
00000436 16:30:18 [2412] RT_DebugF: 17]
00000437 16:30:18 [2412] RT_DebugF: 18]
00000438 16:30:18 [2412] RT_DebugF: 19]
00000439 16:30:18 [2412] RT_DebugF: 20]
00000440 16:30:18 [2412] RT_DebugF: 21]
00000441 16:30:18 [2412] RT_DebugF: 22]
00000442 16:30:18 [2412] RT_DebugF: 23]
00000443 16:30:18 [2412] RT_DebugF: 24]
00000444 16:30:18 [2412] RT_DebugF: 25]
00000445 16:30:18 [2412] RT_DebugF: 26]
00000446 16:30:19 [2412] RT_DebugF: 27]
00000447 16:30:19 [2412] RT_DebugF: 28]
00000448 16:30:19 [2412] RT_DebugF: 29]
00000449 16:30:19 [2412] RT_DebugF: 30]
00000450 16:30:19 [2412] RT_DebugF: 31]
00000451 16:30:19 [2412] RT_DebugF: 32]
00000452 16:30:19 [2412] RT_DebugF: 33]
00000453 16:30:19 [2412] RT_DebugF: 34]
00000454 16:30:19 [2412] RT_DebugF: 35]
00000455 16:30:19 [2412] RT_DebugF: 36]
00000456 16:30:19 [2412] RT_DebugF: 37]
00000457 16:30:19 [2412] RT_DebugF: 38]
00000458 16:30:19 [2412] RT_DebugF: 39]
00000459 16:30:19 [2412] RT_DebugF: 40]
00000460 16:30:19 [2412] RT_DebugF: 41]
00000461 16:30:19 [2412] RT_DebugF: 42]
00000462 16:30:19 [2412] RT_DebugF: 43]
00000463 16:30:19 [2412] RT_DebugF: 44]
00000464 16:30:19 [2412] RT_DebugF: 45]
00000465 16:30:19 [2412] RT_DebugF: 46]
00000466 16:30:19 [2412] RT_DebugF: 47]
00000467 16:30:19 [2412] RT_DebugF: 48]
00000468 16:30:19 [2412] RT_DebugF: 49]
EDIT: Maybe RequestLinear() also plays a part in the problem, as it worked OK prior to adding it to the script.
EDIT: No it was a problem before Request Linear, dont know how I got Prefetch(4) debug output, it should have broken it.
StainlessS
4th September 2020, 17:41
Above posted problem with AVS+ v3.6.2, disappears with v3.6.2 test 2
did you tried with test 2 ? https://drive.google.com/file/d/1h-CyjQPEvmj6ZZgYbYUY1pgrp8eovr9w/view
so this should work ok with/without Prefetch() [and with/without the Scriptclip part which just verifies linearity]
AviSource("D:\parade.avi").trim(1000,-50)
/*
Global G_PreviousFrame = -1
SSS="""
n = current_frame
# RT_debugF("%d] %s",n,(n == G_PreviousFrame + 1)?"":"***",name="FramceBB: ") # BUG at name="FramceBB: " when Prefetch(4)
RT_debugF("%d] %s",n,(n == G_PreviousFrame + 1)?"":"***")
Global G_PreviousFrame = n
Return Last
"""
ScriptClip(SSS)
*/
RequestLinear()
super = MSuper(pel=2, sharp=1)
bv1 = MAnalyse(super, isb = true, delta = 1, overlap=4)
fv1 = MAnalyse(super, isb = false, delta = 1, overlap=4)
bv2 = MAnalyse(super, isb = true, delta = 2, overlap=4)
fv2 = MAnalyse(super, isb = false, delta = 2, overlap=4)
MDegrain2(super,bv1,fv1,bv2,fv2,thSADC=200, thSAD=200)
#Prefetch(4)
Return Last
feisty2
4th September 2020, 18:03
decoding your input to an uncompressed bitstream and read the bitstream using rawsource
StainlessS
4th September 2020, 18:15
RawSourcePlus stuff:- http://avisynth.nl/index.php/RawSource26
FranceBB
4th September 2020, 18:18
Thank you, StainlessS, I'm trying right now and it seems to be working. ;)
@feisty2 well as long as it works with RequestLinear() and I don't have to make an uncompressed stream I'm gonna be fine. ;)
StainlessS
4th September 2020, 18:31
FBB,
how did you make rawsource fle, I tried this, shows codec not supported
REM https://forum.doom9.org/showthread.php?p=1908619#post1908619
REM We DO NOT LIKE SPACES IN FILE NAMES (REM == REMark ie comment)
REM We DO NOT LIKE ACCENTS IN FILE NAMES.
setlocal
REM Where to Find ffmpeg
set FFMPEG="C:\BIN\ffmpeg.exe"
REM Where to get INPUT files, No terminating Backslash, "." = current directory (ie same as dir .bat file)
set INDIR="."
REM Where to place OUTPUT files, No terminating Backslash. "." would be same as .bat file, ".\OUT" = OUT folder in same directory as bat file.
set OUTDIR="D:"
REM Below, can add INPUT extensions as eg *.WEBM (SPACE separated, Batch Processes all INPUT type files in INDIR)
FOR %%A IN (*.AVI *.MKV *.MP4 *.MOV *.QT *.3GP *.DVB *.VOB *.MPG *.MPEG *M2P *.PS *.TS *.DIVX *.XVID *.FLV *.WMV *.ASF *.MXF) DO (
REM ****** Un-REM [ie SELECT] ONLY one of below lines, Comment out ie REM the remaining lines.
REM %FFMPEG% -i "%INDIR%\%%A" -vcodec utvideo -acodec pcm_s16le "%OUTDIR%\%%~nxA.AVI"
REM %FFMPEG% -i "%INDIR%\%%A" -vcodec huffyuv -acodec pcm_s16le "%OUTDIR%\%%~nxA.AVI"
REM %FFMPEG% -i "%INDIR%\%%A" -vcodec magicyuv -acodec pcm_s16le "%OUTDIR%\%%~nxA.AVI"
REM %FFMPEG% -i "%INDIR%\%%A" -vcodec v410 -acodec pcm_s16le "%OUTDIR%\%%~nxA.AVI"
REM %FFMPEG% -i "%INDIR%\%%A" -vcodec r210 -acodec pcm_s16le "%OUTDIR%\%%~nxA.AVI"
REM %FFMPEG% -i "%INDIR%\%%A" -vcodec copy -acodec copy -sn "%OUTDIR%\%%~nxA.MKV"
REM %FFMPEG% -i "%INDIR%\%%A" -vcodec utvideo -acodec copy "%OUTDIR%\%%~nxA.MKV"
REM %FFMPEG% -i "%INDIR%\%%A" -vn -acodec pcm_s16le "%OUTDIR%\%%~nxA.WAV"
%FFMPEG% -i "%INDIR%\%%A" -vcodec rawvideo -f rawvideo -an "%OUTDIR%\%%~nxA.rawvideo"
REM *****************************************************************************************.
)
Pause
REM ... Above Command lines, What they do if UnREM'ed (and all others REM'ed, UnREM=UnCOMMENT ) :
REM (1) Convert Video to UtVideo lossless, Convert Audio to 16 bit PCM audio (output AVI).
REM (2) Convert Video to HuffYUV lossless, Convert Audio to 16 bit PCM audio (output AVI).
REM (3) Convert Video to MagicYUV lossless, Convert Audio to 16 bit PCM audio (output AVI).
REM (4) Convert Video to v410 Uncompressed 4:4:4 10-bit lossless, Convert Audio to 16 bit PCM audio (output AVI).
REM (5) Convert Video to r210 Uncompressed RGB 10-bit lossless, Convert Audio to 16 bit PCM audio (output AVI).
REM (6) Remux NO SUBTITLES, copy both video and audio but NOT subtitles(output MKV - see file extension at the end of the Remux line, ie MKV).
REM (7) Convert Video to UtVideo lossless, copy audio (output MKV).
REM (8) Skip any video, Convert Audio to 16 bit PCM (output WAV).
REM (9) Convert Video to rawvideo uncompressed, Convert Audio to 16 bit PCM audio (output rawvideo).
REM *****************************************************************************************.
REM In the UnREM'ed command Line [ie without a preceding REM]:-
REM '-vcodec utvideo' means convert video using utvideo codec.
REM '-vcodec copy' means copy video rather than convert.
REM '-vn' means no video output, use instead of eg '-vcodec utvideo'
REM '-acodec pcm_s16le' means convert audio using pcm_s16le codec.
REM '-acodec copy' means copy audio rather than convert.
REM '-an' means no audio output, use instead of eg '-acodec pcm_s16le'
REM The file extension at end of the line determines output container, eg '.AVI'
REM
REM From Command line with ffmpeg somewhere in your environment PATH:-
REM 'ffmpeg -codecs >D:\ffmpeg_codecs.txt'
REM Writes a txt file of ffmpeg available codecs to D:\
REM At start of txt file it shows a 'legend' or 'key' for codecs that can be used for video and audio,
REM use only ENCODING SUPPORTED codecs, prefereably LOSSLESS.
REM Supported codecs will vary with ffmpeg version.
REM *****************************************************************************************.
EDIT: Above, added in blue, now it works, well dont gove error.
Needs some additonal parameters, if you can fit them in to batch file then could be automatic.
https://i.postimg.cc/hvbKgfsB/Untitled-00.jpg (https://postimages.org/)
EDIT: Also, is rawvideo, video only ie no audio ? [presumably yes]
EDIT: Change to below, same.
%FFMPEG% -i "%INDIR%\%%A" -vcodec rawvideo -an "%OUTDIR%\%%~nxA.rawvideo"
EDIT: Seems need something like this, so I guess non automatic
-pix_fmt rgb24 -vtag 0x20776172
EDIT: Added -f rawvideo to above batch file, seems to work [at least no error].
https://i.postimg.cc/5txLMCmx/Untitled-01.jpg (https://postimages.org/)
StainlessS
4th September 2020, 19:10
Using above posted demo batch file [with added -f rawvideo],
outputs the y4m, [EDIT: Changed y4m to 'rawvideo']
and this output the video ok, can omit pixel_type, just needs both width and height [even guesses 25 FPS ok somehow].
RawSourcePlus(".\big_buck_bunny_720p_h264.mov.rawvideo",width=1280,height=720) # EDIT: Changed extension to rawvideo
return last.info
https://i.postimg.cc/y3sbL1t4/FBB-00.jpg (https://postimg.cc/y3sbL1t4)
EDIT: Demo cmd may not work proper if non YV12 source, probably defaults to YV12 source.
RawSourcePlus() default is 25.0 FPS, so that explains correct fps, but default pixel_type is supposed to be "YUY2", but guesses "YV12" correctly.
EDIT: Apparenlty y4m format has a rudimentary header so is not raw, changed cmd file output extension to rawvideo.
%FFMPEG% -i "%INDIR%\%%A" -vcodec rawvideo -f rawvideo -s 1280x720 -an "%OUTDIR%\%%~nxA.rawvideo"
EDIT: Clip_to_RawVideo_Plus_WAV.cmd
REM Clip_to_RawVideo_Plus_WAV.cmd
REM We DO NOT LIKE SPACES IN FILE NAMES (REM == REMark ie comment)
REM We DO NOT LIKE ACCENTS IN FILE NAMES.
setlocal
REM Where to Find ffmpeg
set FFMPEG="C:\BIN\ffmpeg.exe"
REM Where to get INPUT files, No terminating Backslash, "." = current directory (ie same as dir .bat file)
set INDIR="."
REM Where to place OUTPUT files, No terminating Backslash. "." would be same as .bat file, ".\OUT" = OUT folder in same directory as bat file.
set OUTDIR="D:"
REM Below, can add INPUT extensions as eg *.WEBM (SPACE separated, Batch Processes all INPUT type files in INDIR)
FOR %%A IN (*.AVI *.MKV *.MP4 *.MOV *.QT *.3GP *.DVB *.VOB *.MPG *.MPEG *M2P *.PS *.TS *.DIVX *.XVID *.FLV *.WMV *.ASF *.MXF) DO (
%FFMPEG% -i "%INDIR%\%%A" -vcodec rawvideo -f rawvideo -an "%OUTDIR%\%%~nxA.rawvideo"
%FFMPEG% -i "%INDIR%\%%A" -vn -acodec pcm_s16le "%OUTDIR%\%%~nxA.WAV"
)
Pause
FBB.avs with audio
FN=".\big_buck_bunny_720p_h264.mov"
RawSourcePlus(FN+".rawvideo",width=1280,height=720)
A=WavSource(FN+".wav")
AudioDubEx(a)
return last.info
https://i.postimg.cc/4mb9CJ02/FBB-01.jpg (https://postimg.cc/4mb9CJ02)
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.