This was initially posted in "ask a question get an answer" but I felt it needed to be posted in a new topic now.
It turned out that videos encoded with the settings shown in the encode.bat would glitch out on Youtube. See this:
http://www.youtube.com/watch?v=YFNJAAgkcqM
(The video was dumped uncompressed RGB24, then I compressed it in lagarith lossless, and then I encoded it with x264).
I'm worried about the loss of brightness in Luigi's green color.
See here: https://twitter.com/mugg1991/status/273695358096379904/photo/1 (Lagarith lossless actually keeps it bright as in the original, it seems)
So now I have already run out of options. I can't encode the video and keep Luigi's color bright at the same time. The '--output-csp rgb' made it so it keeps bright, but it somehow causes Youtube to glitch. What now?
I hope someone can help...
It's probably avisynth that's leaking. Consider running avisynth in a separate process (like avs2pipemod).
Youtube x264 uploads should always be 8 bit 4:2:0 yuv limited range. Lossy or lossless works. MP4 may work, but I've had best success with MKV. 601 vs 709 doesn't matter because it will be wrong no matter what.
I don't understand any of this.
Please explain it to me like I'm five.
In the meantime, I got the package from here. But neither the 512kb option nor the Youtube HD option works.
When I tried the 512kb option, I got an error saying that it wants zlib1.dll, so I grabbed it from the previous folder. Then I got these:
It means that you're running out of memory.
Those 512kb commands are way too much for big res.
EDIT: This is the 709, what you should use on your HD script. Just copy it and paste it.
This seems to prevent x264 from running out of memory. But it doesn't fix the darkened color mentioned here. Also the resulting mp4 would be a little over 1 GB which is borderline ok (I have yet to encode the full video). I wish it were closer to 700 MB or less.
EDIT:
The video is 1.78 GB which is not ok anymore. And It doesn't have any sound for some reason.
Do you know how to fix the dark color?
Thanks for the help so far.
The colors will be wrong on youtube no matter what you do. Even if you get something that looks correct on your computer. Youtube displays with different color matrices depending on all sorts of specifics of operating system, graphics card, and settings.
-- Using the tasvideos encoding guide's scripts:
I would still like to know why I cannot encode 512 or HD Youtube. How can I prevent those "run out of memory" messages?
Perhaps I should use it with a raw video taken from the emulator rather than this 720p lagarith file.
-- Audio missing
For now I suspect it's some error in my avs or something. I'm busy, can't check it right now.
EDIT: I can't find the problem. When the avs is opened in vdub, the audio is there. But after encoding it with x264, the audio is mute.
EDIT: The 32bit x264 that Guga linked here does not produce any audio. I don't know why I didn't figure this out earlier. So I'm going to stick to the x264 I had.
-- Youtube messes up the color regardless
That's too bad... Does it also mess up the color if it is encoded with the tasvideos' guide's scripts?
-- File size minimizing
I will try.
You need to encode the audio separatedly (e.g. using venc) and mux it in using e.g. mkvmerge (part of mkvtoolnix).
It will mess colors up no matter what you do.
The problem is follows:
The display wants (and video camera spits out) the signal as red, green and blue intensities. Works very well for input/output of video signal.
But, red, green and blue intensities doesn't work very well for video compression. Instead, normally for video compression, the signal is transformed into brightness, redness and blueness.
The way the transformation between these two (Red,Green,Blue and Brightness,Redness,Blueness) is done is known as the color matrix.
If the encoder and decoder are using the same matrix, the colors will come up correctly. Conversely, if the matrices do not match, the colors wil be incorrect.
Now, what matrix does flash use? It depends on hardware, OS version, resolution and if playback is windowed or fullscreen.
Thus, no matter what matrix you choose when encoding, it will be incorrect for some players. The video you did no doubt has correct colors for someone else (not just for you). If you encode it so it has correct colors for you, it will be incorrect for that somebody else.
Joined: 4/17/2010
Posts: 11495
Location: Lake Chargoggagoggmanchauggagoggchaubunagungamaugg
This line scares me. HOW did you manage to get lossless video of 720p in the first place?? Doesn't Manual say, dump lossless from emulator as described here?
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Ilari: Thanks, this clears up a lot of things.
feos: I dumped it uncompressed. But when I experienced the memory leak and couldn't encode the video, I decided to splice all the video parts into one and compressed it with Lagarith. Probably it doesn't work well with the tasvideos guide scripts?
In a crappy* test, using option 4 of the tasvideos encoding script (Youtube HD), I got this outcome:
http://www.youtube.com/watch?v=78E0X0JINdU
Luigi's green color is as bright as it should be. So, why didn't Youtube mess up the color in this video?
____
*the video seems to be lagging for me, probably because I'm watching too many livestreams
Joined: 4/17/2010
Posts: 11495
Location: Lake Chargoggagoggmanchauggagoggchaubunagungamaugg
You said it was 720p. How did you get that at all? You must not be able to get that from the emulator for the platform you encode. The guide says you dump a losslessly compressed video and it's all, you give it to the script+x264.
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
The video I linked in my previous post is what happened when I really gave it a lossless unchanged AVI.
Everything prior to that, I used the said spliced file. I used avisynth to pointresize it and compressed it to Lagarith in virtualdub.
I need to figure out how I can make the video that I originally wanted to make, by changing the tasvideos scripts around...
At best, someone can point out why the color turned out correct in the linked video so I can just make use of that alone - without having to touch long complicated scripts.
Joined: 4/17/2010
Posts: 11495
Location: Lake Chargoggagoggmanchauggagoggchaubunagungamaugg
Then what, you tried to compress the 720p video lossily? Wow, why do such comlicated things at all? If you ONLY need the Youtuber, dump losslessly, point-upscale lossily, and there you go. You can add the framerate reduction. Everything may be perfectly done in VirtualDub.
Video - Filters - Add - resize - Filter mode - Nearest neigbour. New size - Relative - 400
Video - Frame Rate - Convert to fps - 30 or 25
Video - Compression - x264vfw - Configure:
Preset -> Ultrafast
Tuning -> Animation
Rate control -> Single pass - ratefactor-based
Ratefactor - 5 or 10.
Zero latency must be checked!
But this is not necessary, you can directly upload the upscaled vid you got to YT.
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Thanks for the help.
I successfully encoded and uploaded my video, with the correct colors and no issues.
I modified the tasvideos AVS to remove the deblinking and tasblend (because I think it makes things look ugly) and I output in 720p. I changed the BAT to be --qp 10 instead of 0 to minimize the file size a bit.
Joined: 4/17/2010
Posts: 11495
Location: Lake Chargoggagoggmanchauggagoggchaubunagungamaugg
It happens only on previews. After actual encoding only the things that really blink become transparent. Try encoding that segment for test.
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
That image is from the encode. And everything else that blinks also ends up like this.
Such blending is good for games like Trip World where underwater sections make sprites flicker at 30 hz. Or for background graphics that flicker at 30 hz such as the doors in Kirby & The Amazing Mirror.
But stuff that blinks or shakes for only a duration of 5 frames shouldn't be blended. But as said, it appears blended in the encode - I don't know what you mean by "it only happens in the preview".