View Full Version : Use ColourLike on a mkv?


thrakk
16th September 2011, 20:52
Is there a way to WriteHistogram for a mkv (h264) with ColourLike (http://forum.doom9.org/showthread.php?t=96308)?

jmac698
16th September 2011, 21:21
yes of course, it's just two lines:

directshowsource("c:\MyVideos\video.mkv")
writehistogram("c:\MyVideos\video-histogram.txt")

thrakk
16th September 2011, 21:23
I can't find a program that will let me run that avisynth script

ganymede
16th September 2011, 22:36
avs2avi (http://moitah.net/) script.avs -o n -c null

jmac698
16th September 2011, 22:47
You could try avspmod, which also includes the avs2avi above I belive.
http://www.videohelp.com/tools/AvsP
Open the program (click the downloaded file avspmod, there is no install.. click direclty from the unzipped file)
Paste those two lines to test it, you'll have to adjust your file names of the example
Click Tools->Save to AVI. This runs the same thing as avs2avi. (If that didn't work, download avs2avi separately and put it with avspmod, and adjust Options in avsmod, Options->Program Settings->Paths)
Hope you can get it working from there...

Mounir
16th September 2011, 23:22
use DGAVC index instead of directshowsource (support elementary stream .h264 not .mkv)

TheRyuu
17th September 2011, 00:10
yes of course, it's just two lines:

directshowsource("c:\MyVideos\video.mkv")
writehistogram("c:\MyVideos\video-histogram.txt")


Why would you even suggest directshowsource. There are better alternatives (ffms2) that I'm pretty sure you're aware of. If you HAVE to use directshowsource at least use dss2 which is (probably maybe) frame accurate and even then it's a bad idea. Even if he doesn't need the frame accuracy it's still a bad idea to use directshowsource.

use DGAVC index instead of directshowsource (support elementary stream .h264 not .mkv)

He should be using ffms2. There's no reason to use DGAVCIndex on such a file.

thrakk
17th September 2011, 05:06
Great stuff!

Initial testing seems to show a bunch of numbers having been written to a histogram.txt file. It must be working.

I'm glad to know that I should be using FFVideoSource. I downloaded that plugin and have even attempted to install it with the plugins on my ImTOO Video Converter Ultimate 6 (as well as avisynth 2.6 obviously). ImTooVCU6 is my favorite way to downgrade HD to mpeg2. It lets you use CBR which doesn't seem to be available with ImTOO's Mpeg Encoder series or HCenc (etc..). Recently I added an autoloading ColorMatrix script to ImTooVCU6 and it seems to have worked. I don't see why the updated FFMS2 shouldn't work.

From all the different ways I have converted HD to SD in the past, it seems that you have to do some tweaking ~no matter what~ after the video has been converted. That's where ColourLike will hopefully come in handy.

Thanks again, everyone

jmac698
17th September 2011, 05:13
I didn't mean to be starting a religious war :)
For a straight pass, I have no problem with directshowsource.. it's really all the same, as I am using ffdshow which has same codebase as ffms AFAIK
on the other hand, I never saw the point of dgindex..

thrakk
18th September 2011, 23:46
hmmm, after looking at the results of my downscaled files, ImToo isn't as good as HCenc. Whatever

-------------------------

a couple quick questions:

1.) What program could I use to permanently encode the ColourLike results into my .m2v? The code I've written looks something like this:
FFVideoSource("C:\BattleRoyale\spline36resize.m2v")
colourlike("C:\BattleRoyale\dvd96.txt", "C:\BattleRoyale\mk96.txt")
Should I just stick the colourlike code into the script (below) for when I do my original downsize? If so, should I use colourlike before or after the resize?

2.) Here is the code I used with HCenc when I downsized the mkv to m2v:
FFVideoSource("C:\BattleRoyale\br.mkv")
ColorMatrix("Rec.709->Rec.601",interlaced=false)
spline36resize(720,480)
Is there a better way to resize? I went from 1080 to 720. I've been testing out different scalers...
Does anyone have any good ideas for additional filters when downscaling? I'm trying to make my DVD as clean looking as possible.

thrakk
24th September 2011, 22:21
http://img4.imageshack.us/img4/9302/mkvmatrixcolourlikematr.png
L->R:MKV, ColorMatrix change only, ColorMatrix/ColourLike/PolarColourLike/Spline36

I'm probably making a big deal out of minor color discrepancies but it would be nicer if I could figure out how to make my DVD better match the original 720p 4:2:0 source

Any ideas?

jmac698
24th September 2011, 22:43
I'd have to say that does look a lot better, colorwise. Where did you find PolarColourLike?
I don't know any better filters, try searching the forums, this has come up before - "downscaling"

thrakk
25th September 2011, 02:13
PolarColourLike is on the main ColourLike thread. You need ColourLike_25Aug05.dll

thrakk
25th September 2011, 02:17
Is there a way to overlap two videos with picking the opacity?

jmac698
25th September 2011, 02:35
overlay(a,b,opacity=.5)

thrakk
25th September 2011, 02:45
thanks

what's a good filter + code for minor sharpening?

jmac698
25th September 2011, 02:51
This is more anime but http://www.aquilinestudios.org/avsfilters/sharpeners.html
I'd probably start with this, but I'm not an expert:
http://avisynth.org/mediawiki/LSFmod