<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[SmoothVideo Project — 10-bit to 8-bit conversion colour banding]]></title>
		<link>https://www.svp-team.com/forum/viewtopic.php?id=5527</link>
		<atom:link href="https://www.svp-team.com/forum/extern.php?action=feed&amp;tid=5527&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in 10-bit to 8-bit conversion colour banding.]]></description>
		<lastBuildDate>Mon, 23 Dec 2019 08:59:20 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: 10-bit to 8-bit conversion colour banding]]></title>
			<link>https://www.svp-team.com/forum/viewtopic.php?pid=74395#p74395</link>
			<description><![CDATA[<p>That appears to be working just fine for me.&nbsp; I disallowed 10-bit output and put &quot;;deband&quot; in the lavfi line, and I got an 8-bit file and it appears much better than the previous version.&nbsp; Thank you very much for taking the time to look into this, and coming up with a fix.&nbsp; Much appreciated.</p><div class="codebox"><pre><code>00:37:43.507: ===== Starting mpv ======
00:37:43.507: Command line: C:\Program Files (x86)\SVP 4\mpv64\mpv.exe C:/temp5/test1-short.mkv -o C:/temp5/test1-short.SVP.temporary.mkv --no-audio --no-sub --no-sub-auto --input-ipc-server=mpvencodepipe --input-media-keys=no --no-msg-color --vf=vapoursynth:[C:\Users\Clay\AppData\Roaming\SVP4\scripts\ffff.py]:4:12,lavfi=[deband] --of=matroska --ovc=libx264 --ovcopts=preset=superfast,crf=18,threads=12
00:37:43.546: (+) Video --vid=1 (*) (hevc 3840x2160 25.000fps)
00:37:43.546: Audio --aid=1 (*) (ac3 6ch 48000Hz)
00:37:43.546: Audio --aid=2 (*) (eac3 6ch 48000Hz)
00:37:45.443: VO: [lavc] 3840x2160 yuv420p
00:37:45.444: [vo/lavc] Opening encoder: libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 [libx264]
00:37:45.444: [ffmpeg] libx264: MB rate (777600000) &gt; level limit (16711680)
00:37:45.462: [encode] Opening output file: C:/temp5/test1-short.SVP.temporary.mkv
00:37:45.463: [encode] Opening muxer: Matroska [matroska]
00:37:45.495: [KV: 00:00:00 / 00:00:04 (1%) {0.0min 0.0MB}
00:37:54.503: [encode] video: encoded 28153705 bytes
00:37:54.503: [encode] audio: encoded 0 bytes
00:37:54.503: [encode] muxing overhead 2976 bytes
00:37:54.508: Exiting... (End of file)
00:37:54.581: ===== Starting mkvmerge ======
00:37:54.581: Command line: C:\Program Files (x86)\SVP 4\extensions\code\mkvmerge.exe -o C:/temp5/test1-short.SVP.mkv C:/temp5/test1-short.SVP.temporary.mkv -D C:/temp5/test1-short.mkv
00:37:54.635: mkvmerge v35.0.0 (&#039;All The Love In The World&#039;) 32-bit
00:37:54.652: &#039;C:/temp5/test1-short.SVP.temporary.mkv&#039;: Using the demultiplexer for the format &#039;Matroska&#039;.
00:37:54.668: &#039;C:/temp5/test1-short.mkv&#039;: Using the demultiplexer for the format &#039;Matroska&#039;.
00:37:54.668: &#039;C:/temp5/test1-short.SVP.temporary.mkv&#039; track 0: Using the output module for the format &#039;AVC/h.264&#039;.
00:37:54.669: &#039;C:/temp5/test1-short.mkv&#039; track 1: Using the output module for the format &#039;AC-3&#039;.
00:37:54.669: &#039;C:/temp5/test1-short.mkv&#039; track 2: Using the output module for the format &#039;AC-3&#039;.
00:37:54.669: The file &#039;C:/temp5/test1-short.SVP.mkv&#039; has been opened for writing.
00:37:54.682: Progress: 27%
00:37:54.741: Progress: 100%
00:37:54.741: The cue entries (the index) are being written...
00:37:54.751: Multiplexing took 0 seconds.</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (_Shorty)]]></author>
			<pubDate>Mon, 23 Dec 2019 08:59:20 +0000</pubDate>
			<guid>https://www.svp-team.com/forum/viewtopic.php?pid=74395#p74395</guid>
		</item>
		<item>
			<title><![CDATA[Re: 10-bit to 8-bit conversion colour banding]]></title>
			<link>https://www.svp-team.com/forum/viewtopic.php?pid=74394#p74394</link>
			<description><![CDATA[<div class="quotebox"><cite>Chainik wrote:</cite><blockquote><p>in this log you just re-encoded 10-bit source as 10-bit, w/o any conversion at all</p><p>---<br />update to the latest SVP rev.182 (it includes dithering in the Vaporsynth script) and put deband filter into lavfi field</p></blockquote></div><p>Yes, I was confirming the behaviour you were saying I should see since the option did not actually exist, and how a mistake I made had me thinking it was successfully converted when in fact it was not.</p><p>Thanks!&nbsp; I will try the update now.</p>]]></description>
			<author><![CDATA[null@example.com (_Shorty)]]></author>
			<pubDate>Mon, 23 Dec 2019 08:34:30 +0000</pubDate>
			<guid>https://www.svp-team.com/forum/viewtopic.php?pid=74394#p74394</guid>
		</item>
		<item>
			<title><![CDATA[Re: 10-bit to 8-bit conversion colour banding]]></title>
			<link>https://www.svp-team.com/forum/viewtopic.php?pid=74393#p74393</link>
			<description><![CDATA[<p>in this log you just re-encoded 10-bit source as 10-bit, w/o any conversion at all</p><p>---<br />update to the latest SVP rev.182 (it includes dithering in the Vaporsynth script) and put deband filter into lavfi field</p>]]></description>
			<author><![CDATA[null@example.com (Chainik)]]></author>
			<pubDate>Mon, 23 Dec 2019 07:18:41 +0000</pubDate>
			<guid>https://www.svp-team.com/forum/viewtopic.php?pid=74393#p74393</guid>
		</item>
		<item>
			<title><![CDATA[Re: 10-bit to 8-bit conversion colour banding]]></title>
			<link>https://www.svp-team.com/forum/viewtopic.php?pid=74392#p74392</link>
			<description><![CDATA[<p>Oh, for crying out loud.&nbsp; I see what I did now.&nbsp; Ok, at some point during various file edit/copy operations I ended up saving some x264 lossless source files that were edited to just some short test segments.&nbsp; And for some of them I had let Handbrake do the 10-bit to 8-bit conversion, which I was using just for testing various CRF values.&nbsp; And when I got back to testing the SVP stuff again really late that night it appears I may have been selecting those pre-converted files as my source.&nbsp; And that&#039;s apparently how I ended up with 8-bit conversions that looked ok with the non-existent ovcopts pix_fmt option.&nbsp; Argh.&nbsp; Sorry for that waste of a bit of time.</p>]]></description>
			<author><![CDATA[null@example.com (_Shorty)]]></author>
			<pubDate>Mon, 23 Dec 2019 01:46:10 +0000</pubDate>
			<guid>https://www.svp-team.com/forum/viewtopic.php?pid=74392#p74392</guid>
		</item>
		<item>
			<title><![CDATA[Re: 10-bit to 8-bit conversion colour banding]]></title>
			<link>https://www.svp-team.com/forum/viewtopic.php?pid=74391#p74391</link>
			<description><![CDATA[<p>My mistake!&nbsp; I am seeing the same thing you&#039;re seeing now.</p><div class="codebox"><pre><code>16:46:36.162: ===== Starting mpv ======
16:46:36.162: Command line: C:\Program Files (x86)\SVP 4\mpv64\mpv.exe C:/temp5/test2.mkv -o C:/temp5/test2.SVP.temporary.mkv --no-audio --no-sub --no-sub-auto --input-ipc-server=mpvencodepipe --input-media-keys=no --no-msg-color --vf=vapoursynth:[C:\Users\Clay\AppData\Roaming\SVP4\scripts\ffff.py]:4:12 --of=matroska --ovc=libx264 --ovcopts=preset=superfast,crf=18,pix_fmt=yuv420p,threads=12
16:46:36.198: (+) Video --vid=1 (*) (hevc 3840x2160 25.000fps)
16:46:36.198: Audio --aid=1 (*) (ac3 6ch 48000Hz)
16:46:36.198: Audio --aid=2 (*) (eac3 6ch 48000Hz)
16:46:37.175: VO: [lavc] 3840x2160 yuv420p10
16:46:37.185: [vo/lavc] AVOption &#039;pix_fmt&#039; not found.
16:46:37.189: [vo/lavc] Opening encoder: libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 [libx264]
16:46:37.190: [ffmpeg] libx264: MB rate (777600000) &gt; level limit (16711680)
16:46:37.225: [encode] Opening output file: C:/temp5/test2.SVP.temporary.mkv
16:46:37.225: [encode] Opening muxer: Matroska [matroska]
16:46:37.250: [KV: 00:00:00 / 00:00:20 (0%) {0.0min 0.0MB}
16:46:40.972: Script exceeded memory limit. Consider raising cache size.
16:47:17.760: [encode] video: encoded 69755088 bytes
16:47:17.760: [encode] audio: encoded 0 bytes
16:47:17.760: [encode] muxing overhead 10694 bytes
16:47:17.764: Exiting... (End of file)
16:47:17.840: ===== Starting mkvmerge ======
16:47:17.840: Command line: C:\Program Files (x86)\SVP 4\extensions\code\mkvmerge.exe -o C:/temp5/test2.SVP.mkv C:/temp5/test2.SVP.temporary.mkv -D C:/temp5/test2.mkv
16:47:17.894: mkvmerge v35.0.0 (&#039;All The Love In The World&#039;) 32-bit
16:47:17.906: &#039;C:/temp5/test2.SVP.temporary.mkv&#039;: Using the demultiplexer for the format &#039;Matroska&#039;.
16:47:17.931: &#039;C:/temp5/test2.mkv&#039;: Using the demultiplexer for the format &#039;Matroska&#039;.
16:47:17.931: &#039;C:/temp5/test2.SVP.temporary.mkv&#039; track 0: Using the output module for the format &#039;AVC/h.264&#039;.
16:47:17.931: &#039;C:/temp5/test2.mkv&#039; track 1: Using the output module for the format &#039;AC-3&#039;.
16:47:17.931: &#039;C:/temp5/test2.mkv&#039; track 2: Using the output module for the format &#039;AC-3&#039;.
16:47:17.932: The file &#039;C:/temp5/test2.SVP.mkv&#039; has been opened for writing.
16:47:17.944: Progress: 9%
16:47:18.112: Progress: 100%
16:47:18.112: The cue entries (the index) are being written...
16:47:18.121: Multiplexing took 0 seconds.</code></pre></div><p>So now I&#039;m confused as to what I ended up doing to end up with the 8-bit file that turned out with a better conversion.&nbsp; Going to have to see if I can remember what steps I ended up taking to get here from there.&nbsp; I could&#039;ve sworn that&#039;s all I did, pix_fmt=yuv420p, but apparently that can&#039;t be correct.&nbsp; Hmm...</p>]]></description>
			<author><![CDATA[null@example.com (_Shorty)]]></author>
			<pubDate>Mon, 23 Dec 2019 00:54:06 +0000</pubDate>
			<guid>https://www.svp-team.com/forum/viewtopic.php?pid=74391#p74391</guid>
		</item>
		<item>
			<title><![CDATA[Re: 10-bit to 8-bit conversion colour banding]]></title>
			<link>https://www.svp-team.com/forum/viewtopic.php?pid=74389#p74389</link>
			<description><![CDATA[<p>&gt; Putting &quot;pix_fmt=yuv420p&quot; in ovcopts works</p><p>please post the transcoder log here</p>]]></description>
			<author><![CDATA[null@example.com (Chainik)]]></author>
			<pubDate>Sun, 22 Dec 2019 12:39:00 +0000</pubDate>
			<guid>https://www.svp-team.com/forum/viewtopic.php?pid=74389#p74389</guid>
		</item>
		<item>
			<title><![CDATA[Re: 10-bit to 8-bit conversion colour banding]]></title>
			<link>https://www.svp-team.com/forum/viewtopic.php?pid=74388#p74388</link>
			<description><![CDATA[<p>As I said, lavfi: &quot;;format...&quot; does not work.&nbsp; It produced the same incorrect output as &quot;allow 10-bit&quot; off did.&nbsp; Putting &quot;pix_fmt=yuv420p&quot; in ovcopts works.&nbsp; I&#039;ve got output files that I am not imagining that show this to be the case.&nbsp; They actually exist on my machine, hehe. <img src="https://www.svp-team.com/forum/img/smilies/wink.png" width="15" height="15" alt="wink" />&nbsp; In case it wasn&#039;t clear, I am talking about transcoding, which means ffmpeg, no?&nbsp; Doesn&#039;t vo/lavc have to do with the player and not the encoder?&nbsp; Do you not use ffmpeg to encode?&nbsp; Because I see ffmpeg.exe in SVP&#039;s utils directory.&nbsp; Encoding with ffmpeg means --pix_fmt is a valid option, which also happens to provide correct output files.&nbsp; And I thought that&#039;s what the ovcopts were when you were using libx264/libx265, ffmpeg command line options.&nbsp; Sure seems to be the case, since it worked.</p>]]></description>
			<author><![CDATA[null@example.com (_Shorty)]]></author>
			<pubDate>Sun, 22 Dec 2019 10:02:25 +0000</pubDate>
			<guid>https://www.svp-team.com/forum/viewtopic.php?pid=74388#p74388</guid>
		</item>
		<item>
			<title><![CDATA[Re: 10-bit to 8-bit conversion colour banding]]></title>
			<link>https://www.svp-team.com/forum/viewtopic.php?pid=74366#p74366</link>
			<description><![CDATA[<p>&gt;(4) probably even better than (<strong>2</strong>)</p><p>Than (3) you mean?</p>]]></description>
			<author><![CDATA[null@example.com (James D)]]></author>
			<pubDate>Fri, 20 Dec 2019 20:38:50 +0000</pubDate>
			<guid>https://www.svp-team.com/forum/viewtopic.php?pid=74366#p74366</guid>
		</item>
		<item>
			<title><![CDATA[Re: 10-bit to 8-bit conversion colour banding]]></title>
			<link>https://www.svp-team.com/forum/viewtopic.php?pid=74355#p74355</link>
			<description><![CDATA[<p>&gt; pix_fmt<strong>s</strong></p><p>it&#039;s a conversion filter, not an encoder option - <a href="https://ffmpeg.org/ffmpeg-filters.html#format-1">https://ffmpeg.org/ffmpeg-filters.html#format-1</a></p><p>&gt; This worked, though!<br />&gt; ovcopts: pix_fmt=yuv420p</p><p>how? <img src="https://www.svp-team.com/forum/img/smilies/hmm.png" width="15" height="15" alt="hmm" /> <br /></p><div class="quotebox"><blockquote><p>[vo/lavc] AVOption &#039;pix_fmt&#039; not found.</p></blockquote></div><br /><p>===<br />1. How SVP works by default:<br />&lt;10-bit after decoder&gt; --&gt; &lt;10-to-8 Vapoursynth conversion w/o dithering&gt; --&gt; &lt;motion interpolation in 8-bit&gt; --&gt; &lt;8-bit encoder&gt;<br />&quot;allow 10-bit&quot; OFF</p><p>2. Proposed method via lav filters:<br />&lt;10-bit after decoder&gt; --&gt; &lt;no Vapoursynth conversion&gt; --&gt; &lt;motion interpolation in 10-bit&gt; --&gt; &lt;10-to-8 lavfi conversion&gt; --&gt; &lt;8-bit encoder&gt;<br />&quot;allow 10-bit&quot; ON, lavfi: &quot;;format=pix_fmts=yuv420p&quot;</p><p>3. Other possible solution:<br />&lt;10-bit after decoder&gt; --&gt; &lt;10-to-8 Vapoursynth conversion <strong>with dithering</strong>&gt; --&gt; &lt;motion interpolation in 8-bit&gt; --&gt; &lt;8-bit encoder&gt;<br />&quot;allow 10-bit&quot; OFF, needs editing SVP/script/generate.js, line 397:<br /></p><div class="quotebox"><blockquote><p>res += bl+&#039;input_um = clip.resize.&#039;+(media.is420 ? &#039;Point&#039;:&#039;Bicubic&#039;)+&#039;(format=vs.YUV420&#039;+(media.p10?&#039;P10&#039;:&#039;P8&#039;)+&#039;<strong>,dither_type=&quot;random&quot;</strong>)&#039;+br;</p></blockquote></div><p>4. One more...<br />&lt;10-bit after decoder&gt; --&gt; &lt;10-to-8 Vapoursynth conversion&gt; --&gt; &lt;motion interpolation in 8-bit&gt; --&gt; &lt;lavfi deband filter&gt; --&gt; &lt;8-bit encoder&gt;<br />&quot;allow 10-bit&quot; OFF, lavfi: &quot;;deband&quot;</p><p>5. And more...<br />&lt;10-bit after decoder&gt; --&gt; &lt;some super-duper Vapoursynth conversion script including deband via f3kdb plugin&gt; --&gt; &lt;motion interpolation in 8-bit&gt; --&gt; &lt;8-bit encoder&gt;</p><p>(1) obviously the worst<br />(2) the best (?) but slowest<br />(3) better than (1) and worse than (2) in quality, but should be noticeable faster than (2)<br />(4) probably even better than (2)<br />(5) have not tried, the best possible quality (in theory) + slowest processing</p><p>===<br />Conclusion: we&#039;ll insert &quot;deband&quot; filter in case of 10-to-8 conversion in the next build</p>]]></description>
			<author><![CDATA[null@example.com (Chainik)]]></author>
			<pubDate>Fri, 20 Dec 2019 08:06:45 +0000</pubDate>
			<guid>https://www.svp-team.com/forum/viewtopic.php?pid=74355#p74355</guid>
		</item>
		<item>
			<title><![CDATA[Re: 10-bit to 8-bit conversion colour banding]]></title>
			<link>https://www.svp-team.com/forum/viewtopic.php?pid=74353#p74353</link>
			<description><![CDATA[<p>This doesn&#039;t appear to work.&nbsp; It looks the same as when disallowing 10-bit output.</p><p>lavfi: ;format=pix_fmts=yuv420p</p><p>I think there might be something wrong with that, or the lavfi documentation is incorrect.</p><p><a href="https://ffmpeg.org/ffmpeg.html">https://ffmpeg.org/ffmpeg.html</a></p><p>The section on pixel format states:</p><p>&quot;-pix_fmt[:stream_specifier] format (input/output,per-stream)<br />Set pixel format. Use -pix_fmts to show all the supported pixel formats.&quot;</p><p>So it appears -pix_fmt is for setting the format, and -pix_fmts is for getting a list of available formats.&nbsp; I get an error if I remove the s from it, though. <br /> Anyway, back on topic...</p><p>This worked, though!</p><p>ovcopts: pix_fmt=yuv420p</p><p>The output from that, with 10-bit output allowed, gives an 8-bit output file that looks very similar to the Handbrake output.&nbsp; So that will work just great!&nbsp; Here&#039;s the test sample if you&#039;re still curious.&nbsp; Thanks again for the help.</p><p><a href="https://www.dropbox.com/s/idedyznh71do0ei/test1-short.mkv?dl=0">https://www.dropbox.com/s/idedyznh71do0 … t.mkv?dl=0</a></p>]]></description>
			<author><![CDATA[null@example.com (_Shorty)]]></author>
			<pubDate>Thu, 19 Dec 2019 21:36:50 +0000</pubDate>
			<guid>https://www.svp-team.com/forum/viewtopic.php?pid=74353#p74353</guid>
		</item>
		<item>
			<title><![CDATA[Re: 10-bit to 8-bit conversion colour banding]]></title>
			<link>https://www.svp-team.com/forum/viewtopic.php?pid=74352#p74352</link>
			<description><![CDATA[<p>There&#039;re number of options to try.</p><p>1. Move 10-to-8-bits conversion to ffmpeg: turn ON &quot;allow 10-bit output&quot; and encode in &quot;advanced mode&quot;:<br />- ovc: libx264<br />- ovcopts: preset=slow, crf=18, profile=high<br />- lavfi: &quot;;format=pix_fmts=yuv420p&quot; - w/o quotes, note &#039;;&#039; at the beginning!</p>]]></description>
			<author><![CDATA[null@example.com (Chainik)]]></author>
			<pubDate>Thu, 19 Dec 2019 15:02:12 +0000</pubDate>
			<guid>https://www.svp-team.com/forum/viewtopic.php?pid=74352#p74352</guid>
		</item>
		<item>
			<title><![CDATA[Re: 10-bit to 8-bit conversion colour banding]]></title>
			<link>https://www.svp-team.com/forum/viewtopic.php?pid=74351#p74351</link>
			<description><![CDATA[<p>&gt; Gave it a try on a small sample</p><p>could you share that small sample?</p>]]></description>
			<author><![CDATA[null@example.com (Chainik)]]></author>
			<pubDate>Thu, 19 Dec 2019 13:44:58 +0000</pubDate>
			<guid>https://www.svp-team.com/forum/viewtopic.php?pid=74351#p74351</guid>
		</item>
		<item>
			<title><![CDATA[Re: 10-bit to 8-bit conversion colour banding]]></title>
			<link>https://www.svp-team.com/forum/viewtopic.php?pid=74350#p74350</link>
			<description><![CDATA[<p>I turned &quot;Allow 10-bit output&quot; in SVP off, as I thought that was the way to get it to convert the 10-bit source to 8-bit.</p>]]></description>
			<author><![CDATA[null@example.com (_Shorty)]]></author>
			<pubDate>Thu, 19 Dec 2019 13:41:07 +0000</pubDate>
			<guid>https://www.svp-team.com/forum/viewtopic.php?pid=74350#p74350</guid>
		</item>
		<item>
			<title><![CDATA[Re: 10-bit to 8-bit conversion colour banding]]></title>
			<link>https://www.svp-team.com/forum/viewtopic.php?pid=74349#p74349</link>
			<description><![CDATA[<p>&quot;allow 10-bit output&quot; in SVP - on or off? try both values.</p><p>----<br />ahhh, this&#039;s stupid <img src="https://www.svp-team.com/forum/img/smilies/big_smile.png" width="15" height="15" alt="big_smile" /> cause it will automatically select 10-bit profile for x264</p>]]></description>
			<author><![CDATA[null@example.com (Chainik)]]></author>
			<pubDate>Thu, 19 Dec 2019 13:37:14 +0000</pubDate>
			<guid>https://www.svp-team.com/forum/viewtopic.php?pid=74349#p74349</guid>
		</item>
		<item>
			<title><![CDATA[Re: 10-bit to 8-bit conversion colour banding]]></title>
			<link>https://www.svp-team.com/forum/viewtopic.php?pid=74348#p74348</link>
			<description><![CDATA[<p>Gave it a try on a small sample that I had noticed the issue on, and it doesn&#039;t really appear to be doing much.&nbsp; Tried looking at the difference between the two SVP images in Photoshop with a difference blend, and the difference image was almost completely black, as in there was very little change, so perhaps the issue is not in the workflow position that --deband would affect things.&nbsp; Here is a small portion of the sky in a particular frame that illustrates the banding issue.&nbsp; If you mouse-over on the four different labels or press the corresponding number on your keyboard it will switch between those four samples.&nbsp; One is the 10-bit original, one is the 8-bit conversion done by Handbrake, one is SVP 8-bit, and finally one is SVP 8-bit with --deband.&nbsp; This is from the very first frame of the test sample, so the frame shouldn&#039;t be any different between each sample, other than colour conversion.</p><p><a href="http://www.framecompare.com/image-compare/screenshotcomparison/JMBMFNNU">http://www.framecompare.com/image-compa … n/JMBMFNNU</a></p><p>edit:&nbsp; Both Handbrake and SVP were using x264 medium CRF 18.</p>]]></description>
			<author><![CDATA[null@example.com (_Shorty)]]></author>
			<pubDate>Thu, 19 Dec 2019 13:09:46 +0000</pubDate>
			<guid>https://www.svp-team.com/forum/viewtopic.php?pid=74348#p74348</guid>
		</item>
	</channel>
</rss>
