Post subject: Could Someone Please Look Into This?
Joined: 3/20/2010
Posts: 126
When I uploaded my Oracle of Ages video to Youtube, for some reason, some of the audio glitches out, such as at 19:54-21:14, or any time the cavern theme is playing... http://www.youtube.com/watch?v=QGzhnOAE-Vw I used this script for encoding... a = AVISource("Zelda (2).avi").ConvertToRGB32().Trim(0,-0) # Replace -0 with the last frame of the movie to be displayed, or # leave it as is if no trimming is required. # Set this to true if this is a handheld console to disable aspect correction handheld = true # Should we reduce the FPS (by default, to 30FPS)? # This may need to be adjusted to account for other fps = true # If fps is true and tb is false, what frame rate should we use? targetfps = 30 # Should we use TASBlend for FPS reduction? # This is only enabled if fps is true. tb = true # Script functionality starts here. function TASBlend(clip c, float "ratio") { # reduces framerate to 1/2 but leaves flicker effects partly visible # blends frame pairs with alternating opacity (default is 2/3+1/3;1/3+2/3) # optional "ratio" is the opacity of the first frame out of the four ratio = default(ratio, 2.0 / 3) opacity1 = round((1 - ratio) * 257) opacity2 = round(( ratio) * 257) c Interleave(Layer(SelectEvery(4, 0), SelectEvery(4, 1), level=opacity1), \ Layer(SelectEvery(4, 2), SelectEvery(4, 3), level=opacity2)) } function gcd(int x, int y) { t = x % y x = y y = t return (y > 0) ? gcd(x, y) : x } (handheld) ? Eval(""" factor = (a.height > 540) ? 2 : \ (a.height > 270) ? 4 : \ (a.height > 180) ? 6 : 8 width = a.width * factor height = a.height * factor multi = factor """) : Eval(""" w1 = a.height * 4 h1 = a.width * 3 thegcd = gcd(w1, h1) w1 = w1 * 2 / thegcd h1 = h1 * 2 / thegcd width = a.width * w1 height = a.height * h1 multi = h1 """) last = a.PointResize(width, height) fps ? (tb ? TASBlend() : ChangeFPS(targetfps)) : last ConvertToYV24(matrix="Rec709", chromaresample="point") ConvertToYV12(matrix="Rec709", chromaresample="point") And I have x264, FLAC, and MKVmerge for encoding. So, does anyone have an idea about what might be going on?
Post subject: Re: Could Someone Please Look Into This?
Emulator Coder, Skilled player (1141)
Joined: 5/1/2010
Posts: 1217
FionordeQuester wrote:
When I uploaded my Oracle of Ages video to Youtube, for some reason, some of the audio glitches out, <snip> And I have x264, FLAC, and MKVmerge for encoding.
FLAC... There's your problem. The FLAC support on Youtube is broken. Use Vorbis at -q10 instead.
Joined: 3/20/2010
Posts: 126
I see. And will my MKV merge command still work for that? Or am I going to have to replace the script?
Emulator Coder, Skilled player (1141)
Joined: 5/1/2010
Posts: 1217
FionordeQuester wrote:
I see. And will my MKV merge command still work for that? Or am I going to have to replace the script?
Yes, it'll work (modulo any possible filename changes).
Joined: 3/20/2010
Posts: 126
I see. And what's the audio encoding command for Vorbis? I looked in the Hybrid Encode Script, but couldn't find anything referred to as "Vorbis" with Ctrl + F.
Emulator Coder, Skilled player (1141)
Joined: 5/1/2010
Posts: 1217
FionordeQuester wrote:
I see. And what's the audio encoding command for Vorbis? I looked in the Hybrid Encode Script, but couldn't find anything referred to as "Vorbis" with Ctrl + F.
oggenc2 -q 10 audio.wav
Joined: 3/20/2010
Posts: 126
Cool. Thanks a bunch Ilari! That audio command you sent me didn't work, but then I figured out the encode anyways, which was ACTUALLY supposed to be... venc -q10 ".wav" Anyways though, one other thing I'm wondering about though...the colors in my video seem a little dark for Oracle of Ages... http://www.youtube.com/watch?v=nxuHMAOvzi4 ...Do you know of any way that I might be able to fix that?
Emulator Coder, Skilled player (1141)
Joined: 5/1/2010
Posts: 1217
FionordeQuester wrote:
I figured out the encode anyways, which was ACTUALLY supposed to be... venc -q10 ".wav"
Yeah, there are multiple Vorbis encoders. One is called oggenc2 (then there is plain oggenc too) and then there's venc. And probably a few others.
FionordeQuester wrote:
Anyways though, one other thing I'm wondering about though...the colors in my video seem a little dark for Oracle of Ages...
I didn't see anything obviously wrong with the encoding script color conversion... Not that it is possible to get the colors right with Youtube (thanks to pile of crap that is flash). And too dark... That would happen if PC-range signal was decoded as TV-range. You aren't passing "--range PC" or similar flags to x264?
Joined: 3/20/2010
Posts: 126
Well, here's the video encode that I use... x264 --colorprim bt709 --transfer bt709 --colormatrix bt709 --qp -8 --keyint infinite --output ".mp4" .avs Perhaps that will help?
Emulator Coder, Skilled player (1141)
Joined: 5/1/2010
Posts: 1217
FionordeQuester wrote:
x264 --colorprim bt709 --transfer bt709 --colormatrix bt709 --qp -8 --keyint infinite --output ".mp4" .avs
I don't see anything wrong with it (albeit --qp -8 is quite bizarre, --qp 0 is already lossless). So I have no idea why the colors are too dark (unless it is player-side screw-up)...
Joined: 3/20/2010
Posts: 126
Huh...well maybe it really is just Youtube then. Or just my imagination (though I don't think that's the case). But, are you saying that -8 is excessive?
Emulator Coder, Skilled player (1141)
Joined: 5/1/2010
Posts: 1217
FionordeQuester wrote:
But, are you saying that -8 is excessive?
QP 0 is already bit-for-bit exact, so going lower than that has no effect. (Negative CRF values are another matter, since CRF scale goes to -6 for 9-bit and to -12 for 10-bit).