<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title><![CDATA[Fanrestore - Fan Restoration Forum - Script snippets]]></title>
		<link>https://fanrestore.com/</link>
		<description><![CDATA[Fanrestore - Fan Restoration Forum - https://fanrestore.com]]></description>
		<pubDate>Fri, 24 Apr 2026 15:54:54 +0000</pubDate>
		<generator>MyBB</generator>
		<item>
			<title><![CDATA[Script to make MKVs importable in Premiere]]></title>
			<link>https://fanrestore.com/thread-4115.html</link>
			<pubDate>Wed, 18 Aug 2021 13:28:02 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://fanrestore.com/member.php?action=profile&uid=0">deleted user</a>]]></dc:creator>
			<guid isPermaLink="false">https://fanrestore.com/thread-4115.html</guid>
			<description><![CDATA[Okay, it's a bit of a clickbait. The script actually just converts mkvs to mp4. However, it solves a problem that has always personally plagued me: Audio. How do you manage to end up with audio inside Premiere that doesn't require lossy compression? Convert to wav and import separately? Good luck with 24 bit 5.1 audio that will break the 4 GB limit on WAV files. Use W64 instead? Premiere won't import it. So, split the audio to individual sub-4GB wav files.<br />
<br />
It's annoying as heck...<br />
<br />
What if we could just have the normal audio losslessly inside the mp4 to begin with?<br />
<br />
That's what this script does.<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>for %%f in (*.mkv) do (<br />
    <br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
<br />
if exist "%%~nf.mp4" (<br />
echo %%~nf<br />
echo "already exists"<br />
) else (<br />
rem ffmpeg -i "%%~nf.mkv" -vcodec copy -acodec alc "%%~nf.mp4"<br />
ffmpeg -drc_scale 0.000000 -i "%%~nf.mkv" -vn -acodec pcm_f32be "%%~nf.af4354b456nbtysdge3r5.caf"<br />
mp4box -add "%%~nf.mkv#video" -add "%%~nf.af4354b456nbtysdge3r5.caf#audio" -new "%%~nf.mp4"<br />
del "%%~nf.af4354b456nbtysdge3r5.caf"<br />
)<br />
<br />
rem process_in "%%~nf.mkv"<br />
rem process_out "%%~nf.out"<br />
)<br />
pause</code></div></div><br />
Save this in a .bat file and you need to have ffmpeg and mp4box in the PATH.<br />
<br />
It will find every .mkv file in the current folder, see if an identically named file with the .mp4 extension exists, and if it doesn't, it will get to work creating it. It will first convert the audio to a 32 bit floating point .caf file. Then it will use mp4box to package that along with the original video into an .mp4.<br />
<br />
The resulting file will be (sometimes much) bigger than the original mkv because the audio is now 32 bit lossless. But: It works. And it's lossless.<br />
<br />
Why CAF? Why 32 bit float? Why not directly write the PCM using ffmpeg? Why mp4 and not just .m2ts or something? Well, I tried a couple combinations and this is the only one I found that both works with mp4box, that doesn't lose quality on 24 bit audio, that works for resulting audio sizes over 4 GB and that is recognized and actually works in Premiere. Iirc 16 bit worked too, but 24 bit did not. Therefore 32 bit it is. CAF because it's the &gt;4GB version of AIFF, and AIFF works whereas WAV doesn't because mp4 requires big-endian audio apparently and WAV doesn't support that and if you do feed little-endian WAV into mp4box, it will mux it, but it will still think it's big-endian and you'll just get static. And you can't write PCM directly to mp4 using ffmpeg because ffmpeg refuses to do that because it's not *officially* supported. And mp4 as the choice for the final output because Premiere seems to most reliably seek frames in mp4 files, whereas it will open .ts/.m2ts containers but often end up showing artifacts or the wrong frame.<br />
<br />
Hope this will come in handy for someone.]]></description>
			<content:encoded><![CDATA[Okay, it's a bit of a clickbait. The script actually just converts mkvs to mp4. However, it solves a problem that has always personally plagued me: Audio. How do you manage to end up with audio inside Premiere that doesn't require lossy compression? Convert to wav and import separately? Good luck with 24 bit 5.1 audio that will break the 4 GB limit on WAV files. Use W64 instead? Premiere won't import it. So, split the audio to individual sub-4GB wav files.<br />
<br />
It's annoying as heck...<br />
<br />
What if we could just have the normal audio losslessly inside the mp4 to begin with?<br />
<br />
That's what this script does.<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>for %%f in (*.mkv) do (<br />
    <br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
<br />
if exist "%%~nf.mp4" (<br />
echo %%~nf<br />
echo "already exists"<br />
) else (<br />
rem ffmpeg -i "%%~nf.mkv" -vcodec copy -acodec alc "%%~nf.mp4"<br />
ffmpeg -drc_scale 0.000000 -i "%%~nf.mkv" -vn -acodec pcm_f32be "%%~nf.af4354b456nbtysdge3r5.caf"<br />
mp4box -add "%%~nf.mkv#video" -add "%%~nf.af4354b456nbtysdge3r5.caf#audio" -new "%%~nf.mp4"<br />
del "%%~nf.af4354b456nbtysdge3r5.caf"<br />
)<br />
<br />
rem process_in "%%~nf.mkv"<br />
rem process_out "%%~nf.out"<br />
)<br />
pause</code></div></div><br />
Save this in a .bat file and you need to have ffmpeg and mp4box in the PATH.<br />
<br />
It will find every .mkv file in the current folder, see if an identically named file with the .mp4 extension exists, and if it doesn't, it will get to work creating it. It will first convert the audio to a 32 bit floating point .caf file. Then it will use mp4box to package that along with the original video into an .mp4.<br />
<br />
The resulting file will be (sometimes much) bigger than the original mkv because the audio is now 32 bit lossless. But: It works. And it's lossless.<br />
<br />
Why CAF? Why 32 bit float? Why not directly write the PCM using ffmpeg? Why mp4 and not just .m2ts or something? Well, I tried a couple combinations and this is the only one I found that both works with mp4box, that doesn't lose quality on 24 bit audio, that works for resulting audio sizes over 4 GB and that is recognized and actually works in Premiere. Iirc 16 bit worked too, but 24 bit did not. Therefore 32 bit it is. CAF because it's the &gt;4GB version of AIFF, and AIFF works whereas WAV doesn't because mp4 requires big-endian audio apparently and WAV doesn't support that and if you do feed little-endian WAV into mp4box, it will mux it, but it will still think it's big-endian and you'll just get static. And you can't write PCM directly to mp4 using ffmpeg because ffmpeg refuses to do that because it's not *officially* supported. And mp4 as the choice for the final output because Premiere seems to most reliably seek frames in mp4 files, whereas it will open .ts/.m2ts containers but often end up showing artifacts or the wrong frame.<br />
<br />
Hope this will come in handy for someone.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[anaglyph 3D to left/right or top/bottom]]></title>
			<link>https://fanrestore.com/thread-3519.html</link>
			<pubDate>Wed, 14 Oct 2020 18:46:43 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://fanrestore.com/member.php?action=profile&uid=1">spoRv</a>]]></dc:creator>
			<guid isPermaLink="false">https://fanrestore.com/thread-3519.html</guid>
			<description><![CDATA[I was curious to know if there was a way to convert anaglyph 3D to left/right or top/bottom - after that, converting to MVC should be easy, I guess... <img src="https://fanrestore.com/images/smilies/wink.png" alt="Wink" title="Wink" class="smilie smilie_2" /><br />
<br />
Found an avisynth script here:<br />
<a href="https://vrtifacts.com/dump-those-silly-colored-3d-glassess" target="_blank" rel="noopener" class="mycode_url">https://vrtifacts.com/dump-those-silly-c...d-glassess</a><br />
<br />
If someone have already used - or will use it in the future - I'd like to watch some samples!<br />
<br />
P.S. the script deals only with red/cyan and green/magenta anaglyphs, so it would be nice to add amber/blue version!]]></description>
			<content:encoded><![CDATA[I was curious to know if there was a way to convert anaglyph 3D to left/right or top/bottom - after that, converting to MVC should be easy, I guess... <img src="https://fanrestore.com/images/smilies/wink.png" alt="Wink" title="Wink" class="smilie smilie_2" /><br />
<br />
Found an avisynth script here:<br />
<a href="https://vrtifacts.com/dump-those-silly-colored-3d-glassess" target="_blank" rel="noopener" class="mycode_url">https://vrtifacts.com/dump-those-silly-c...d-glassess</a><br />
<br />
If someone have already used - or will use it in the future - I'd like to watch some samples!<br />
<br />
P.S. the script deals only with red/cyan and green/magenta anaglyphs, so it would be nice to add amber/blue version!]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Thumbnail script with scene detection]]></title>
			<link>https://fanrestore.com/thread-2959.html</link>
			<pubDate>Mon, 23 Dec 2019 04:04:27 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://fanrestore.com/member.php?action=profile&uid=0">deleted user</a>]]></dc:creator>
			<guid isPermaLink="false">https://fanrestore.com/thread-2959.html</guid>
			<description><![CDATA[Made this bash script (can be used on Windows with the Git Bash that comes with the Git installer) for creating thumbnails.<br />
<br />
Difference to other thumbnail creating possibilities is that this one uses scene detection, so it's suited well for shorter videos like trailers when you want to get every distinct shot.<br />
<br />
It's not perfect - you get blank frames for example during short flashes and it won't recognize faded changes usually, but I'm happy with it.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Requirements</span><br />
<br />
- Ability to run .sh scripts. So either run in Linux or install a bash for Windows (for example Git Bash that comes with the Git installer)<br />
- ffmpeg in the PATH.<br />
- That's it!<br />
<br />
<span style="font-weight: bold;" class="mycode_b">How to use</span><br />
<br />
1. Replace "Trailer.mkv" with the file you want to create thumbnails for<br />
2. Set "columns" to how many columns of thumbnails you want to be displayed side-by-side<br />
3. Set "columnwidth" to the width in pixels an individual thumbnail should have<br />
4. Set "maxrows" to a high enough estimated number to fit in all thumbnails (from your experience and experiments) and then add 10. It's a bit awkwardly done, but ffmpeg needs you to set the amount of thumbnail tiles in advance, hence this script has a second cropping stage.<br />
5. Set "scenedetect" to a value depending on your content. Lower values make it more sensitive. However darker scenes require higher sensitivity. It's a bit dumb, but I don't know a better way. For dark videos I recommend values around 0.2 and for bright content around 0.4.<br />
6. Adjust JPEG quality if you want, but I don't know if it actually makes a difference for ffmpeg. Might replace this with a better JPEG compressor but I wanted this to work with the only dependency being ffmpeg.<br />
7. Double click the script and wait for it to finish. Can take a little while.<br />
<br />
The script will always create both .png and .jpg formats. Just keep the one you prefer.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Script (save as somefile.sh):</span><br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>#!/bin/bash<br />
inputfile="Trailer.mkv"<br />
columns=4<br />
columnwidth=640<br />
maxrows=30<br />
scenedetect=0.2 #Scene detection treshold. Lower = greater detection. Try around 0.2 for dark videos and 0.4 for normal videos<br />
jpegquality=1 #JPEG quality from 1-31 with 31 being worst quality (not sure if this works!)<br />
<br />
<br />
x="x"<br />
tmpfile="&#36;inputfile.tmp.bmp"<br />
outputfile="&#36;inputfile.png"<br />
outputfilejpg="&#36;inputfile.jpg"<br />
tiles="&#36;columns&#36;x&#36;maxrows"<br />
echo "Doing scene analysis: &#36;inputfile ..."<br />
ffmpeg -i "&#36;inputfile" -vf select="gt(scene&#92;,&#36;scenedetect)",scale=&#36;columnwidth:-1,tile=&#36;tiles  -hide_banner -frames:v 1 "&#36;tmpfile" 2&gt;/dev/null<br />
echo "Generated temporary uncropped tile file &#36;tmpfile ..."<br />
cropvalue=`ffmpeg -loop 1 -r 1 -i "&#36;tmpfile" -t 2 -r 1 -vf cropdetect=0:1:0  -f null - 2&gt;&amp;1  | awk '/crop/ { print &#36;NF }' | tail -1`<br />
echo "Calculated crop value: &#36;cropvalue"<br />
echo "Generating PNG file: &#36;outputfile"<br />
ffmpeg -i "&#36;tmpfile" -vf &#36;cropvalue -hide_banner  "&#36;outputfile"  2&gt;/dev/null<br />
echo "Generating JPG file: &#36;outputfilejpg"<br />
ffmpeg -i "&#36;tmpfile" -vf &#36;cropvalue -hide_banner -q:v &#36;jpegquality "&#36;outputfilejpg"  2&gt;/dev/null<br />
echo "Deleting temporary file: &#36;tmpfile"<br />
rm "&#36;tmpfile"<br />
read -rsp &#36;'(Hopefully) done! Press any key to continue...&#92;n' -n1 key</code></div></div>]]></description>
			<content:encoded><![CDATA[Made this bash script (can be used on Windows with the Git Bash that comes with the Git installer) for creating thumbnails.<br />
<br />
Difference to other thumbnail creating possibilities is that this one uses scene detection, so it's suited well for shorter videos like trailers when you want to get every distinct shot.<br />
<br />
It's not perfect - you get blank frames for example during short flashes and it won't recognize faded changes usually, but I'm happy with it.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Requirements</span><br />
<br />
- Ability to run .sh scripts. So either run in Linux or install a bash for Windows (for example Git Bash that comes with the Git installer)<br />
- ffmpeg in the PATH.<br />
- That's it!<br />
<br />
<span style="font-weight: bold;" class="mycode_b">How to use</span><br />
<br />
1. Replace "Trailer.mkv" with the file you want to create thumbnails for<br />
2. Set "columns" to how many columns of thumbnails you want to be displayed side-by-side<br />
3. Set "columnwidth" to the width in pixels an individual thumbnail should have<br />
4. Set "maxrows" to a high enough estimated number to fit in all thumbnails (from your experience and experiments) and then add 10. It's a bit awkwardly done, but ffmpeg needs you to set the amount of thumbnail tiles in advance, hence this script has a second cropping stage.<br />
5. Set "scenedetect" to a value depending on your content. Lower values make it more sensitive. However darker scenes require higher sensitivity. It's a bit dumb, but I don't know a better way. For dark videos I recommend values around 0.2 and for bright content around 0.4.<br />
6. Adjust JPEG quality if you want, but I don't know if it actually makes a difference for ffmpeg. Might replace this with a better JPEG compressor but I wanted this to work with the only dependency being ffmpeg.<br />
7. Double click the script and wait for it to finish. Can take a little while.<br />
<br />
The script will always create both .png and .jpg formats. Just keep the one you prefer.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Script (save as somefile.sh):</span><br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>#!/bin/bash<br />
inputfile="Trailer.mkv"<br />
columns=4<br />
columnwidth=640<br />
maxrows=30<br />
scenedetect=0.2 #Scene detection treshold. Lower = greater detection. Try around 0.2 for dark videos and 0.4 for normal videos<br />
jpegquality=1 #JPEG quality from 1-31 with 31 being worst quality (not sure if this works!)<br />
<br />
<br />
x="x"<br />
tmpfile="&#36;inputfile.tmp.bmp"<br />
outputfile="&#36;inputfile.png"<br />
outputfilejpg="&#36;inputfile.jpg"<br />
tiles="&#36;columns&#36;x&#36;maxrows"<br />
echo "Doing scene analysis: &#36;inputfile ..."<br />
ffmpeg -i "&#36;inputfile" -vf select="gt(scene&#92;,&#36;scenedetect)",scale=&#36;columnwidth:-1,tile=&#36;tiles  -hide_banner -frames:v 1 "&#36;tmpfile" 2&gt;/dev/null<br />
echo "Generated temporary uncropped tile file &#36;tmpfile ..."<br />
cropvalue=`ffmpeg -loop 1 -r 1 -i "&#36;tmpfile" -t 2 -r 1 -vf cropdetect=0:1:0  -f null - 2&gt;&amp;1  | awk '/crop/ { print &#36;NF }' | tail -1`<br />
echo "Calculated crop value: &#36;cropvalue"<br />
echo "Generating PNG file: &#36;outputfile"<br />
ffmpeg -i "&#36;tmpfile" -vf &#36;cropvalue -hide_banner  "&#36;outputfile"  2&gt;/dev/null<br />
echo "Generating JPG file: &#36;outputfilejpg"<br />
ffmpeg -i "&#36;tmpfile" -vf &#36;cropvalue -hide_banner -q:v &#36;jpegquality "&#36;outputfilejpg"  2&gt;/dev/null<br />
echo "Deleting temporary file: &#36;tmpfile"<br />
rm "&#36;tmpfile"<br />
read -rsp &#36;'(Hopefully) done! Press any key to continue...&#92;n' -n1 key</code></div></div>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[HDR to SDR]]></title>
			<link>https://fanrestore.com/thread-2663.html</link>
			<pubDate>Fri, 03 May 2019 22:21:58 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://fanrestore.com/member.php?action=profile&uid=1">spoRv</a>]]></dc:creator>
			<guid isPermaLink="false">https://fanrestore.com/thread-2663.html</guid>
			<description><![CDATA[After a while, I've found some ways to convert HDR 10bit bt.2020 video to SDR 8bit bt.709<br />
Don't know which is better, so if anyone, after have tried them, want to chime in, it will help!<br />
<br />
Script 1A<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>#Indexing<br />
FFVideoSource("any_HDR_video.mkv")<br />
<br />
#From 10bit to 16bit<br />
ConvertBits(16)<br />
<br />
#Reverse upscale to FULL HD with 16bit precision<br />
#(optional)<br />
#DeBilinearResizeMT(1920, 1080)<br />
<br />
#From YUV to XYZ with 16bit precision<br />
ConvertYUVtoXYZ(Color=0, OutputMode=1, HDRMode=0, fullrange=false)<br />
<br />
#Tone-mapping with 16bit precision<br />
#(of course values could/should? be changed)<br />
ConvertXYZ_Reinhard_HDRtoSDR(exposure_X=14.0, contrast_X=0.5, exposure_Y=14.0, contrast_Y=0.5, exposure_Z=14.0, contrast_Z=0.5)<br />
<br />
#From XYZ back to YUV 4:4:4 with 16bit precision<br />
ConvertXYZtoYUV(pColor=0)<br />
<br />
#Converting back to 4:2:0 with 16bit precision<br />
Converttoyuv420(interlaced=false, matrix="Rec.709")<br />
<br />
#Dithering to 8bit with the Floyd-Steinberg error diffusion<br />
ConvertBits(bits=8, dither=1)<br />
<br />
#Clipping<br />
Limiter(min_luma=16, max_luma=235, min_chroma=16, max_chroma=240)</code></div></div><br />
Script 1B:<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>#Indexing<br />
FFVideoSource("any_HDR_video.mkv")<br />
<br />
#From 10bit to 16bit<br />
ConvertBits(16)<br />
<br />
#Reverse upscale to FULL HD with 16bit precision<br />
#(optional)<br />
#DeBilinearResizeMT(1920, 1080)<br />
<br />
#From YUV to XYZ with 16bit precision<br />
ConvertYUVtoXYZ(Color=0, OutputMode=1, HDRMode=0, fullrange=false)<br />
<br />
#Tone-mapping with 16bit precision<br />
#(of course values could/should? be changed)<br />
ConvertXYZ_Reinhard_HDRtoSDR(exposure_X=14.0, contrast_X=0.5, exposure_Y=14.0, contrast_Y=0.5, exposure_Z=14.0, contrast_Z=0.5)<br />
<br />
#From XYZ back to YUV 4:4:4 with 16bit precision<br />
ConvertXYZtoYUV(pColor=0)<br />
<br />
#Converting back to 4:2:0<br />
Converttoyv12(matrix="PC709")<br />
<br />
#From 16bit to 8bit<br />
ConvertTo8bit<br />
<br />
#Clipping (needed?)<br />
Limiter(min_luma=16, max_luma=235, min_chroma=16, max_chroma=240)</code></div></div><br />
Script 2:<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>FFVideoSource("any_HDR_video.mkv")<br />
<br />
z_ConvertFormat(pixel_type="RGBPS",colorspace_op="2020ncl:st2084:2020:l=&gt;rgb:linear:2020:l", dither_type="none")<br />
<br />
DGHable<br />
# you can always play with the exposure:<br />
# DGHable(exposure=1.0)<br />
# (replace 1.0 with your own value)<br />
# Reinhard could also be used:<br />
# DGReinhard<br />
<br />
z_ConvertFormat(pixel_type="YV12",colorspace_op="rgb:linear:2020:l=&gt;709:709:709:l",dither_type="ordered")</code></div></div>]]></description>
			<content:encoded><![CDATA[After a while, I've found some ways to convert HDR 10bit bt.2020 video to SDR 8bit bt.709<br />
Don't know which is better, so if anyone, after have tried them, want to chime in, it will help!<br />
<br />
Script 1A<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>#Indexing<br />
FFVideoSource("any_HDR_video.mkv")<br />
<br />
#From 10bit to 16bit<br />
ConvertBits(16)<br />
<br />
#Reverse upscale to FULL HD with 16bit precision<br />
#(optional)<br />
#DeBilinearResizeMT(1920, 1080)<br />
<br />
#From YUV to XYZ with 16bit precision<br />
ConvertYUVtoXYZ(Color=0, OutputMode=1, HDRMode=0, fullrange=false)<br />
<br />
#Tone-mapping with 16bit precision<br />
#(of course values could/should? be changed)<br />
ConvertXYZ_Reinhard_HDRtoSDR(exposure_X=14.0, contrast_X=0.5, exposure_Y=14.0, contrast_Y=0.5, exposure_Z=14.0, contrast_Z=0.5)<br />
<br />
#From XYZ back to YUV 4:4:4 with 16bit precision<br />
ConvertXYZtoYUV(pColor=0)<br />
<br />
#Converting back to 4:2:0 with 16bit precision<br />
Converttoyuv420(interlaced=false, matrix="Rec.709")<br />
<br />
#Dithering to 8bit with the Floyd-Steinberg error diffusion<br />
ConvertBits(bits=8, dither=1)<br />
<br />
#Clipping<br />
Limiter(min_luma=16, max_luma=235, min_chroma=16, max_chroma=240)</code></div></div><br />
Script 1B:<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>#Indexing<br />
FFVideoSource("any_HDR_video.mkv")<br />
<br />
#From 10bit to 16bit<br />
ConvertBits(16)<br />
<br />
#Reverse upscale to FULL HD with 16bit precision<br />
#(optional)<br />
#DeBilinearResizeMT(1920, 1080)<br />
<br />
#From YUV to XYZ with 16bit precision<br />
ConvertYUVtoXYZ(Color=0, OutputMode=1, HDRMode=0, fullrange=false)<br />
<br />
#Tone-mapping with 16bit precision<br />
#(of course values could/should? be changed)<br />
ConvertXYZ_Reinhard_HDRtoSDR(exposure_X=14.0, contrast_X=0.5, exposure_Y=14.0, contrast_Y=0.5, exposure_Z=14.0, contrast_Z=0.5)<br />
<br />
#From XYZ back to YUV 4:4:4 with 16bit precision<br />
ConvertXYZtoYUV(pColor=0)<br />
<br />
#Converting back to 4:2:0<br />
Converttoyv12(matrix="PC709")<br />
<br />
#From 16bit to 8bit<br />
ConvertTo8bit<br />
<br />
#Clipping (needed?)<br />
Limiter(min_luma=16, max_luma=235, min_chroma=16, max_chroma=240)</code></div></div><br />
Script 2:<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>FFVideoSource("any_HDR_video.mkv")<br />
<br />
z_ConvertFormat(pixel_type="RGBPS",colorspace_op="2020ncl:st2084:2020:l=&gt;rgb:linear:2020:l", dither_type="none")<br />
<br />
DGHable<br />
# you can always play with the exposure:<br />
# DGHable(exposure=1.0)<br />
# (replace 1.0 with your own value)<br />
# Reinhard could also be used:<br />
# DGReinhard<br />
<br />
z_ConvertFormat(pixel_type="YV12",colorspace_op="rgb:linear:2020:l=&gt;709:709:709:l",dither_type="ordered")</code></div></div>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[[FIJI] Film Restoration macros.]]></title>
			<link>https://fanrestore.com/thread-2581.html</link>
			<pubDate>Fri, 22 Mar 2019 21:46:22 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://fanrestore.com/member.php?action=profile&uid=122">althor1138</a>]]></dc:creator>
			<guid isPermaLink="false">https://fanrestore.com/thread-2581.html</guid>
			<description><![CDATA[I've been working a bit on using ImageJ/FIJI as a method for performing various film restoration methods. It is a work in progress and there are quite a few new ideas that I've yet to implement and the code is probably atrocious.<br />
<br />
Dual Image Sequence Registration:<br />
<a href="https://github.com/althor1138/DISR-FIJI-MACRO" target="_blank" rel="noopener" class="mycode_url">https://github.com/althor1138/DISR-FIJI-MACRO</a><br />
<br />
It basically takes two identical film clips from separate sources and registers them spatially.<br />
<br />
If you don't want to mess with installing the plugin just download the fiji.app folder here and open up FIJI. The plugin is in the plugins tab under FILM TOOLS.<br />
<br />
<a href="https://drive.google.com/drive/folders/1JVsH02MtVPyPrzNYNcfpvKT5TI4VHeon?usp=sharing" target="_blank" rel="noopener" class="mycode_url">https://drive.google.com/drive/folders/1...sp=sharing</a>]]></description>
			<content:encoded><![CDATA[I've been working a bit on using ImageJ/FIJI as a method for performing various film restoration methods. It is a work in progress and there are quite a few new ideas that I've yet to implement and the code is probably atrocious.<br />
<br />
Dual Image Sequence Registration:<br />
<a href="https://github.com/althor1138/DISR-FIJI-MACRO" target="_blank" rel="noopener" class="mycode_url">https://github.com/althor1138/DISR-FIJI-MACRO</a><br />
<br />
It basically takes two identical film clips from separate sources and registers them spatially.<br />
<br />
If you don't want to mess with installing the plugin just download the fiji.app folder here and open up FIJI. The plugin is in the plugins tab under FILM TOOLS.<br />
<br />
<a href="https://drive.google.com/drive/folders/1JVsH02MtVPyPrzNYNcfpvKT5TI4VHeon?usp=sharing" target="_blank" rel="noopener" class="mycode_url">https://drive.google.com/drive/folders/1...sp=sharing</a>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[VC-1 to x265]]></title>
			<link>https://fanrestore.com/thread-2501.html</link>
			<pubDate>Mon, 04 Feb 2019 00:30:55 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://fanrestore.com/member.php?action=profile&uid=1510">CaveDoctor</a>]]></dc:creator>
			<guid isPermaLink="false">https://fanrestore.com/thread-2501.html</guid>
			<description><![CDATA[My preferred video standard from here on out is x265 with an honorable mention of x264 as my other preferred video streaming format.<br />
My question, what is the quality like for converting VC-1 content to x265?<br />
Would it be better to convert the VC-1 content to prores before converting to x265, in order to avoid degradation?<br />
Also, are there any methods of audio upscaling?]]></description>
			<content:encoded><![CDATA[My preferred video standard from here on out is x265 with an honorable mention of x264 as my other preferred video streaming format.<br />
My question, what is the quality like for converting VC-1 content to x265?<br />
Would it be better to convert the VC-1 content to prores before converting to x265, in order to avoid degradation?<br />
Also, are there any methods of audio upscaling?]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Exploiting Seamless Branching]]></title>
			<link>https://fanrestore.com/thread-2409.html</link>
			<pubDate>Sat, 01 Dec 2018 20:32:21 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://fanrestore.com/member.php?action=profile&uid=41">Chewtobacca</a>]]></dc:creator>
			<guid isPermaLink="false">https://fanrestore.com/thread-2409.html</guid>
			<description><![CDATA[The Aluminum Falcon raised this topic a while back on ot.com.  See his informative thread <a href="https://originaltrilogy.com/topic/Alien-Trilogy-Custom-Cuts-Do-It-Yourself-Guide/id/49630" target="_blank" rel="noopener" class="mycode_url">here</a>.  While he uses tsMuxeR, eac3to is a better tool for the job <span style="text-decoration: line-through;" class="mycode_s">because it runs a second pass when fixing the gaps that result from seamless branching</span>.  EDIT:  See schorman's posts below.<br />
<ul class="mycode_list"><li>The only tool you need is eac3to.<br />
</li>
<li>I'll use <span style="font-style: italic;" class="mycode_i">Aliens</span> as an example and add other playlists as and when.<br />
</li>
<li>Adjust everything to fit your directory structure, e.g., change "X" to whatever; do a "find and replace".  <br />
</li>
<li>When joining M2TS files like this, make sure you have space on the drive <span style="font-weight: bold;" class="mycode_b">in which eac3to is located</span> as well as the drive in which the BD is located. This is because eac3to makes temporary files on the drive it occupies.<br />
</li>
<li>If your branching disc has a <span style="font-weight: bold;" class="mycode_b">Dolby TrueHD</span> track, you must <span style="font-weight: bold;" class="mycode_b">decode</span> it instead of extracting it.  <span style="font-weight: bold;" class="mycode_b">DTS-HD MA</span> tracks can be extracted without incident.<br />
</li>
<li>Use -no2ndpass unless you have reason not to do so.<br />
</li>
<li> So far, this approach works only on standard BDs.  UHD BDs have sync issues.<br />
</li>
</ul>
<span style="font-weight: bold;" class="mycode_b">Aliens: CBS TV cut</span><br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>"filepath&#92;eac3to334&#92;eac3to.exe" "X:&#92;ALIENS_WW&#92;BDMV&#92;Stream&#92;01106.m2ts"+"X:&#92;ALIENS_WW&#92;BDMV&#92;Stream&#92;01107.m2ts"+"X:&#92;ALIENS_WW&#92;BDMV&#92;Stream&#92;01108.m2ts"+"X:&#92;ALIENS_WW&#92;BDMV&#92;Stream&#92;01140.m2ts"+"X:&#92;ALIENS_WW&#92;BDMV&#92;Stream&#92;01110.m2ts"+"X:&#92;ALIENS_WW&#92;BDMV&#92;Stream&#92;01142.m2ts"+"X:&#92;ALIENS_WW&#92;BDMV&#92;Stream&#92;01112.m2ts"+"X:&#92;ALIENS_WW&#92;BDMV&#92;Stream&#92;01144.m2ts"+"X:&#92;ALIENS_WW&#92;BDMV&#92;Stream&#92;01114.m2ts"+"X:&#92;ALIENS_WW&#92;BDMV&#92;Stream&#92;01147.m2ts"+"X:&#92;ALIENS_WW&#92;BDMV&#92;Stream&#92;01117.m2ts"+"X:&#92;ALIENS_WW&#92;BDMV&#92;Stream&#92;01149.m2ts"+"X:&#92;ALIENS_WW&#92;BDMV&#92;Stream&#92;01119.m2ts"+"X:&#92;ALIENS_WW&#92;BDMV&#92;Stream&#92;01146.m2ts"+"X:&#92;ALIENS_WW&#92;BDMV&#92;Stream&#92;01121.m2ts"+"X:&#92;ALIENS_WW&#92;BDMV&#92;Stream&#92;01124.m2ts"+"X:&#92;ALIENS_WW&#92;BDMV&#92;Stream&#92;01125.m2ts"+"X:&#92;ALIENS_WW&#92;BDMV&#92;Stream&#92;01141.m2ts"+"X:&#92;ALIENS_WW&#92;BDMV&#92;Stream&#92;01127.m2ts"+"X:&#92;ALIENS_WW&#92;BDMV&#92;Stream&#92;01128.m2ts"+"X:&#92;ALIENS_WW&#92;BDMV&#92;Stream&#92;01129.m2ts"+"X:&#92;ALIENS_WW&#92;BDMV&#92;Stream&#92;01130.m2ts"+"X:&#92;ALIENS_WW&#92;BDMV&#92;Stream&#92;01131.m2ts"+"X:&#92;ALIENS_WW&#92;BDMV&#92;Stream&#92;01133.m2ts"+"X:&#92;ALIENS_WW&#92;BDMV&#92;Stream&#92;01134.m2ts"+"X:&#92;ALIENS_WW&#92;BDMV&#92;Stream&#92;01137.m2ts"  -demux -no2ndpass</code></div></div><br />
<span style="font-weight: bold;" class="mycode_b">Alien: Extended</span><br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>"filepath&#92;eac3to334&#92;eac3to.exe" "X:&#92;ALIEN_WW&#92;BDMV&#92;STREAM&#92;00983.m2ts"+"X:&#92;ALIEN_WW&#92;BDMV&#92;STREAM&#92;00985.m2ts"+"X:&#92;ALIEN_WW&#92;BDMV&#92;STREAM&#92;00984.m2ts"+"X:&#92;ALIEN_WW&#92;BDMV&#92;STREAM&#92;00986.m2ts"+"X:&#92;ALIEN_WW&#92;BDMV&#92;STREAM&#92;00987.m2ts"+"X:&#92;ALIEN_WW&#92;BDMV&#92;STREAM&#92;01016.m2ts"+"X:&#92;ALIEN_WW&#92;BDMV&#92;STREAM&#92;00988.m2ts"+"X:&#92;ALIEN_WW&#92;BDMV&#92;STREAM&#92;00991.m2ts"+"X:&#92;ALIEN_WW&#92;BDMV&#92;STREAM&#92;00989.m2ts"+"X:&#92;ALIEN_WW&#92;BDMV&#92;STREAM&#92;01018.m2ts"+"X:&#92;ALIEN_WW&#92;BDMV&#92;STREAM&#92;00992.m2ts"+"X:&#92;ALIEN_WW&#92;BDMV&#92;STREAM&#92;00995.m2ts"+"X:&#92;ALIEN_WW&#92;BDMV&#92;STREAM&#92;00993.m2ts"+"X:&#92;ALIEN_WW&#92;BDMV&#92;STREAM&#92;00997.m2ts"+"X:&#92;ALIEN_WW&#92;BDMV&#92;STREAM&#92;00996.m2ts"+"X:&#92;ALIEN_WW&#92;BDMV&#92;STREAM&#92;00998.m2ts"+"X:&#92;ALIEN_WW&#92;BDMV&#92;STREAM&#92;00999.m2ts"+"X:&#92;ALIEN_WW&#92;BDMV&#92;STREAM&#92;01001.m2ts"+"X:&#92;ALIEN_WW&#92;BDMV&#92;STREAM&#92;01000.m2ts"+"X:&#92;ALIEN_WW&#92;BDMV&#92;STREAM&#92;01003.m2ts"+"X:&#92;ALIEN_WW&#92;BDMV&#92;STREAM&#92;01002.m2ts"+"X:&#92;ALIEN_WW&#92;BDMV&#92;STREAM&#92;01004.m2ts"+"X:&#92;ALIEN_WW&#92;BDMV&#92;STREAM&#92;01005.m2ts"+"X:&#92;ALIEN_WW&#92;BDMV&#92;STREAM&#92;01007.m2ts"+"X:&#92;ALIEN_WW&#92;BDMV&#92;STREAM&#92;01006.m2ts"+"X:&#92;ALIEN_WW&#92;BDMV&#92;STREAM&#92;01008.m2ts"+"X:&#92;ALIEN_WW&#92;BDMV&#92;STREAM&#92;01009.m2ts"+"X:&#92;ALIEN_WW&#92;BDMV&#92;STREAM&#92;01027.m2ts"+"X:&#92;ALIEN_WW&#92;BDMV&#92;STREAM&#92;01010.m2ts"+"X:&#92;ALIEN_WW&#92;BDMV&#92;STREAM&#92;01013.m2ts"+"X:&#92;ALIEN_WW&#92;BDMV&#92;STREAM&#92;01012.m2ts" -demux -no2ndpass</code></div></div><br />
<span style="font-weight: bold;" class="mycode_b">Alien 3: Extended</span><br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>"filepath&#92;eac3to334&#92;eac3to.exe" <br />
00750.m2ts+00752.m2ts+00753.m2ts+00701.m2ts+00755.m2ts+00703.m2ts+00757.m2ts+00758.m2ts+00759.m2ts+00760.m2ts+00761.m2ts+00762.m2ts+00763.m2ts+00764.m2ts+00765.m2ts+00766.m2ts+00767.m2ts+00768.m2ts+00769.m2ts+00770.m2ts+00771.m2ts+00772.m2ts+00773.m2ts+00774.m2ts+00775.m2ts+00776.m2ts+00777.m2ts -demux -no2ndpass</code></div></div><br />
<span style="font-weight: bold;" class="mycode_b">Alien 3: Extended (chest-burster ending)</span><br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>"filepath&#92;eac3to334&#92;eac3to.exe" <br />
00750.m2ts+00752.m2ts+00753.m2ts+00701.m2ts+00755.m2ts+00703.m2ts+00757.m2ts+00758.m2ts+00759.m2ts+00760.m2ts+00761.m2ts+00762.m2ts+00763.m2ts+00764.m2ts+00765.m2ts+00766.m2ts+00767.m2ts+00768.m2ts+00769.m2ts+00770.m2ts+00771.m2ts+00772.m2ts+00773.m2ts+00774.m2ts+00775.m2ts+00713.m2ts+00777.m2ts -demux -no2ndpass</code></div></div><br />
<span style="font-weight: bold;" class="mycode_b">Close Encounters of the Fourth <img src="https://fanrestore.com/images/smilies/tongue.png" alt="Tongue" title="Tongue" class="smilie smilie_51" /> Kind (1977)</span><br />
<br />
This uses the 30th Anniversary Edition, not the 40th Anniversary one that followed in 2017.  I should imagine it would work with <a href="http://www.dvdcompare.net/comparisons/film.php?fid=11932" target="_blank" rel="noopener" class="mycode_url">the first Sony BD</a> too.  Use the DTS-HD MA track.<br />
<br />
Chronology: Roy is fired -&gt; India sequence -&gt; Lacombe's auditorium speech -&gt; Roy goes back to the road with his camera<br />
*no McDonald's sign<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>"filepath&#92;eac3to334&#92;eac3to.exe" "X:&#92;CETK&#92;BDMV&#92;STREAM&#92;00000.m2ts"+"X:&#92;CETK&#92;BDMV&#92;STREAM&#92;00002.m2ts"+"X:&#92;CETK&#92;BDMV&#92;STREAM&#92;00006.m2ts"+"X:&#92;CETK&#92;BDMV&#92;STREAM&#92;00008.m2ts"+"X:&#92;CETK&#92;BDMV&#92;STREAM&#92;00009.m2ts"+"X:&#92;CETK&#92;BDMV&#92;STREAM&#92;00010.m2ts"+"X:&#92;CETK&#92;BDMV&#92;STREAM&#92;00013.m2ts"+"X:&#92;CETK&#92;BDMV&#92;STREAM&#92;00015.m2ts"+"X:&#92;CETK&#92;BDMV&#92;STREAM&#92;00016.m2ts"+"X:&#92;CETK&#92;BDMV&#92;STREAM&#92;00018.m2ts"+"X:&#92;CETK&#92;BDMV&#92;STREAM&#92;00020.m2ts"+"X:&#92;CETK&#92;BDMV&#92;STREAM&#92;00022.m2ts"+"X:&#92;CETK&#92;BDMV&#92;STREAM&#92;00024.m2ts"+"X:&#92;CETK&#92;BDMV&#92;STREAM&#92;00025.m2ts"+"X:&#92;CETK&#92;BDMV&#92;STREAM&#92;00026.m2ts"+"X:&#92;CETK&#92;BDMV&#92;STREAM&#92;00027.m2ts"+"X:&#92;CETK&#92;BDMV&#92;STREAM&#92;00118.m2ts"+"X:&#92;CETK&#92;BDMV&#92;STREAM&#92;00119.m2ts"+"X:&#92;CETK&#92;BDMV&#92;STREAM&#92;00032.m2ts"+"X:&#92;CETK&#92;BDMV&#92;STREAM&#92;00033.m2ts"+"X:&#92;CETK&#92;BDMV&#92;STREAM&#92;00034.m2ts"+"X:&#92;CETK&#92;BDMV&#92;STREAM&#92;00037.m2ts"+"X:&#92;CETK&#92;BDMV&#92;STREAM&#92;00038.m2ts"+"X:&#92;CETK&#92;BDMV&#92;STREAM&#92;00040.m2ts"+"X:&#92;CETK&#92;BDMV&#92;STREAM&#92;00041.m2ts"+"X:&#92;CETK&#92;BDMV&#92;STREAM&#92;00043.m2ts"+"X:&#92;CETK&#92;BDMV&#92;STREAM&#92;00044.m2ts"+"X:&#92;CETK&#92;BDMV&#92;STREAM&#92;00046.m2ts"+"X:&#92;CETK&#92;BDMV&#92;STREAM&#92;00048.m2ts" 1: "X:&#92;CETK&#92;BDMV&#92;video.264"  3: "X:&#92;CETK&#92;BDMV&#92;audio.dtshd" -no2ndpass</code></div></div>]]></description>
			<content:encoded><![CDATA[The Aluminum Falcon raised this topic a while back on ot.com.  See his informative thread <a href="https://originaltrilogy.com/topic/Alien-Trilogy-Custom-Cuts-Do-It-Yourself-Guide/id/49630" target="_blank" rel="noopener" class="mycode_url">here</a>.  While he uses tsMuxeR, eac3to is a better tool for the job <span style="text-decoration: line-through;" class="mycode_s">because it runs a second pass when fixing the gaps that result from seamless branching</span>.  EDIT:  See schorman's posts below.<br />
<ul class="mycode_list"><li>The only tool you need is eac3to.<br />
</li>
<li>I'll use <span style="font-style: italic;" class="mycode_i">Aliens</span> as an example and add other playlists as and when.<br />
</li>
<li>Adjust everything to fit your directory structure, e.g., change "X" to whatever; do a "find and replace".  <br />
</li>
<li>When joining M2TS files like this, make sure you have space on the drive <span style="font-weight: bold;" class="mycode_b">in which eac3to is located</span> as well as the drive in which the BD is located. This is because eac3to makes temporary files on the drive it occupies.<br />
</li>
<li>If your branching disc has a <span style="font-weight: bold;" class="mycode_b">Dolby TrueHD</span> track, you must <span style="font-weight: bold;" class="mycode_b">decode</span> it instead of extracting it.  <span style="font-weight: bold;" class="mycode_b">DTS-HD MA</span> tracks can be extracted without incident.<br />
</li>
<li>Use -no2ndpass unless you have reason not to do so.<br />
</li>
<li> So far, this approach works only on standard BDs.  UHD BDs have sync issues.<br />
</li>
</ul>
<span style="font-weight: bold;" class="mycode_b">Aliens: CBS TV cut</span><br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>"filepath&#92;eac3to334&#92;eac3to.exe" "X:&#92;ALIENS_WW&#92;BDMV&#92;Stream&#92;01106.m2ts"+"X:&#92;ALIENS_WW&#92;BDMV&#92;Stream&#92;01107.m2ts"+"X:&#92;ALIENS_WW&#92;BDMV&#92;Stream&#92;01108.m2ts"+"X:&#92;ALIENS_WW&#92;BDMV&#92;Stream&#92;01140.m2ts"+"X:&#92;ALIENS_WW&#92;BDMV&#92;Stream&#92;01110.m2ts"+"X:&#92;ALIENS_WW&#92;BDMV&#92;Stream&#92;01142.m2ts"+"X:&#92;ALIENS_WW&#92;BDMV&#92;Stream&#92;01112.m2ts"+"X:&#92;ALIENS_WW&#92;BDMV&#92;Stream&#92;01144.m2ts"+"X:&#92;ALIENS_WW&#92;BDMV&#92;Stream&#92;01114.m2ts"+"X:&#92;ALIENS_WW&#92;BDMV&#92;Stream&#92;01147.m2ts"+"X:&#92;ALIENS_WW&#92;BDMV&#92;Stream&#92;01117.m2ts"+"X:&#92;ALIENS_WW&#92;BDMV&#92;Stream&#92;01149.m2ts"+"X:&#92;ALIENS_WW&#92;BDMV&#92;Stream&#92;01119.m2ts"+"X:&#92;ALIENS_WW&#92;BDMV&#92;Stream&#92;01146.m2ts"+"X:&#92;ALIENS_WW&#92;BDMV&#92;Stream&#92;01121.m2ts"+"X:&#92;ALIENS_WW&#92;BDMV&#92;Stream&#92;01124.m2ts"+"X:&#92;ALIENS_WW&#92;BDMV&#92;Stream&#92;01125.m2ts"+"X:&#92;ALIENS_WW&#92;BDMV&#92;Stream&#92;01141.m2ts"+"X:&#92;ALIENS_WW&#92;BDMV&#92;Stream&#92;01127.m2ts"+"X:&#92;ALIENS_WW&#92;BDMV&#92;Stream&#92;01128.m2ts"+"X:&#92;ALIENS_WW&#92;BDMV&#92;Stream&#92;01129.m2ts"+"X:&#92;ALIENS_WW&#92;BDMV&#92;Stream&#92;01130.m2ts"+"X:&#92;ALIENS_WW&#92;BDMV&#92;Stream&#92;01131.m2ts"+"X:&#92;ALIENS_WW&#92;BDMV&#92;Stream&#92;01133.m2ts"+"X:&#92;ALIENS_WW&#92;BDMV&#92;Stream&#92;01134.m2ts"+"X:&#92;ALIENS_WW&#92;BDMV&#92;Stream&#92;01137.m2ts"  -demux -no2ndpass</code></div></div><br />
<span style="font-weight: bold;" class="mycode_b">Alien: Extended</span><br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>"filepath&#92;eac3to334&#92;eac3to.exe" "X:&#92;ALIEN_WW&#92;BDMV&#92;STREAM&#92;00983.m2ts"+"X:&#92;ALIEN_WW&#92;BDMV&#92;STREAM&#92;00985.m2ts"+"X:&#92;ALIEN_WW&#92;BDMV&#92;STREAM&#92;00984.m2ts"+"X:&#92;ALIEN_WW&#92;BDMV&#92;STREAM&#92;00986.m2ts"+"X:&#92;ALIEN_WW&#92;BDMV&#92;STREAM&#92;00987.m2ts"+"X:&#92;ALIEN_WW&#92;BDMV&#92;STREAM&#92;01016.m2ts"+"X:&#92;ALIEN_WW&#92;BDMV&#92;STREAM&#92;00988.m2ts"+"X:&#92;ALIEN_WW&#92;BDMV&#92;STREAM&#92;00991.m2ts"+"X:&#92;ALIEN_WW&#92;BDMV&#92;STREAM&#92;00989.m2ts"+"X:&#92;ALIEN_WW&#92;BDMV&#92;STREAM&#92;01018.m2ts"+"X:&#92;ALIEN_WW&#92;BDMV&#92;STREAM&#92;00992.m2ts"+"X:&#92;ALIEN_WW&#92;BDMV&#92;STREAM&#92;00995.m2ts"+"X:&#92;ALIEN_WW&#92;BDMV&#92;STREAM&#92;00993.m2ts"+"X:&#92;ALIEN_WW&#92;BDMV&#92;STREAM&#92;00997.m2ts"+"X:&#92;ALIEN_WW&#92;BDMV&#92;STREAM&#92;00996.m2ts"+"X:&#92;ALIEN_WW&#92;BDMV&#92;STREAM&#92;00998.m2ts"+"X:&#92;ALIEN_WW&#92;BDMV&#92;STREAM&#92;00999.m2ts"+"X:&#92;ALIEN_WW&#92;BDMV&#92;STREAM&#92;01001.m2ts"+"X:&#92;ALIEN_WW&#92;BDMV&#92;STREAM&#92;01000.m2ts"+"X:&#92;ALIEN_WW&#92;BDMV&#92;STREAM&#92;01003.m2ts"+"X:&#92;ALIEN_WW&#92;BDMV&#92;STREAM&#92;01002.m2ts"+"X:&#92;ALIEN_WW&#92;BDMV&#92;STREAM&#92;01004.m2ts"+"X:&#92;ALIEN_WW&#92;BDMV&#92;STREAM&#92;01005.m2ts"+"X:&#92;ALIEN_WW&#92;BDMV&#92;STREAM&#92;01007.m2ts"+"X:&#92;ALIEN_WW&#92;BDMV&#92;STREAM&#92;01006.m2ts"+"X:&#92;ALIEN_WW&#92;BDMV&#92;STREAM&#92;01008.m2ts"+"X:&#92;ALIEN_WW&#92;BDMV&#92;STREAM&#92;01009.m2ts"+"X:&#92;ALIEN_WW&#92;BDMV&#92;STREAM&#92;01027.m2ts"+"X:&#92;ALIEN_WW&#92;BDMV&#92;STREAM&#92;01010.m2ts"+"X:&#92;ALIEN_WW&#92;BDMV&#92;STREAM&#92;01013.m2ts"+"X:&#92;ALIEN_WW&#92;BDMV&#92;STREAM&#92;01012.m2ts" -demux -no2ndpass</code></div></div><br />
<span style="font-weight: bold;" class="mycode_b">Alien 3: Extended</span><br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>"filepath&#92;eac3to334&#92;eac3to.exe" <br />
00750.m2ts+00752.m2ts+00753.m2ts+00701.m2ts+00755.m2ts+00703.m2ts+00757.m2ts+00758.m2ts+00759.m2ts+00760.m2ts+00761.m2ts+00762.m2ts+00763.m2ts+00764.m2ts+00765.m2ts+00766.m2ts+00767.m2ts+00768.m2ts+00769.m2ts+00770.m2ts+00771.m2ts+00772.m2ts+00773.m2ts+00774.m2ts+00775.m2ts+00776.m2ts+00777.m2ts -demux -no2ndpass</code></div></div><br />
<span style="font-weight: bold;" class="mycode_b">Alien 3: Extended (chest-burster ending)</span><br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>"filepath&#92;eac3to334&#92;eac3to.exe" <br />
00750.m2ts+00752.m2ts+00753.m2ts+00701.m2ts+00755.m2ts+00703.m2ts+00757.m2ts+00758.m2ts+00759.m2ts+00760.m2ts+00761.m2ts+00762.m2ts+00763.m2ts+00764.m2ts+00765.m2ts+00766.m2ts+00767.m2ts+00768.m2ts+00769.m2ts+00770.m2ts+00771.m2ts+00772.m2ts+00773.m2ts+00774.m2ts+00775.m2ts+00713.m2ts+00777.m2ts -demux -no2ndpass</code></div></div><br />
<span style="font-weight: bold;" class="mycode_b">Close Encounters of the Fourth <img src="https://fanrestore.com/images/smilies/tongue.png" alt="Tongue" title="Tongue" class="smilie smilie_51" /> Kind (1977)</span><br />
<br />
This uses the 30th Anniversary Edition, not the 40th Anniversary one that followed in 2017.  I should imagine it would work with <a href="http://www.dvdcompare.net/comparisons/film.php?fid=11932" target="_blank" rel="noopener" class="mycode_url">the first Sony BD</a> too.  Use the DTS-HD MA track.<br />
<br />
Chronology: Roy is fired -&gt; India sequence -&gt; Lacombe's auditorium speech -&gt; Roy goes back to the road with his camera<br />
*no McDonald's sign<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>"filepath&#92;eac3to334&#92;eac3to.exe" "X:&#92;CETK&#92;BDMV&#92;STREAM&#92;00000.m2ts"+"X:&#92;CETK&#92;BDMV&#92;STREAM&#92;00002.m2ts"+"X:&#92;CETK&#92;BDMV&#92;STREAM&#92;00006.m2ts"+"X:&#92;CETK&#92;BDMV&#92;STREAM&#92;00008.m2ts"+"X:&#92;CETK&#92;BDMV&#92;STREAM&#92;00009.m2ts"+"X:&#92;CETK&#92;BDMV&#92;STREAM&#92;00010.m2ts"+"X:&#92;CETK&#92;BDMV&#92;STREAM&#92;00013.m2ts"+"X:&#92;CETK&#92;BDMV&#92;STREAM&#92;00015.m2ts"+"X:&#92;CETK&#92;BDMV&#92;STREAM&#92;00016.m2ts"+"X:&#92;CETK&#92;BDMV&#92;STREAM&#92;00018.m2ts"+"X:&#92;CETK&#92;BDMV&#92;STREAM&#92;00020.m2ts"+"X:&#92;CETK&#92;BDMV&#92;STREAM&#92;00022.m2ts"+"X:&#92;CETK&#92;BDMV&#92;STREAM&#92;00024.m2ts"+"X:&#92;CETK&#92;BDMV&#92;STREAM&#92;00025.m2ts"+"X:&#92;CETK&#92;BDMV&#92;STREAM&#92;00026.m2ts"+"X:&#92;CETK&#92;BDMV&#92;STREAM&#92;00027.m2ts"+"X:&#92;CETK&#92;BDMV&#92;STREAM&#92;00118.m2ts"+"X:&#92;CETK&#92;BDMV&#92;STREAM&#92;00119.m2ts"+"X:&#92;CETK&#92;BDMV&#92;STREAM&#92;00032.m2ts"+"X:&#92;CETK&#92;BDMV&#92;STREAM&#92;00033.m2ts"+"X:&#92;CETK&#92;BDMV&#92;STREAM&#92;00034.m2ts"+"X:&#92;CETK&#92;BDMV&#92;STREAM&#92;00037.m2ts"+"X:&#92;CETK&#92;BDMV&#92;STREAM&#92;00038.m2ts"+"X:&#92;CETK&#92;BDMV&#92;STREAM&#92;00040.m2ts"+"X:&#92;CETK&#92;BDMV&#92;STREAM&#92;00041.m2ts"+"X:&#92;CETK&#92;BDMV&#92;STREAM&#92;00043.m2ts"+"X:&#92;CETK&#92;BDMV&#92;STREAM&#92;00044.m2ts"+"X:&#92;CETK&#92;BDMV&#92;STREAM&#92;00046.m2ts"+"X:&#92;CETK&#92;BDMV&#92;STREAM&#92;00048.m2ts" 1: "X:&#92;CETK&#92;BDMV&#92;video.264"  3: "X:&#92;CETK&#92;BDMV&#92;audio.dtshd" -no2ndpass</code></div></div>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Deblur (A Simple Sharpening Script)]]></title>
			<link>https://fanrestore.com/thread-2106.html</link>
			<pubDate>Thu, 05 Apr 2018 02:54:08 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://fanrestore.com/member.php?action=profile&uid=1107">MWilson</a>]]></dc:creator>
			<guid isPermaLink="false">https://fanrestore.com/thread-2106.html</guid>
			<description><![CDATA[<span style="font-weight: bold;" class="mycode_b"><span style="text-decoration: underline;" class="mycode_u">DEBLUR</span></span><br />
Quick and dirty sharpening.<br />
<span style="font-weight: bold;" class="mycode_b"><span style="text-decoration: underline;" class="mycode_u">REQUIREMENTS</span></span><br />
fft3dfilter<br />
arearesize<br />
-------------------------------<br />
<br />
I wanted to write something that could "fix" blurry encodes. It works fairly well, as long as your source isn't fubar to begin with.<br />
<br />
I just posted a few images that should show what can be done with the default settings followed by a bit of denoising (fft3dfilter(sigma=8) for these).<br />
<br />
Anyways hope you enjoy the script!<br />
<br />
----------------------------------<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>function deblur2(clip v,float "blend",bool "clean",int "bsize", bool "show")<br />
{<br />
blend=Default(blend,.75)<br />
clean=default(clean,true)<br />
show=default(show,false)<br />
bsize=default(bsize,4)<br />
osize=bsize/2<br />
v=v.converttoyv12()<br />
v<br />
fft3dfilter(16,bw=bsize,bh=bsize,ow=osize,oh=osize)<br />
Subtract(last,v)<br />
Subtract(v,last)<br />
a=last<br />
a.arearesize(width(v)/2,height(v)/2)<br />
fft3dfilter(16,bw=bsize,bh=bsize,ow=osize,oh=osize)<br />
gaussresize(width(a),height(a),p=1)<br />
Subtract(last,a)<br />
Subtract(a,last)<br />
b=last<br />
b<br />
fft3dfilter(16,bw=bsize,bh=bsize,ow=osize,oh=osize)<br />
Subtract(last,b)<br />
Subtract(b,last)<br />
fft3dfilter(sharpen=4)<br />
(clean==true) ? last.fft3dfilter(16,bw=32,bh=32,ow=16,oh=16) : last<br />
merge(v,last,blend)<br />
x=last<br />
(show==true) ? StackHorizontal(v,x) : x<br />
return last<br />
}</code></div></div><br />
And here are a few images. Left is original, center is blurred, right is the result at the default strength with a block size of 48 (deblur2(bsize=48)).<br />
<br />
<img src="https://i.imgur.com/0J8QYZe.png" loading="lazy"  alt="[Image: 0J8QYZe.png]" class="mycode_img" /><br />
<img src="https://i.imgur.com/pilb4xO.png" loading="lazy"  alt="[Image: pilb4xO.png]" class="mycode_img" />]]></description>
			<content:encoded><![CDATA[<span style="font-weight: bold;" class="mycode_b"><span style="text-decoration: underline;" class="mycode_u">DEBLUR</span></span><br />
Quick and dirty sharpening.<br />
<span style="font-weight: bold;" class="mycode_b"><span style="text-decoration: underline;" class="mycode_u">REQUIREMENTS</span></span><br />
fft3dfilter<br />
arearesize<br />
-------------------------------<br />
<br />
I wanted to write something that could "fix" blurry encodes. It works fairly well, as long as your source isn't fubar to begin with.<br />
<br />
I just posted a few images that should show what can be done with the default settings followed by a bit of denoising (fft3dfilter(sigma=8) for these).<br />
<br />
Anyways hope you enjoy the script!<br />
<br />
----------------------------------<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>function deblur2(clip v,float "blend",bool "clean",int "bsize", bool "show")<br />
{<br />
blend=Default(blend,.75)<br />
clean=default(clean,true)<br />
show=default(show,false)<br />
bsize=default(bsize,4)<br />
osize=bsize/2<br />
v=v.converttoyv12()<br />
v<br />
fft3dfilter(16,bw=bsize,bh=bsize,ow=osize,oh=osize)<br />
Subtract(last,v)<br />
Subtract(v,last)<br />
a=last<br />
a.arearesize(width(v)/2,height(v)/2)<br />
fft3dfilter(16,bw=bsize,bh=bsize,ow=osize,oh=osize)<br />
gaussresize(width(a),height(a),p=1)<br />
Subtract(last,a)<br />
Subtract(a,last)<br />
b=last<br />
b<br />
fft3dfilter(16,bw=bsize,bh=bsize,ow=osize,oh=osize)<br />
Subtract(last,b)<br />
Subtract(b,last)<br />
fft3dfilter(sharpen=4)<br />
(clean==true) ? last.fft3dfilter(16,bw=32,bh=32,ow=16,oh=16) : last<br />
merge(v,last,blend)<br />
x=last<br />
(show==true) ? StackHorizontal(v,x) : x<br />
return last<br />
}</code></div></div><br />
And here are a few images. Left is original, center is blurred, right is the result at the default strength with a block size of 48 (deblur2(bsize=48)).<br />
<br />
<img src="https://i.imgur.com/0J8QYZe.png" loading="lazy"  alt="[Image: 0J8QYZe.png]" class="mycode_img" /><br />
<img src="https://i.imgur.com/pilb4xO.png" loading="lazy"  alt="[Image: pilb4xO.png]" class="mycode_img" />]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Mode Average in Avisynth]]></title>
			<link>https://fanrestore.com/thread-2077.html</link>
			<pubDate>Fri, 09 Mar 2018 07:17:39 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://fanrestore.com/member.php?action=profile&uid=145">nightstalkerpoet</a>]]></dc:creator>
			<guid isPermaLink="false">https://fanrestore.com/thread-2077.html</guid>
			<description><![CDATA[A member on OT sent me Mode.dll for avisynth. I'm not on my project computer - hopefully someone can test this out?<br />
<br />
File attached.<br /><!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://fanrestore.com/images/attachtypes/zip.png" title="ZIP File" border="0" alt=".zip" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a class="attachembed" href="attachment.php?aid=143" target="_blank" title="">Mode.zip</a> (Size: 117.65 KB / Downloads: 3)
<!-- end: postbit_attachments_attachment -->]]></description>
			<content:encoded><![CDATA[A member on OT sent me Mode.dll for avisynth. I'm not on my project computer - hopefully someone can test this out?<br />
<br />
File attached.<br /><!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://fanrestore.com/images/attachtypes/zip.png" title="ZIP File" border="0" alt=".zip" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a class="attachembed" href="attachment.php?aid=143" target="_blank" title="">Mode.zip</a> (Size: 117.65 KB / Downloads: 3)
<!-- end: postbit_attachments_attachment -->]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[loading a source divided in several files]]></title>
			<link>https://fanrestore.com/thread-1539.html</link>
			<pubDate>Fri, 02 Jun 2017 23:35:07 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://fanrestore.com/member.php?action=profile&uid=1">spoRv</a>]]></dc:creator>
			<guid isPermaLink="false">https://fanrestore.com/thread-1539.html</guid>
			<description><![CDATA[I wonder if there is a best way to load a 29.97fps (actually a 59.94 fields per seconds) interlaced source, divided in several parts, like a TV recorded program with commercial breaks cut away, or a laserdisc capture of several sides, and ITVC it, or if they are all the same...<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code># method 1 for MPEG-2<br />
# load all parts on DGindex and save a single d2v file<br />
<br />
LoadPlugin("C:&#92;Program Files (x86)&#92;Avisynth&#92;plugins&#92;dgdecode.dll")<br />
<br />
film=mpeg2source("001-004.d2v").TFM(d2v = "001-004.d2v").TDecimate<br />
...</code></div></div><br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code># method 2 for MPEG-2<br />
# load every part separately and save a d2v file for each one<br />
# then TFM and TDecimate any part<br />
<br />
LoadPlugin("C:&#92;Program Files (x86)&#92;Avisynth&#92;plugins&#92;dgdecode.dll")<br />
<br />
part1=mpeg2source("001.d2v").TFM(d2v = "001.d2v").TDecimate<br />
part2=mpeg2source("002.d2v").TFM(d2v = "002.d2v").TDecimate<br />
part3=mpeg2source("003.d2v").TFM(d2v = "003.d2v").TDecimate<br />
part4=mpeg2source("004.d2v").TFM(d2v = "004.d2v").TDecimate<br />
<br />
film=part1+part2+part3+part4<br />
<br />
...<br />
<br />
# method 2 for avi<br />
# TFM and TDecimate any part<br />
<br />
part1=avisource("001.d2v").TFM.TDecimate<br />
part2=avisource("002.d2v").TFM.TDecimate<br />
part3=avisource("003.d2v").TFM.TDecimate<br />
part4=avisource("004.d2v").TFM.TDecimate<br />
<br />
film=part1+part2+part3+part4</code></div></div><br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code># method 3 for MPEG-2<br />
# load every part separately and save a d2v file for each one<br />
# then TFM any part, and TDecimate the joined result<br />
<br />
LoadPlugin("C:&#92;Program Files (x86)&#92;Avisynth&#92;plugins&#92;dgdecode.dll")<br />
<br />
part1=mpeg2source("001.d2v").TFM(d2v = "001.d2v") <br />
part2=mpeg2source("002.d2v").TFM(d2v = "002.d2v")<br />
part3=mpeg2source("003.d2v").TFM(d2v = "003.d2v")<br />
part4=mpeg2source("004.d2v").TFM(d2v = "004.d2v")<br />
<br />
film=(part1+part2+part3+part4).TDecimate<br />
<br />
...<br />
<br />
# method 3 for avi<br />
# TFM any part, and TDecimate the joined result<br />
<br />
part1=avisource("001.d2v").TFM<br />
part2=avisource("002.d2v").TFM<br />
part3=avisource("003.d2v").TFM<br />
part4=avisource("004.d2v").TFM<br />
<br />
film=(part1+part2+part3+part4).TDecimate</code></div></div><br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code># method 4 for avi<br />
# join all the parts, then TFM and TDecimate<br />
<br />
part1=avisource("001.d2v")<br />
part2=avisource("002.d2v")<br />
part3=avisource("003.d2v")<br />
part4=avisource("004.d2v")<br />
<br />
film=(part1+part2+part3+part4).TFM.TDecimate</code></div></div><br />
I always use method 2 for laserdisc captures; I'm using the same for Harry Potter.]]></description>
			<content:encoded><![CDATA[I wonder if there is a best way to load a 29.97fps (actually a 59.94 fields per seconds) interlaced source, divided in several parts, like a TV recorded program with commercial breaks cut away, or a laserdisc capture of several sides, and ITVC it, or if they are all the same...<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code># method 1 for MPEG-2<br />
# load all parts on DGindex and save a single d2v file<br />
<br />
LoadPlugin("C:&#92;Program Files (x86)&#92;Avisynth&#92;plugins&#92;dgdecode.dll")<br />
<br />
film=mpeg2source("001-004.d2v").TFM(d2v = "001-004.d2v").TDecimate<br />
...</code></div></div><br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code># method 2 for MPEG-2<br />
# load every part separately and save a d2v file for each one<br />
# then TFM and TDecimate any part<br />
<br />
LoadPlugin("C:&#92;Program Files (x86)&#92;Avisynth&#92;plugins&#92;dgdecode.dll")<br />
<br />
part1=mpeg2source("001.d2v").TFM(d2v = "001.d2v").TDecimate<br />
part2=mpeg2source("002.d2v").TFM(d2v = "002.d2v").TDecimate<br />
part3=mpeg2source("003.d2v").TFM(d2v = "003.d2v").TDecimate<br />
part4=mpeg2source("004.d2v").TFM(d2v = "004.d2v").TDecimate<br />
<br />
film=part1+part2+part3+part4<br />
<br />
...<br />
<br />
# method 2 for avi<br />
# TFM and TDecimate any part<br />
<br />
part1=avisource("001.d2v").TFM.TDecimate<br />
part2=avisource("002.d2v").TFM.TDecimate<br />
part3=avisource("003.d2v").TFM.TDecimate<br />
part4=avisource("004.d2v").TFM.TDecimate<br />
<br />
film=part1+part2+part3+part4</code></div></div><br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code># method 3 for MPEG-2<br />
# load every part separately and save a d2v file for each one<br />
# then TFM any part, and TDecimate the joined result<br />
<br />
LoadPlugin("C:&#92;Program Files (x86)&#92;Avisynth&#92;plugins&#92;dgdecode.dll")<br />
<br />
part1=mpeg2source("001.d2v").TFM(d2v = "001.d2v") <br />
part2=mpeg2source("002.d2v").TFM(d2v = "002.d2v")<br />
part3=mpeg2source("003.d2v").TFM(d2v = "003.d2v")<br />
part4=mpeg2source("004.d2v").TFM(d2v = "004.d2v")<br />
<br />
film=(part1+part2+part3+part4).TDecimate<br />
<br />
...<br />
<br />
# method 3 for avi<br />
# TFM any part, and TDecimate the joined result<br />
<br />
part1=avisource("001.d2v").TFM<br />
part2=avisource("002.d2v").TFM<br />
part3=avisource("003.d2v").TFM<br />
part4=avisource("004.d2v").TFM<br />
<br />
film=(part1+part2+part3+part4).TDecimate</code></div></div><br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code># method 4 for avi<br />
# join all the parts, then TFM and TDecimate<br />
<br />
part1=avisource("001.d2v")<br />
part2=avisource("002.d2v")<br />
part3=avisource("003.d2v")<br />
part4=avisource("004.d2v")<br />
<br />
film=(part1+part2+part3+part4).TFM.TDecimate</code></div></div><br />
I always use method 2 for laserdisc captures; I'm using the same for Harry Potter.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[VC1 loading problem and solution]]></title>
			<link>https://fanrestore.com/thread-1466.html</link>
			<pubDate>Mon, 08 May 2017 01:06:25 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://fanrestore.com/member.php?action=profile&uid=1">spoRv</a>]]></dc:creator>
			<guid isPermaLink="false">https://fanrestore.com/thread-1466.html</guid>
			<description><![CDATA[Lately, I had to fight with an m2ts file with video encoded in VC1; loading it with FFvideosource was not possible, and other methods gave me bad and/or missing frames...<br />
<br />
At the end, what I did was to <span style="font-weight: bold;" class="mycode_b">demux just the video track, and remux it using MKVToolnix GUI</span>; after that, FFvideosource accepted the source.<br />
<br />
Hope this could help someone who has the same problem.]]></description>
			<content:encoded><![CDATA[Lately, I had to fight with an m2ts file with video encoded in VC1; loading it with FFvideosource was not possible, and other methods gave me bad and/or missing frames...<br />
<br />
At the end, what I did was to <span style="font-weight: bold;" class="mycode_b">demux just the video track, and remux it using MKVToolnix GUI</span>; after that, FFvideosource accepted the source.<br />
<br />
Hope this could help someone who has the same problem.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[5 pass average (motion compensated)]]></title>
			<link>https://fanrestore.com/thread-1299.html</link>
			<pubDate>Sun, 12 Feb 2017 13:46:25 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://fanrestore.com/member.php?action=profile&uid=122">althor1138</a>]]></dc:creator>
			<guid isPermaLink="false">https://fanrestore.com/thread-1299.html</guid>
			<description><![CDATA[2 scripts here. 1 for 5 pass average. 1 for 3 pass average. I saw no need for two threads about this.<br />
<br />
This should allow for averaging captures from the same source or even different sources that are similar in size and alignment. Mileage might vary <img src="https://fanrestore.com/images/smilies/smile.png" alt="Smile" title="Smile" class="smilie smilie_53" />. I personally use it for making 3 or 5 captures of a laserdisc and averaging it to remove as much noise as possible before moving on to IVTC and DNR. It's up to you to make sure the clips are aligned before feeding them into this function. So make sure to trim beforehand.<br />
<br />
What you'll need:<br />
<br />
avisynth 2.6<br />
interleave (internal filter)<br />
MVTOOLS2 (2.6.0.5 or similar)<br />
temporalsoften (internal filter)<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>Function FivePassAverage(clip pass1,clip pass2,clip pass3, clip pass4, clip pass5)<br />
{<br />
interleave=interleave(pass1,pass2,pass3,pass4,pass5)<br />
super=msuper(interleave,pel=2,mt=true)<br />
multivectors=manalyse(super,multi=true,delta=2,mt=true)<br />
multiclip=mcompensate(interleave,super,multivectors,mt=true,tr=2,center=true)<br />
average=temporalsoften(multiclip,2,255,255,50,2).selectevery(25,12)<br />
return(average)<br />
}</code></div></div><br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>Function ThreePassAverage(clip pass1,clip pass2,clip pass3)<br />
{<br />
interleave=interleave(pass1,pass2,pass3)<br />
super=msuper(interleave,pel=2,mt=true)<br />
multivectors=manalyse(super,multi=true,delta=1,mt=true)<br />
multiclip=mcompensate(interleave,super,multivectors,mt=true,tr=1,center=true)<br />
average=temporalsoften(multiclip,1,255,255,50,2).selectevery(9,4)<br />
return(average)<br />
}</code></div></div>]]></description>
			<content:encoded><![CDATA[2 scripts here. 1 for 5 pass average. 1 for 3 pass average. I saw no need for two threads about this.<br />
<br />
This should allow for averaging captures from the same source or even different sources that are similar in size and alignment. Mileage might vary <img src="https://fanrestore.com/images/smilies/smile.png" alt="Smile" title="Smile" class="smilie smilie_53" />. I personally use it for making 3 or 5 captures of a laserdisc and averaging it to remove as much noise as possible before moving on to IVTC and DNR. It's up to you to make sure the clips are aligned before feeding them into this function. So make sure to trim beforehand.<br />
<br />
What you'll need:<br />
<br />
avisynth 2.6<br />
interleave (internal filter)<br />
MVTOOLS2 (2.6.0.5 or similar)<br />
temporalsoften (internal filter)<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>Function FivePassAverage(clip pass1,clip pass2,clip pass3, clip pass4, clip pass5)<br />
{<br />
interleave=interleave(pass1,pass2,pass3,pass4,pass5)<br />
super=msuper(interleave,pel=2,mt=true)<br />
multivectors=manalyse(super,multi=true,delta=2,mt=true)<br />
multiclip=mcompensate(interleave,super,multivectors,mt=true,tr=2,center=true)<br />
average=temporalsoften(multiclip,2,255,255,50,2).selectevery(25,12)<br />
return(average)<br />
}</code></div></div><br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>Function ThreePassAverage(clip pass1,clip pass2,clip pass3)<br />
{<br />
interleave=interleave(pass1,pass2,pass3)<br />
super=msuper(interleave,pel=2,mt=true)<br />
multivectors=manalyse(super,multi=true,delta=1,mt=true)<br />
multiclip=mcompensate(interleave,super,multivectors,mt=true,tr=1,center=true)<br />
average=temporalsoften(multiclip,1,255,255,50,2).selectevery(9,4)<br />
return(average)<br />
}</code></div></div>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[TSMC (Temporal Soften Motion Compensated)(Denoiser)]]></title>
			<link>https://fanrestore.com/thread-1298.html</link>
			<pubDate>Sun, 12 Feb 2017 13:27:08 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://fanrestore.com/member.php?action=profile&uid=122">althor1138</a>]]></dc:creator>
			<guid isPermaLink="false">https://fanrestore.com/thread-1298.html</guid>
			<description><![CDATA[This is perhaps better than LDDENOISE and it's much faster. This is what I use on laserdiscs nowadays as it seems to be better at removing the analog noise of laserdiscs.<br />
<br />
It's quite simple actually and the dependencies are only:<br />
<br />
Avisynth 2.6<br />
Temporal Soften (this is an internal filter)<br />
MVTOOLS2 (version 2.6.0.5 or higher)<br />
<br />
The only things you really need to tinker with are tradius(temporal radius) and mthresh(motion threshold). Everything else I never change but I put them in as options in case you want to change the blocksize, for example. The only thing I ever adjust actually is mthresh.<br />
<br />
mthresh=70 will denoise basically only stationary stuff.<br />
mthresh=120 will denoise slightly moving stuff.<br />
mthresh=180 will denoise moving stuff but not extremely high motion.<br />
<br />
Anything over 180(depending on the source) can start to risk loss of detail that, imo, is unacceptable. However, 70-120 denoises A LOT but still looks good.<br />
<br />
These numbers above are based on a few sources that I've tested. Every source is different and requires tweaking. Feeding an already denoised clip via auxclip helps mvtools in 2 ways. It will be more precise when calculating motion vectors and prevents mvtools from thinking that noise is motion. This will allow you to use the same settings more or less. What I mean is that, for example, mthresh=140 will give kind of the same results in different clips. I usually use a motion compensated fft3d denoiser for this as it denoises well even when there is motion without artifacting.<br />
<a href="https://github.com/althor1138/FFTMC-Avisynth" target="_blank" rel="noopener" class="mycode_url">FFTMC</a><br />
<br />
Here is the function for TSMC. Download the avsi and place it into your plugins folder.<br />
<a href="https://github.com/althor1138/TSMC-Avisynth" target="_blank" rel="noopener" class="mycode_url">TSMC</a><br />
<br />
EDIT: I also wanted to add that if anybody has any ideas to make this better feel free to chime in. I'm by no means an avisynth guru and am open to improvement!<br />
<br />
A quick how to use avisynth and this denoiser:<br />
<br />
1) Go download avisynth 2.6 or avs+ and install it:<br />
<a href="https://github.com/pinterf/AviSynthPlus/releases" target="_blank" rel="noopener" class="mycode_url">https://github.com/pinterf/AviSynthPlus/releases</a><br />
I recommend going with avs+ as it's regularly maintained by Pinterf and has many newer features.<br />
<br />
2) Download mvtools2. Navigate to the avisynth folder in Program Files and extract the mvtools2.dll file into the plugins folder inside the avisynth folder.<br />
<a href="https://github.com/pinterf/mvtools/releases" target="_blank" rel="noopener" class="mycode_url">https://github.com/pinterf/mvtools/releases</a><br />
Again, I recommend Pinterf's version as it is more up to date with more features.<br />
<br />
3) Go to the TSMC link above and save TSMC.avsi to your avisynth plugins folder.<br />
<br />
4) open notepad and write a script to load the video file and denoise it. Here's an example:<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>Source=avisource("c:&#92;temp&#92;starwars.avi")<br />
FFTclip=fftmc(Source,2,1,500,4,2,0)<br />
TSMC(Source,3,120,255,4,FFTclip)</code></div></div><br />
Save this wherever you want it as starwars.avs or whatever you want to name it. Just make sure you have .avs as the extension.<br />
<br />
5) Open Virtualdub. Navigate to your starwars.avs file and open it in virtualdub. It should pop up in virtualdub already denoised via avisynth.]]></description>
			<content:encoded><![CDATA[This is perhaps better than LDDENOISE and it's much faster. This is what I use on laserdiscs nowadays as it seems to be better at removing the analog noise of laserdiscs.<br />
<br />
It's quite simple actually and the dependencies are only:<br />
<br />
Avisynth 2.6<br />
Temporal Soften (this is an internal filter)<br />
MVTOOLS2 (version 2.6.0.5 or higher)<br />
<br />
The only things you really need to tinker with are tradius(temporal radius) and mthresh(motion threshold). Everything else I never change but I put them in as options in case you want to change the blocksize, for example. The only thing I ever adjust actually is mthresh.<br />
<br />
mthresh=70 will denoise basically only stationary stuff.<br />
mthresh=120 will denoise slightly moving stuff.<br />
mthresh=180 will denoise moving stuff but not extremely high motion.<br />
<br />
Anything over 180(depending on the source) can start to risk loss of detail that, imo, is unacceptable. However, 70-120 denoises A LOT but still looks good.<br />
<br />
These numbers above are based on a few sources that I've tested. Every source is different and requires tweaking. Feeding an already denoised clip via auxclip helps mvtools in 2 ways. It will be more precise when calculating motion vectors and prevents mvtools from thinking that noise is motion. This will allow you to use the same settings more or less. What I mean is that, for example, mthresh=140 will give kind of the same results in different clips. I usually use a motion compensated fft3d denoiser for this as it denoises well even when there is motion without artifacting.<br />
<a href="https://github.com/althor1138/FFTMC-Avisynth" target="_blank" rel="noopener" class="mycode_url">FFTMC</a><br />
<br />
Here is the function for TSMC. Download the avsi and place it into your plugins folder.<br />
<a href="https://github.com/althor1138/TSMC-Avisynth" target="_blank" rel="noopener" class="mycode_url">TSMC</a><br />
<br />
EDIT: I also wanted to add that if anybody has any ideas to make this better feel free to chime in. I'm by no means an avisynth guru and am open to improvement!<br />
<br />
A quick how to use avisynth and this denoiser:<br />
<br />
1) Go download avisynth 2.6 or avs+ and install it:<br />
<a href="https://github.com/pinterf/AviSynthPlus/releases" target="_blank" rel="noopener" class="mycode_url">https://github.com/pinterf/AviSynthPlus/releases</a><br />
I recommend going with avs+ as it's regularly maintained by Pinterf and has many newer features.<br />
<br />
2) Download mvtools2. Navigate to the avisynth folder in Program Files and extract the mvtools2.dll file into the plugins folder inside the avisynth folder.<br />
<a href="https://github.com/pinterf/mvtools/releases" target="_blank" rel="noopener" class="mycode_url">https://github.com/pinterf/mvtools/releases</a><br />
Again, I recommend Pinterf's version as it is more up to date with more features.<br />
<br />
3) Go to the TSMC link above and save TSMC.avsi to your avisynth plugins folder.<br />
<br />
4) open notepad and write a script to load the video file and denoise it. Here's an example:<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>Source=avisource("c:&#92;temp&#92;starwars.avi")<br />
FFTclip=fftmc(Source,2,1,500,4,2,0)<br />
TSMC(Source,3,120,255,4,FFTclip)</code></div></div><br />
Save this wherever you want it as starwars.avs or whatever you want to name it. Just make sure you have .avs as the extension.<br />
<br />
5) Open Virtualdub. Navigate to your starwars.avs file and open it in virtualdub. It should pop up in virtualdub already denoised via avisynth.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[LD Denoiser]]></title>
			<link>https://fanrestore.com/thread-1251.html</link>
			<pubDate>Sun, 15 Jan 2017 03:16:00 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://fanrestore.com/member.php?action=profile&uid=1">spoRv</a>]]></dc:creator>
			<guid isPermaLink="false">https://fanrestore.com/thread-1251.html</guid>
			<description><![CDATA[This is a denoiser made by althor1138 and posted on OT a long time ago; I think it could be useful for someone here, too.<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>function LDdenoise(clip input, float "strength", int "mc", int "temporalframes",&#92;<br />
int "blksize", int "search", int "searchparam", int "overlap", int "dct")<br />
{<br />
<br />
# Set default options. <br />
<br />
strength=default(strength,1)<br />
    temporalframes=default(temporalframes,1)<br />
mc = default(mc, 0)<br />
<br />
# Prepare supersampled clip.<br />
<br />
super = input.MSuper(levels=6,chroma=true)<br />
 <br />
# Motion vector search.<br />
<br />
b5vec = MAnalyse(super, delta=5, isb=true,chroma=true, search=search, searchparam=searchparam, overlap=overlap, dct=dct)<br />
b4vec = MAnalyse(super, delta=4, isb=true,chroma=true, search=search, searchparam=searchparam, overlap=overlap, blksize=blksize, dct=dct)<br />
b3vec = MAnalyse(super, delta=3, isb=true,chroma=true, search=search, searchparam=searchparam, overlap=overlap, blksize=blksize, dct=dct)<br />
b2vec = MAnalyse(super, delta=2, isb=true,chroma=true, search=search, searchparam=searchparam, overlap=overlap, blksize=blksize, dct=dct)<br />
b1vec = MAnalyse(super, delta=1, isb=true,chroma=true, search=search, searchparam=searchparam, overlap=overlap, blksize=blksize, dct=dct)<br />
f1vec = MAnalyse(super, delta=1, chroma=true, search=search, searchparam=searchparam, overlap=overlap, blksize=blksize, dct=dct)<br />
f2vec = MAnalyse(super, delta=2, chroma=true, search=search, searchparam=searchparam, overlap=overlap, blksize=blksize, dct=dct)<br />
f3vec = MAnalyse(super, delta=3, chroma=true, search=search, searchparam=searchparam, overlap=overlap, blksize=blksize, dct=dct)<br />
f4vec = MAnalyse(super, delta=4, chroma=true, search=search, searchparam=searchparam, overlap=overlap, blksize=blksize, dct=dct)<br />
f5vec = MAnalyse(super, delta=5, chroma=true, search=search, searchparam=searchparam, overlap=overlap, blksize=blksize, dct=dct)<br />
 <br />
# Motion Compensation.<br />
<br />
b5clip = MCompensate(input,super, b5vec)<br />
b4clip = MCompensate(input,super, b4vec)<br />
b3clip = MCompensate(input,super, b3vec)<br />
b2clip = MCompensate(input,super, b2vec)<br />
b1clip = MCompensate(input,super, b1vec)<br />
f1clip = MCompensate(input,super, f1vec)<br />
f2clip = MCompensate(input,super, f2vec)<br />
f3clip = MCompensate(input,super, f3vec)<br />
f4clip = MCompensate(input,super, f4vec)<br />
f5clip = MCompensate(input,super, f5vec)<br />
 <br />
# Create compensated clip.<br />
<br />
interleaved = mc &gt;= 5 ? Interleave(f5clip, f4clip, f3clip, f2clip, f1clip, input, b1clip, b2clip, b3clip, b4clip, b5clip) :<br />
&#92; mc == 4 ? Interleave(f4clip, f3clip, f2clip, f1clip, input, b1clip, b2clip, b3clip, b4clip) :<br />
&#92; mc == 3 ? Interleave(f3clip, f2clip, f1clip, input, b1clip, b2clip, b3clip) :<br />
&#92; mc == 2 ? Interleave(f2clip, f1clip, input, b1clip, b2clip) :<br />
&#92; mc == 1 ? Interleave(f1clip, input, b1clip):<br />
&#92; input<br />
 <br />
#Perform DFTTEST<br />
<br />
params="""dfttest(y=true,u=true,v=true,f0beta=0.5,sigma=0,dither=0,sbsize=25,sosize=20,tbsize="""+string(temporalframes)+""",tosize="""+string(temporalframes)+"""/3,nstring=&#92;<br />
    "a:"""+string(strength)+""" &#92;<br />
    "+string(current_frame)+",0,440,10 &#92;<br />
    "+string(current_frame)+",0,10,10 &#92;<br />
    "+string(current_frame)+",0,10,340 &#92;<br />
    "+string(current_frame)+",0,10,680 &#92;<br />
    "+string(current_frame)+",0,440,680 &#92;<br />
    "+string(current_frame)+",1,440/2,3 &#92;<br />
    "+string(current_frame)+",1,3,3 &#92;<br />
    "+string(current_frame)+",1,3,340/2 &#92;<br />
    "+string(current_frame)+",1,3,680/2 &#92;<br />
    "+string(current_frame)+",1,440/2,350 &#92;<br />
    "+string(current_frame)+",2,120,3 &#92;<br />
    "+string(current_frame)+",2,3,3 &#92;<br />
    "+string(current_frame)+",2,3,340/2 &#92;<br />
    "+string(current_frame)+",2,3,680/2 &#92;<br />
    "+string(current_frame)+",2,440/2,680/2")<br />
    """<br />
filter=eval("scriptclip(interleaved,params)")<br />
return SelectEvery(filter, mc * 2 + 1,mc)<br />
<br />
}<br />
<br />
function LDdenoise2(clip input, float "strength", int "mc", int "temporalframes",&#92;<br />
int "blksize", int "search", int "searchparam", int "overlap", int "dct")<br />
{<br />
<br />
# Set default options. <br />
<br />
width=width(input)<br />
height=height(input)<br />
strength=default(strength,1)<br />
temporalframes=default(temporalframes,1)<br />
mc = default(mc, 0)<br />
<br />
# Prepare supersampled clip.<br />
<br />
super = input.MSuper(levels=6,chroma=true)<br />
<br />
# Motion vector search.<br />
<br />
b5vec = MAnalyse(super, delta=5, isb=true,chroma=true, search=search, searchparam=searchparam, overlap=overlap, dct=dct)<br />
b4vec = MAnalyse(super, delta=4, isb=true,chroma=true, search=search, searchparam=searchparam, overlap=overlap, blksize=blksize, dct=dct)<br />
b3vec = MAnalyse(super, delta=3, isb=true,chroma=true, search=search, searchparam=searchparam, overlap=overlap, blksize=blksize, dct=dct)<br />
b2vec = MAnalyse(super, delta=2, isb=true,chroma=true, search=search, searchparam=searchparam, overlap=overlap, blksize=blksize, dct=dct)<br />
b1vec = MAnalyse(super, delta=1, isb=true,chroma=true, search=search, searchparam=searchparam, overlap=overlap, blksize=blksize, dct=dct)<br />
f1vec = MAnalyse(super, delta=1, chroma=true, search=search, searchparam=searchparam, overlap=overlap, blksize=blksize, dct=dct)<br />
f2vec = MAnalyse(super, delta=2, chroma=true, search=search, searchparam=searchparam, overlap=overlap, blksize=blksize, dct=dct)<br />
f3vec = MAnalyse(super, delta=3, chroma=true, search=search, searchparam=searchparam, overlap=overlap, blksize=blksize, dct=dct)<br />
f4vec = MAnalyse(super, delta=4, chroma=true, search=search, searchparam=searchparam, overlap=overlap, blksize=blksize, dct=dct)<br />
f5vec = MAnalyse(super, delta=5, chroma=true, search=search, searchparam=searchparam, overlap=overlap, blksize=blksize, dct=dct)<br />
<br />
# Motion Compensation.<br />
<br />
b5clip = MCompensate(input,super, b5vec)<br />
b4clip = MCompensate(input,super, b4vec)<br />
b3clip = MCompensate(input,super, b3vec)<br />
b2clip = MCompensate(input,super, b2vec)<br />
b1clip = MCompensate(input,super, b1vec)<br />
f1clip = MCompensate(input,super, f1vec)<br />
f2clip = MCompensate(input,super, f2vec)<br />
f3clip = MCompensate(input,super, f3vec)<br />
f4clip = MCompensate(input,super, f4vec)<br />
f5clip = MCompensate(input,super, f5vec)<br />
<br />
# Create compensated clip.<br />
<br />
interleaved = mc &gt;= 5 ? Interleave(f5clip, f4clip, f3clip, f2clip, f1clip, input, b1clip, b2clip, b3clip, b4clip, b5clip) :<br />
&#92; mc == 4 ? Interleave(f4clip, f3clip, f2clip, f1clip, input, b1clip, b2clip, b3clip, b4clip) :<br />
&#92; mc == 3 ? Interleave(f3clip, f2clip, f1clip, input, b1clip, b2clip, b3clip) :<br />
&#92; mc == 2 ? Interleave(f2clip, f1clip, input, b1clip, b2clip) :<br />
&#92; mc == 1 ? Interleave(f1clip, input, b1clip):<br />
&#92; input<br />
<br />
#Perform DFTTEST<br />
<br />
yparams="""dfttest(y=true,u=false,v=false,f0beta=0.5,sigma=0,dither=0,sbsize=25,sosize=20,tbsize="""+string(temporalframes)+""",tosize="""+string(temporalframes)+"""/3,nstring=&#92;<br />
"a:"""+string(strength)+""" &#92;<br />
"+string(current_frame)+",0,"""+string(height-40)+""",10 &#92;<br />
"+string(current_frame)+",0,10,10 &#92;<br />
"+string(current_frame)+",0,10,"""+string(width/4)+""" &#92;<br />
"+string(current_frame)+",0,10,"""+string(width/2)+""" &#92;<br />
"+string(current_frame)+",0,10,"""+string(width/1.5)+""" &#92;<br />
"+string(current_frame)+",0,10,"""+string(width-40)+""" &#92;<br />
"+string(current_frame)+",0,"""+string(height-40)+""","""+string(width-40)+""" ")<br />
"""<br />
<br />
<br />
yfilter=eval("scriptclip(interleaved,yparams)")<br />
<br />
uvparams="""dfttest(y=false,u=true,v=true,f0beta=0.5,sigma=0,dither=0,sbsize=25,sosize=20,tbsize="""+string(temporalframes)+""",tosize="""+string(temporalframes)+"""/3,nstring=&#92;<br />
"a:"""+string(strength)+""" &#92;<br />
"+string(current_frame)+",1,"""+string((height/2)-30)+""",3 &#92;<br />
"+string(current_frame)+",1,3,3 &#92;<br />
"+string(current_frame)+",1,3,"""+string((width/2)/2)+""" &#92;<br />
"+string(current_frame)+",1,3,"""+string((width/2)-30)+""" &#92;<br />
"+string(current_frame)+",1,"""+string((height/2)-30)+""","""+string((width/2)-30)+""" &#92;<br />
"+string(current_frame)+",2,"""+string((height/2)-30)+""",3 &#92;<br />
"+string(current_frame)+",2,3,3 &#92;<br />
"+string(current_frame)+",2,3,"""+string((width/2)/2)+""" &#92;<br />
"+string(current_frame)+",2,3,"""+string((width/2)-30)+""" &#92;<br />
"+string(current_frame)+",2,"""+string((height/2)-30)+""","""+string((width/2)-30)+""" ")<br />
"""<br />
<br />
uvfilter=eval("scriptclip(yfilter,uvparams)")<br />
<br />
return SelectEvery(uvfilter, mc * 2 + 1,mc)<br />
<br />
}</code></div></div>]]></description>
			<content:encoded><![CDATA[This is a denoiser made by althor1138 and posted on OT a long time ago; I think it could be useful for someone here, too.<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>function LDdenoise(clip input, float "strength", int "mc", int "temporalframes",&#92;<br />
int "blksize", int "search", int "searchparam", int "overlap", int "dct")<br />
{<br />
<br />
# Set default options. <br />
<br />
strength=default(strength,1)<br />
    temporalframes=default(temporalframes,1)<br />
mc = default(mc, 0)<br />
<br />
# Prepare supersampled clip.<br />
<br />
super = input.MSuper(levels=6,chroma=true)<br />
 <br />
# Motion vector search.<br />
<br />
b5vec = MAnalyse(super, delta=5, isb=true,chroma=true, search=search, searchparam=searchparam, overlap=overlap, dct=dct)<br />
b4vec = MAnalyse(super, delta=4, isb=true,chroma=true, search=search, searchparam=searchparam, overlap=overlap, blksize=blksize, dct=dct)<br />
b3vec = MAnalyse(super, delta=3, isb=true,chroma=true, search=search, searchparam=searchparam, overlap=overlap, blksize=blksize, dct=dct)<br />
b2vec = MAnalyse(super, delta=2, isb=true,chroma=true, search=search, searchparam=searchparam, overlap=overlap, blksize=blksize, dct=dct)<br />
b1vec = MAnalyse(super, delta=1, isb=true,chroma=true, search=search, searchparam=searchparam, overlap=overlap, blksize=blksize, dct=dct)<br />
f1vec = MAnalyse(super, delta=1, chroma=true, search=search, searchparam=searchparam, overlap=overlap, blksize=blksize, dct=dct)<br />
f2vec = MAnalyse(super, delta=2, chroma=true, search=search, searchparam=searchparam, overlap=overlap, blksize=blksize, dct=dct)<br />
f3vec = MAnalyse(super, delta=3, chroma=true, search=search, searchparam=searchparam, overlap=overlap, blksize=blksize, dct=dct)<br />
f4vec = MAnalyse(super, delta=4, chroma=true, search=search, searchparam=searchparam, overlap=overlap, blksize=blksize, dct=dct)<br />
f5vec = MAnalyse(super, delta=5, chroma=true, search=search, searchparam=searchparam, overlap=overlap, blksize=blksize, dct=dct)<br />
 <br />
# Motion Compensation.<br />
<br />
b5clip = MCompensate(input,super, b5vec)<br />
b4clip = MCompensate(input,super, b4vec)<br />
b3clip = MCompensate(input,super, b3vec)<br />
b2clip = MCompensate(input,super, b2vec)<br />
b1clip = MCompensate(input,super, b1vec)<br />
f1clip = MCompensate(input,super, f1vec)<br />
f2clip = MCompensate(input,super, f2vec)<br />
f3clip = MCompensate(input,super, f3vec)<br />
f4clip = MCompensate(input,super, f4vec)<br />
f5clip = MCompensate(input,super, f5vec)<br />
 <br />
# Create compensated clip.<br />
<br />
interleaved = mc &gt;= 5 ? Interleave(f5clip, f4clip, f3clip, f2clip, f1clip, input, b1clip, b2clip, b3clip, b4clip, b5clip) :<br />
&#92; mc == 4 ? Interleave(f4clip, f3clip, f2clip, f1clip, input, b1clip, b2clip, b3clip, b4clip) :<br />
&#92; mc == 3 ? Interleave(f3clip, f2clip, f1clip, input, b1clip, b2clip, b3clip) :<br />
&#92; mc == 2 ? Interleave(f2clip, f1clip, input, b1clip, b2clip) :<br />
&#92; mc == 1 ? Interleave(f1clip, input, b1clip):<br />
&#92; input<br />
 <br />
#Perform DFTTEST<br />
<br />
params="""dfttest(y=true,u=true,v=true,f0beta=0.5,sigma=0,dither=0,sbsize=25,sosize=20,tbsize="""+string(temporalframes)+""",tosize="""+string(temporalframes)+"""/3,nstring=&#92;<br />
    "a:"""+string(strength)+""" &#92;<br />
    "+string(current_frame)+",0,440,10 &#92;<br />
    "+string(current_frame)+",0,10,10 &#92;<br />
    "+string(current_frame)+",0,10,340 &#92;<br />
    "+string(current_frame)+",0,10,680 &#92;<br />
    "+string(current_frame)+",0,440,680 &#92;<br />
    "+string(current_frame)+",1,440/2,3 &#92;<br />
    "+string(current_frame)+",1,3,3 &#92;<br />
    "+string(current_frame)+",1,3,340/2 &#92;<br />
    "+string(current_frame)+",1,3,680/2 &#92;<br />
    "+string(current_frame)+",1,440/2,350 &#92;<br />
    "+string(current_frame)+",2,120,3 &#92;<br />
    "+string(current_frame)+",2,3,3 &#92;<br />
    "+string(current_frame)+",2,3,340/2 &#92;<br />
    "+string(current_frame)+",2,3,680/2 &#92;<br />
    "+string(current_frame)+",2,440/2,680/2")<br />
    """<br />
filter=eval("scriptclip(interleaved,params)")<br />
return SelectEvery(filter, mc * 2 + 1,mc)<br />
<br />
}<br />
<br />
function LDdenoise2(clip input, float "strength", int "mc", int "temporalframes",&#92;<br />
int "blksize", int "search", int "searchparam", int "overlap", int "dct")<br />
{<br />
<br />
# Set default options. <br />
<br />
width=width(input)<br />
height=height(input)<br />
strength=default(strength,1)<br />
temporalframes=default(temporalframes,1)<br />
mc = default(mc, 0)<br />
<br />
# Prepare supersampled clip.<br />
<br />
super = input.MSuper(levels=6,chroma=true)<br />
<br />
# Motion vector search.<br />
<br />
b5vec = MAnalyse(super, delta=5, isb=true,chroma=true, search=search, searchparam=searchparam, overlap=overlap, dct=dct)<br />
b4vec = MAnalyse(super, delta=4, isb=true,chroma=true, search=search, searchparam=searchparam, overlap=overlap, blksize=blksize, dct=dct)<br />
b3vec = MAnalyse(super, delta=3, isb=true,chroma=true, search=search, searchparam=searchparam, overlap=overlap, blksize=blksize, dct=dct)<br />
b2vec = MAnalyse(super, delta=2, isb=true,chroma=true, search=search, searchparam=searchparam, overlap=overlap, blksize=blksize, dct=dct)<br />
b1vec = MAnalyse(super, delta=1, isb=true,chroma=true, search=search, searchparam=searchparam, overlap=overlap, blksize=blksize, dct=dct)<br />
f1vec = MAnalyse(super, delta=1, chroma=true, search=search, searchparam=searchparam, overlap=overlap, blksize=blksize, dct=dct)<br />
f2vec = MAnalyse(super, delta=2, chroma=true, search=search, searchparam=searchparam, overlap=overlap, blksize=blksize, dct=dct)<br />
f3vec = MAnalyse(super, delta=3, chroma=true, search=search, searchparam=searchparam, overlap=overlap, blksize=blksize, dct=dct)<br />
f4vec = MAnalyse(super, delta=4, chroma=true, search=search, searchparam=searchparam, overlap=overlap, blksize=blksize, dct=dct)<br />
f5vec = MAnalyse(super, delta=5, chroma=true, search=search, searchparam=searchparam, overlap=overlap, blksize=blksize, dct=dct)<br />
<br />
# Motion Compensation.<br />
<br />
b5clip = MCompensate(input,super, b5vec)<br />
b4clip = MCompensate(input,super, b4vec)<br />
b3clip = MCompensate(input,super, b3vec)<br />
b2clip = MCompensate(input,super, b2vec)<br />
b1clip = MCompensate(input,super, b1vec)<br />
f1clip = MCompensate(input,super, f1vec)<br />
f2clip = MCompensate(input,super, f2vec)<br />
f3clip = MCompensate(input,super, f3vec)<br />
f4clip = MCompensate(input,super, f4vec)<br />
f5clip = MCompensate(input,super, f5vec)<br />
<br />
# Create compensated clip.<br />
<br />
interleaved = mc &gt;= 5 ? Interleave(f5clip, f4clip, f3clip, f2clip, f1clip, input, b1clip, b2clip, b3clip, b4clip, b5clip) :<br />
&#92; mc == 4 ? Interleave(f4clip, f3clip, f2clip, f1clip, input, b1clip, b2clip, b3clip, b4clip) :<br />
&#92; mc == 3 ? Interleave(f3clip, f2clip, f1clip, input, b1clip, b2clip, b3clip) :<br />
&#92; mc == 2 ? Interleave(f2clip, f1clip, input, b1clip, b2clip) :<br />
&#92; mc == 1 ? Interleave(f1clip, input, b1clip):<br />
&#92; input<br />
<br />
#Perform DFTTEST<br />
<br />
yparams="""dfttest(y=true,u=false,v=false,f0beta=0.5,sigma=0,dither=0,sbsize=25,sosize=20,tbsize="""+string(temporalframes)+""",tosize="""+string(temporalframes)+"""/3,nstring=&#92;<br />
"a:"""+string(strength)+""" &#92;<br />
"+string(current_frame)+",0,"""+string(height-40)+""",10 &#92;<br />
"+string(current_frame)+",0,10,10 &#92;<br />
"+string(current_frame)+",0,10,"""+string(width/4)+""" &#92;<br />
"+string(current_frame)+",0,10,"""+string(width/2)+""" &#92;<br />
"+string(current_frame)+",0,10,"""+string(width/1.5)+""" &#92;<br />
"+string(current_frame)+",0,10,"""+string(width-40)+""" &#92;<br />
"+string(current_frame)+",0,"""+string(height-40)+""","""+string(width-40)+""" ")<br />
"""<br />
<br />
<br />
yfilter=eval("scriptclip(interleaved,yparams)")<br />
<br />
uvparams="""dfttest(y=false,u=true,v=true,f0beta=0.5,sigma=0,dither=0,sbsize=25,sosize=20,tbsize="""+string(temporalframes)+""",tosize="""+string(temporalframes)+"""/3,nstring=&#92;<br />
"a:"""+string(strength)+""" &#92;<br />
"+string(current_frame)+",1,"""+string((height/2)-30)+""",3 &#92;<br />
"+string(current_frame)+",1,3,3 &#92;<br />
"+string(current_frame)+",1,3,"""+string((width/2)/2)+""" &#92;<br />
"+string(current_frame)+",1,3,"""+string((width/2)-30)+""" &#92;<br />
"+string(current_frame)+",1,"""+string((height/2)-30)+""","""+string((width/2)-30)+""" &#92;<br />
"+string(current_frame)+",2,"""+string((height/2)-30)+""",3 &#92;<br />
"+string(current_frame)+",2,3,3 &#92;<br />
"+string(current_frame)+",2,3,"""+string((width/2)/2)+""" &#92;<br />
"+string(current_frame)+",2,3,"""+string((width/2)-30)+""" &#92;<br />
"+string(current_frame)+",2,"""+string((height/2)-30)+""","""+string((width/2)-30)+""" ")<br />
"""<br />
<br />
uvfilter=eval("scriptclip(yfilter,uvparams)")<br />
<br />
return SelectEvery(uvfilter, mc * 2 + 1,mc)<br />
<br />
}</code></div></div>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Fix analog capture color problems]]></title>
			<link>https://fanrestore.com/thread-1250.html</link>
			<pubDate>Sun, 15 Jan 2017 03:08:51 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://fanrestore.com/member.php?action=profile&uid=1">spoRv</a>]]></dc:creator>
			<guid isPermaLink="false">https://fanrestore.com/thread-1250.html</guid>
			<description><![CDATA[A very simple but effective way to eliminate cross colors, rainbows, and other "nice gifts" we can find in our analog captures, in particular from composite formast, like the darling VHS and our beloved laserdisc.<br />
<br />
It reduce chroma at 1/4th of the original; don't worry, because even the best Super-NTSC encoded laserdisc will barely suffer using this function; just try and let me know! Thanks to antcuufaalb!!!<br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>function lowchromanoise (clip clip) {<br />
clip<br />
SeparateFields<br />
Spline16Resize(clip.width/4,clip.height/2)<br />
Spline16Resize(clip.width,clip.height/2)<br />
Weave<br />
MergeLuma(clip)<br />
}</code></div></div>]]></description>
			<content:encoded><![CDATA[A very simple but effective way to eliminate cross colors, rainbows, and other "nice gifts" we can find in our analog captures, in particular from composite formast, like the darling VHS and our beloved laserdisc.<br />
<br />
It reduce chroma at 1/4th of the original; don't worry, because even the best Super-NTSC encoded laserdisc will barely suffer using this function; just try and let me know! Thanks to antcuufaalb!!!<br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>function lowchromanoise (clip clip) {<br />
clip<br />
SeparateFields<br />
Spline16Resize(clip.width/4,clip.height/2)<br />
Spline16Resize(clip.width,clip.height/2)<br />
Weave<br />
MergeLuma(clip)<br />
}</code></div></div>]]></content:encoded>
		</item>
	</channel>
</rss>