MJPEG conversion

If you have questions about compression/encoding/converting look here.
Locked
User avatar
CrackTheSky
has trust issues
Joined: Sun Aug 27, 2006 11:01 pm
Status: Maybe editing?
Location: Chicago
Org Profile

MJPEG conversion

Post by CrackTheSky » Mon Jun 18, 2007 2:47 am

Ok this is driving me nuts. I'm using live-action in a video I'm working on. The camera I used to shoot it is a Canon S3 IS - a digital camera (NOT a video camera). I have nothing else ;_; Anyway, I shot some footage back in like January and converted the video files to a lossless codec using VDM just fine.

Now, since I picked up the project again, I wanted to shoot some more footage for the video. So I did, and when I tried to open the video files in VDM using the EXACT SAME scripts I used to open them several months ago, I get weird error messages.

Here's my script:

Code: Select all

loadplugin("E:\Program Files\AviSynth 2.5\plugins\directshowsource.dll")
directshowsource("green2.avi")
converttorgb24()
assumefps(23.976)
crop(30,0,-30,-0)
lanczosresize(720,480)
vaguedenoiser(threshold=0,wiener=true)
(Don't ask about the loadplugin line; for some reason I have to type that in for VDM to recognize DirectShowSource - don't get caught up on it).

Now, when I try to open this script in VDM, I get an error message that says:
"AviSynth open failure:
Crop: Destination width is 0 or less"

wtf? So I comment out the crop line, try again. Next error message:
"Resize: Source image too small for this resize method"

...Ok, comment out the resize line (and I tried several different kinds of resize plugins like bilinear and bicubic), and I get another one:
"VagueDenoiser: YV12, YUY2, RGB24 and RGB32 (so what are you using?) only"

Try every different kind of colorspace, same message. Comment out the VagueDenoiser line just to try to open the video at ALL and I finally get an error message that says:
"No video stream found"

...And now I'm at a loss. I did not have this problem earlier, and I think maybe it has something to do with my having downloaded the newest AMVapp since then. If worse comes to worse I can always uninstall v3.0 and reinstall the old one just to see if that IS the problem, but I don't feel like I should have to because, well, that doesn't make a whole lot of sense to me.

The video is encoded in MJPG in an .avi container; weird thing is, when I try to put the video in Vegas, only the audio stream shows up, but I seem to remember this happening last time too. I can play the video just fine in MPC, but for some reason the damn thing just will not load in VDM and I have no idea why.

Any ideas?

User avatar
Scintilla
(for EXTREME)
Joined: Mon Mar 31, 2003 8:47 pm
Status: Quo
Location: New Jersey
Contact:
Org Profile

Post by Scintilla » Mon Jun 18, 2007 6:15 am

1) Shouldn't you be using AVISource() for AVI files?

2) That should be Crop(30,0,-30,<b>0</b>). No negative sign required for zeroes.
ImageImage
:pizza: :pizza: Image :pizza: :pizza:

User avatar
Kionon
I ♥ the 80's
Joined: Fri Mar 02, 2001 10:13 pm
Status: Ayukawa MODoka.
Location: I wonder if you know how they live in Tokyo... DRIFT, DRIFT, DRIFT
Contact:
Org Profile

Post by Kionon » Mon Jun 18, 2007 7:13 am

Scintilla wrote:1) Shouldn't you be using AVISource() for AVI files?

2) That should be Crop(30,0,-30,<b>0</b>). No negative sign required for zeroes.
1) Not always. Depends heavily on what the codec is:
doom9 wrote:[DirectShowSource] can read most formats which Media Player can play, including MPEG, MP3, and some QuickTime files, as well as AVI files that AVISource doesn't support (like DV type 1, or files using DirectShow-only codecs).
2) He said he made an adjustment to this and it still didn't work?
ImageImage
That YouTube Thing.

trythil
is
Joined: Tue Jul 23, 2002 5:54 am
Status: N͋̀͒̆ͣ͋ͤ̍ͮ͌ͭ̔̊͒ͧ̿
Location: N????????????????
Org Profile

Post by trythil » Mon Jun 18, 2007 9:57 am

If you have ffdshow installed, it can be configured to decode Motion JPEG video, and does a reasonably good job at it. Go into the ffdshow video encoder configuration screen, then to Codecs, and look for the MJPG FourCC.

