View Full Version : CCE - problems opening files
spanky123
28th November 2006, 16:59
Hi
Just startin with CCE and havin a couple problems. Got all the settings figured out, but havin dramas with gettin some files in there in the first place.
1. I've been trying to open a mpeg-2 video in cce and it gives me error "Gdiploadimagefromfile failed:3". Had a search around but can't find anythin that helps
Can I open mpeg-2's in CCE SP 2.70 or not ? Do I have to use avisynth. If so, is there a guide somewhere?
2. Also, I get the error 'Frame Size 1024x576. Supported framesize is up to 720x576' is not supported when I try import an avi file'. Is this the same problem - that i need to use avisynth to create an avs script or what ?
Are there any gui's to make avisynth scripts so that you can preview the video/picture as you're making the script? Is Gordian Knot ok for this ?
Can I create avisynth scripts in Gordian Knot and just open them in CCE ? Or are they different ?
Thanks. And sorry for the n00b questions. Just starting off with this stuff now
spanky123
29th November 2006, 02:20
Ok. I think I've found something that'll let me do any sized avi to dvd - avi2dvd (http://www.trustfm.net/divx/SoftwareAvi2Dvd.html)
Haven't tried it yet, but it looks good so far. Atleast it uses CCE to encode
I'm still stuck on getting mpeg-2's into cce though. Is there an equivalent to dvd2avi or some other gui that'll get mpeg's into cce ?
Or even better, something that'll accept mpeg-2 and output in dvd format using cce encoder
Any help please. Anyone ?
spanky123
29th November 2006, 10:07
Another update:
I got avsedit and used it to make some .avs scripts.
Now I'm just doing them in notepad. It's working
So far this is what they're looking like:
LoadPlugin("C:\PROGRA~1\GORDIA~1\DGMPGDec\DGDecode.dll")
mpeg2source("C:\Documents and Settings\Administrator\My Documents\Testing\videotest.d2v", idct=0)
crop(88,4,530,568)
LanczosResize(720,576)
This first one was a digital video broadcast in WS but the actual picture was originally 4:3, so I had to crop quite a bit from the sides
And the second:
LoadPlugin("C:\PROGRA~1\GORDIA~1\DGMPGDec\DGDecode.dll")
mpeg2source("C:\Documents and Settings\Administrator\My Documents\video.d2v", idct=0)
ConvertToYV12()
LanczosResize(716,576,0.0,0.6)
AddBorders(2,0,2,0)
Do they look alright ? Anything I should change ?
What's with ConvertToYV12() . . . ?
What's that ConvertToYV12() for ? I seen it somewhere so I added it. I didn't notice a difference between the script that had 'ConvertToYV12' and the one that didn't ?
I understand it's some pixel type or colour but am kinda confused with all the info around the place. Can someone explain it briefly please ?
And should I be including it in my scripts ?
Skelsgard
29th November 2006, 15:37
First of all, welcome.
I assume that you already figured out that you need to export the DGIndex project and this .D2V file is the one you load into the .avs with the DGDecode.dll plugin.
ConvertToYV12() converts the color space to YV12 wich is required as source in CCE. MPEG-2 video is encoded in this color space so the switch is not necessary as your source is MPEG-2.
For the rest, your script looks OK.
Cheers.
PhillipWyllie
29th November 2006, 15:59
CCE requires YUY2 input.If it's not the system codec will do the conversion
Skelsgard
29th November 2006, 16:10
Sorry, my mistake, I was writing about CCE but thinking of MeGUI.
spanky123
29th November 2006, 17:13
Thanks.
So the ConvertToYV12() is not needed ?
Will the system codec do the conversion for all sources ?
What if my source is avi (xvid) ?
How do I know what colour space or pixel format (i thnk thats what its called) my video is ? If it's YV12 or YUY2
spanky123
30th November 2006, 13:38
Anyone ?
Do my scripts look ok ?
Do I need the:
ConvertToYV12() or not ?
miztadux
30th November 2006, 16:37
About ConvertToYV12:
With avisynth >2.0, the default colorspace is YV12.
It means that mpeg2source will output YV12 video, your script will work with it and output YV12 too.
Every "new" codec (divx, xvid, x264,...) works with YV12 as input, so a "default" avisynth script is a perfect source for those, as no color space conversion will occur.
So if you transcode, for example, from xvid to x264, avisynth will work with the YV12 video from xvid and then output YV12 video to x264 => no conversion => good
So basically ConvertToYV12 doesn't do anything in this case....(the video is already YV12)
But CCE, as a mpeg2 encoder, works with YUY2 video.
So if you feed cce with an avisynth 2.x script, it'll need to convert YV12 to YUY2...as PhillipWyllie said, to do so a compatible codec will be used (one that can read YV12 and output YUY2, for example "divx5" can do the trick).
But if you want to be sure to feed CCE a correct video, you can use "ConvertToYuy2" in your avisynth script, this way you trust avisynth to do the color space conversion and not some unknown codec.
(I think Skelsgard wanted to answer you that a "ConvertToYuY2" would be a good idea for cce encode, but he wrote "YV12" where he though "YUY2"...)
So basically:
- ConvertToYV12 is useless
- ConvertToYUY2 is recommended to use with CCE (but introduces quality loss if you plan on using a YV12 based codec)
About your scripts:
They seem OK.
1: Assuming your source is 720x576.
You crop 88 pixel left, 720?-88-530=102 pixels left, 4 top, 576-4-568=4 pixels bottom (by the way you can write -102 and -4 instead of 530 and 568...)
Then you resize to 720x576
So it's actually a good 16/9 to 4/3 scan...you've removed the side black bars, just remember to encode your video as 4:3 in cce..
2: you begin with "lanczosresize" then add small borders, perhaps you want to conform a video to 720x576=PAL VIDEO...it seems OK, you could also resize directly to 720x576 and not add not...it depends on the aspect ratio of your source...just remember that 720x576 pal dvd IS 4:3 or 16:9 (pixels aren't square...)
PhillipWyllie
30th November 2006, 17:12
It doesn't matter whether you feed CCE YV12 or YUY2 it'll still work. If your source is YV12(MPEG2 for instance), check with avisynth function info(), you may as well work in that as things will move along a little faster. You can then let the system codec do the converasion or add converttoyuy2() at the end of the script. The concensus is that you'll lose precision if you use converttoyuy2().
spanky123
1st December 2006, 16:36
thanks
So basically:
- ConvertToYV12 is useless
- ConvertToYUY2 is recommended to use with CCE (but introduces quality loss if you plan on using a YV12 based codec)
Ok. So no matter what the source is, I'll just let CCE take care of the colour converting stuff ? Or I could also add ConvertToYUY2() ? Which do you recommend ?
I'm only using it to convert to dvd compliant mpeg2 - so thats a YUY2 codec yes ?
1: Assuming your source is 720x576.
You crop 88 pixel left, 720?-88-530=102 pixels left, 4 top, 576-4-568=4 pixels bottom (by the way you can write -102 and -4 instead of 530 and 568...)
Then you resize to 720x576
So it's actually a good 16/9 to 4/3 scan...you've removed the side black bars, just remember to encode your video as 4:3 in cce..
I don't know where that cropping came from. it's a bit off i think - not equal on both sides. I just started using gordianknot to make the avs - mainly to get the crop parameters accurate. That's ok isn't it ?
2: you begin with "lanczosresize" then add small borders, perhaps you want to conform a video to 720x576=PAL VIDEO...it seems OK, you could also resize directly to 720x576 and not add not...it depends on the aspect ratio of your source...just remember that 720x576 pal dvd IS 4:3 or 16:9 (pixels aren't square...)
Yeah. I think you meant 'you could also resize directly to 720x576 and not add borders'. I don't know why I didn't lol
About that 'pixels arent square', I only realized that not long ago
What's recommended resize - bicubic or lanczos ? and what about lanczos4 ?
spanky123
1st December 2006, 16:40
It doesn't matter whether you feed CCE YV12 or YUY2 it'll still work. If your source is YV12(MPEG2 for instance), check with avisynth function info(), you may as well work in that as things will move along a little faster. You can then let the system codec do the converasion or add converttoyuy2() at the end of the script. The concensus is that you'll lose precision if you use converttoyuy2().
I though mpeg-2 was YUY2 ?
and new codecs like xvid,x264 etc were YV12 ?
EDIT: Just realized that the 'sources' must be YV12 for these codecs - which is what avisynth uses. That's why we use avisynth files to encode xvid/x264 etc., yes ? If the source was YUY2 and we wanted to convert to xvid/x264, would we need to add ConvertToYV12() or would that already be taken care of as avisynth's use YV12 ?
Skelsgard
8th December 2006, 15:04
I state it again, I thought I was confused with MeGUI, but no, DVD MPEG-2 IS YV12 (as 4:2:0), not YUY2 (4:2:2).
For MPEG-2, the 4:2:2 color space is introduced in the 422p and HL profiles
So a ConvertToYUY2() is necessary at some point, either in the script or done by CCE itself.
Cheers.
spanky123
8th December 2006, 23:55
Ok. Thanks
PhillipWyllie
11th December 2006, 14:54
You're correct that DVD MPEG-2, DivX and Xvid is YV12, it's just that CCE requires YUY2 as input. If not a conversion takes place(CCE doesn't do the conversion). The question is do you let avisynth (using converttoyuy2) or the system codec do the conversion.
Avisynth doesn't "use" YV12, YV12 is just one colourspace that it can handle.
Bicubic Vs Lanczos? If you read the avisynth documentation you'll see that bicubic is prefered when up-sizing( theres a slight blurring effect). Lanczos is prefered when down-sizing( theres a sharpening effect).
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.