dbremner / blurip

Automatically exported from code.google.com/p/blurip
0 stars 0 forks source link

Enhancement: Avisynth Templates #19

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
The avisynth filters are great, but on a hexcore AMD I would like the ability 
to select a script like:

SetMTmode(5,6)
DGSource("_002_video.dgi", crop_t= **T**, crop_b= **B**, crop_l= **L**, crop_r= 
**R**, resize_w= **W**, resize_h= **H**)
changefps(last,last,true)
setmtmode(2)
MCTemporalDenoise(settings="low", strength=200)

Where Blurip fills in **T**, **B**, **L**, **R**, **W** & **H** from autocrop & 
resize calculation (these values are dynamically generated for _encode.AVS, so 
shouldn't be too hard to "dump" into a "template" script) ...

This results in ~ 5 FPS, whereas the Blurip method of just adding the 
"MCTemporalDenoise" to the end of a "single threaded" avisynth script is often 
under 1 FPS ...

Am happy to help with a selection of "generic" templates, etc ...

As a suggestion, a simple method of parsing the selected "Avisynth Template", 
replace all occurences of **B** with "crop bottom" number, **T** with crop top, 
**W** with calculated width integer, etc and use the "template" to write out 
the _encode.AVS file ...

Would help imensely!

Thanks,
7

Original issue reported on code.google.com by 7ek...@gmail.com on 8 Feb 2011 at 1:37

GoogleCodeExporter commented 8 years ago
I'll think about this. Shoudn't be to hard to implement..

Original comment by hawk...@gmx.net on 11 Feb 2011 at 8:08

GoogleCodeExporter commented 8 years ago

Original comment by hawk...@gmx.net on 11 Feb 2011 at 8:09

GoogleCodeExporter commented 8 years ago
Issue 20 has been merged into this issue.

Original comment by hawk...@gmx.net on 11 Feb 2011 at 8:10

GoogleCodeExporter commented 8 years ago
+1 for that, because more flexible avs scripts would also allow to use options 
like f.e. SetMemoryMax().

When experimenting with that option I realized, that it is not possible to add 
SetMemoryMax() to an AviSynth profile in BluRip. As these entries are always 
appended (!) to the end of the avs script generated by blurip, x264 fails to 
encode the video, because the SetMemoryMax() option has to be given at the 
beginning of the script.

NON-working example:

The following avs script is generated by BluRip when adding SetMemoryMax(128) 
to an AviSynth profile:

  LoadPlugin("C:\Programme\ffmpegsource\ffms2.dll")
  FFVideoSource("D:\temp\blurip\_002_video.mkv")
  Crop(0,0,-0,-136)
  SetMemoryMax(128)

When starting to encode, x264 throws an error in CompleteLog.txt and exits:

  [...]
  [17.02.2011 13:11:15] avs [error]: `D:\temp\blurip\_encode.avs' didn't return a video clip
  [17.02.2011 13:11:15] x264 [error]: could not open input file `D:\temp\blurip\_encode.avs'
  [17.02.2011 13:11:15] Return code: -1[17.02.2011 13:11:15] Done.

When moving the SetMemoryMax(128) option to the top of _encode.avs ...

  SetMemoryMax(128)
  LoadPlugin("C:\Programme\ffmpegsource\ffms2.dll")
  FFVideoSource("D:\temp\blurip\_002_video.mkv")
  Crop(0,0,-0,-136)

...and running x264 manually from command line, encoding runs fine:

  C:\Programme\x264\x264.exe --profile high --preset slow --tune film --level 4.1 --crf 20.00 --ref 4 --no-fast-pskip  "D:\temp\blurip\_encode.avs" -o "D:\temp\blurip\_video.mkv"
  avs [info]: 1920x944p 0:0 @ 24000/1001 fps (cfr)
  x264 [info]: using cpu capabilities: MMX2 SSE2Slow SlowCTZ
  x264 [info]: profile High, level 4.1
  [2.6%] 4786/185208 frames, 2.03 fps, 6354.35 kb/s, eta 24:39:02
  [...]

Original comment by derandiu...@googlemail.com on 17 Feb 2011 at 1:47