If that's the only DirectShow MJPEG decoder you have, make sure that it's not set to "disabled". If it is, set it to "libavcodec". Save settings, restart VirtualDubMod, and see if that does the trick.

If it isn't the only such decoder you have, and you'd like to use another decoder, please provide a list of those decoders. As you said, you reinstalled AMVapp, so I'm betting it's a codec configuration issue.

User avatar
NeoQuixotic
Master Procrastinator
Joined: Tue May 01, 2001 7:30 pm
Status: Lurking in the Ether
Location: Minnesota
Contact:
Org Profile

Post by NeoQuixotic » Mon Jun 18, 2007 11:46 am

I have an S3 IS myself and I can open the AVIs just fine using AVISource. I use the PICVideo M-JPEG codec for encoding and decoding.

I did find one thing interesting. Depending on if I use AVISource or DirectShowSource, Vdub reports different colorspaces.

YV12 with AVISource
YUY2 with DirectShowSource
Insert clever text/image here.

User avatar
Qyot27
Surreptitious fluffy bunny
Joined: Fri Aug 30, 2002 12:08 pm
Status: Creepin' between the bullfrogs
Location: St. Pete, FL
Contact:
Org Profile

Post by Qyot27 » Mon Jun 18, 2007 2:29 pm

trythil wrote:If you have ffdshow installed, it can be configured to decode Motion JPEG video, and does a reasonably good job at it. Go into the ffdshow video encoder configuration screen, then to Codecs, and look for the MJPG FourCC.
Note: newer versions of ffdshow-tryouts use 'VFW configuration' instead of 'video encoder configuration' - at least, the 2007.04.23 build uses it, and I'd assume that the 2007.06.03 build (rev1237) does as well.

User avatar
Bauzi
Joined: Fri May 21, 2004 12:48 pm
Status: Under High Voltage
Location: Austria (uhm the other country without kangaroos^^)
Contact:
Org Profile

Post by Bauzi » Mon Jun 18, 2007 3:40 pm

Shouldn´t be crop always be a multiple of 4 ? I think I read this somewhere.
1) Shouldn't you be using AVISource() for AVI files?
You can find me on YT under "Bauzi514". Subscribe to never miss my AMV releases. :amv:

User avatar
Tab.
Joined: Tue May 13, 2003 10:36 pm
Status: SLP
Location: gayville
Org Profile

Post by Tab. » Mon Jun 18, 2007 5:27 pm

Bauzi wrote:Shouldn´t be crop always be a multiple of 4 ?
Your resolution should probably be a multiple of 8, since DCT-based codecs break the image down into 8x8 blocks. I know most codecs have a way of dealing with non-mod-8 sizes, but it's probably best to make sure your video is mod 8 anyway :/

User avatar
CrackTheSky
has trust issues
Joined: Sun Aug 27, 2006 11:01 pm
Status: Maybe editing?
Location: Chicago
Org Profile

Post by CrackTheSky » Tue Jun 19, 2007 3:59 pm

Scintilla wrote:2) That should be Crop(30,0,-30,0). No negative sign required for zeroes.
Tab. wrote:
Bauzi wrote:Shouldn´t be crop always be a multiple of 4 ?
Your resolution should probably be a multiple of 8, since DCT-based codecs break the image down into 8x8 blocks. I know most codecs have a way of dealing with non-mod-8 sizes, but it's probably best to make sure your video is mod 8 anyway :/
The crop is not the problem, as commenting it out didn't help at all.
trythil wrote:If that's the only DirectShow MJPEG decoder you have, make sure that it's not set to "disabled". If it is, set it to "libavcodec". Save settings, restart VirtualDubMod, and see if that does the trick.
Oh hey, what do you know? That worked! Thanks a bunch trythil, I owe you some hardcore buttsex at AWA.

User avatar
Tab.
Joined: Tue May 13, 2003 10:36 pm
Status: SLP
Location: gayville
Org Profile

Post by Tab. » Tue Jun 19, 2007 7:41 pm

CrackTheSky wrote:The crop is not the problem, as commenting it out didn't help at all.
Well no, it wouldn't be a problem perse. Modern codecs have mechanisms to deal with this. It's simply not advised.

Locked

Return to “Conversion / Encoding Help”