PDA

View Full Version : x264 into AVI: HOW?


digifruitella
20th April 2008, 23:48
The only possible method I could think of was to open the x264 encoded file with DGAIndex, and save project as .dga then make an AVS script and open it in VirtualDub. THEN, go into Compression option and choose your codec (Divx,Xvid). You'd think that would work... just when I go to "Job Control" and start up my two-pass DIVX encoding...nope, it won't go. Error.

Is there another method of encoding to AVI?

Dark Shikari
20th April 2008, 23:57
There's a reason why we make it hard for you to put H.264 in AVI: you're not supposed to do it nor is there any good reason to do it. There are loads of great reasons not to do it.

LoRd_MuldeR
21st April 2008, 00:05
Is there another method of encoding to AVI?

You might want to give Avidemux a try ;)
http://forum.doom9.org/showthread.php?t=126164

You can easily switch between AVI, MP4, OGM and MKV output, so you can check which conatiner works best for you.
In contrast to VirtualDub you can avoid VFW trouble! Of course a recent version of x264 is already "built-in" ...

BTW: You should read this http://forum.doom9.org/announcement.php?f=77

unskinnyboy
21st April 2008, 00:29
The only possible method I could think of was to open the x264 encoded file with DGAIndex, and save project as .dga then make an AVS script and open it in VirtualDub. THEN, go into Compression option and choose your codec (Divx,Xvid). You'd think that would work... just when I go to "Job Control" and start up my two-pass DIVX encoding...nope, it won't go. Error.What error, exactly?

There's a reason why we make it hard for you to put H.264 in AVI: you're not supposed to do it nor is there any good reason to do it. There are loads of great reasons not to do it.OP isn't trying to mux x264 into an AVI container. He is trying to reencode x264 to DivX.

Dark Shikari
21st April 2008, 00:33
OP isn't trying to mux x264 into an AVI container. He is trying to reencode x264 to DivX.Ah, he did indeed manage to confuse me there.

OP, have you tried Avisynth and DirectShowSource? Open your Avisynth script with Virtualdub or whatever encoding tool you want, and it'll read it fine.

digifruitella
21st April 2008, 00:39
What error, exactly?

There's no way of finding out. It just says "Error" next to the Job 1 and Job 2 in the Job Control. It simply refuses to encode.

Oh, and LoRd_MuldeR. I'm downloading that... will see what it does for me.

neuron2
21st April 2008, 00:39
nope, it won't go. Error. We're not mind readers. What was the error?

It sounds like a DivX issue and not a DGAVCDec issue, but unless you give us more to go on, we can't help you much.

digifruitella
21st April 2008, 00:40
Open your Avisynth script with Virtualdub or whatever encoding tool you want, and it'll read it fine.

I did exactly that

digifruitella
21st April 2008, 00:41
We're not mind readers. What was the error?

It sounds like a DivX issue and not a DGAVCDec issue, but unless you give us more to go on, we can't help you much.

Well I'm sorry that you can't read my mind, I wish I could read VirtualDub's mind when it simply says "error" next to the Jobs...

neuron2
21st April 2008, 00:50
Try it manually first!

digifruitella
21st April 2008, 00:52
Try it manually first!

Well, you'd have to be specific about that. I wouldn't know a single other program to convert from this to AVI so you might want to point me in the right direction; software + guide.

neuron2
21st April 2008, 00:53
Don't do it with Job Control. Just do Save AVI.

digifruitella
21st April 2008, 00:59
so then what exactly are the differences between Job control and saving as AVI if it does the same thing? Then what about compression and passes? If I select divx and choose save as avi, it would run one pass only wouldn't it?

neuron2
21st April 2008, 01:10
We're trying to find out the error! That's all. Just do it and see if an error is reported.

digifruitella
21st April 2008, 02:03
We're trying to find out the error! That's all. Just do it and see if an error is reported.

no, i understand that. I was simply asking what was the difference. tis all.

neuron2
21st April 2008, 02:08
You're right about the differences, but if a job doesn't show the error, then we have to expose it by running manually. Have you done it?

When we fix the error then you can go back to a job.

Adub
21st April 2008, 03:26
Okay, in reference to Dark Shikari's first post, I have a question. I know that is "bad" to put h.264 into an avi container, but for the life of my I don't remember exactly why. So, why?

Dark Shikari
21st April 2008, 03:28
Okay, in reference to Dark Shikari's first post, I have a question. I know that is "bad" to put h.264 into an avi container, but for the life of my I don't remember exactly why. So, why?For H.264 in particular:

1) B-frames in AVI are bad in general. There are some ugly hacks that allow them, but they're ugly.

2) B-pyramid and other such structures, along with frame re-ordering, can make 1) much worse.

3) No modern hardware player exists that supports H.264 in AVI as far as I know.

digifruitella
21st April 2008, 04:56
well, it appears to be that divx is geeking out. I tried the Save As method with DIVX, and here's the window that popped up.

http://img73.imageshack.us/img73/2189/savingascb4.jpg

then I tried XVID with and Save As, and it DID go through. Problem though.

the original file is 800x336

and after the Save As, I open it, and it's stretched to

this
http://img73.imageshack.us/img73/3975/vlcsnap29719yz4.png

1. what do I do to prevent that from happening after I do my full encoding of the film?

2. will an 800x336 avi play on a multi-format (Divx) players? Or do I have to shrink it to 720x300?

Blue_MiSfit
21st April 2008, 05:09
Is this what the video looks like in virtualdub?

~MiSfit

digifruitella
21st April 2008, 05:44
Is this what the video looks like in virtualdub?

~MiSfit

no man, it looks normal.

http://img267.imageshack.us/img267/2733/dubxm1.jpg

Adub
21st April 2008, 05:45
@DS,
Thanks!! I have always thought it was something along those lines.

unskinnyboy
21st April 2008, 06:03
well, it appears to be that divx is geeking out. I tried the Save As method with DIVX, and here's the window that popped up.

http://img73.imageshack.us/img73/2189/savingascb4.jpg
See if this (http://forum.doom9.org/showthread.php?t=51906) thread helps you.

then I tried XVID with and Save As, and it DID go through. Problem though.

the original file is 800x336

and after the Save As, I open it, and it's stretched to

thisLooks like you are cropping and resizing it wrong. Post the contents of your avs file here.

unskinnyboy
21st April 2008, 06:16
For H.264 in particular:

1) B-frames in AVI are bad in general. There are some ugly hacks that allow them, but they're ugly.

2) B-pyramid and other such structures, along with frame re-ordering, can make 1) much worse.

3) No modern hardware player exists that supports H.264 in AVI as far as I know.
As long as you are playing it on a PC, bad or no bad, ugly or no ugly, x264 in AVI works as a technical exercise - even with AAC audio.

Dark Shikari
21st April 2008, 06:25
As long as you are playing it on a PC, bad or no bad, ugly or no ugly, x264 in AVI works as a technical exercise - even with AAC audio.Correction: with some players that happen to abide by certain arbitrary nonstandardized rules with regards to packing B-frames in AVI files, it will work. With many many others, it will not.

digifruitella
21st April 2008, 07:14
See if this (http://forum.doom9.org/showthread.php?t=51906) thread helps you.

Looks like you are cropping and resizing it wrong. Post the contents of your avs file here.

well I'm not really resizing anything when I get that outcome.

here's my AVS file.


loadplugin("C:\Documents and Settings\XXX\Desktop\dga\DGAVCDecode.dll")
avcsource("G:\[ film ]\trainingday.dga")

thetoof
21st April 2008, 07:53
You could try FFMPEGSource (http://forum.doom9.org/showthread.php?t=127037)...

foxyshadis
22nd April 2008, 20:25
It has nothing to do with the source filter, the cause is a bad DAR/SAR/PAR in the encoding or muxing stage.

SeeMoreDigital
22nd April 2008, 21:17
Is there another method of encoding to AVI?You can use AVC2AVI+GUI to place elementary MPEG-4 AVC streams within the .AVI container.

But as others have said in this thread....

Placing MPEG-4 AVC video streams within the .AVI container is just plain dumb.... As the .AVI container is too many years behind the times too support all the advanced features AVC has to offer!

Indeed, the .AVI container can't even support MPEG-4 ASP streams with b-frames correctly.... Or even WMV9 video with b-frames :eek:

nm
22nd April 2008, 22:41
He is trying to re-encode H.264 to MPEG-4 ASP, not muxing H.264 to AVI.

So, other tools would be for example Avidemux, MEncoder and FFmpeg (there are many frontends for the last two if you don't want to use them from command line).

digifruitella
23rd April 2008, 07:05
It has nothing to do with the source filter, the cause is a bad DAR/SAR/PAR in the encoding or muxing stage.

so then how is that fixed... if in virtualdub the AR shows up fine, but after - it's stretched to 4:3...