Log in

View Full Version : Convert H.264 to Mpeg-4 ASP (Divx)?


craigcharlie
19th January 2007, 16:28
Hi,

I've done a search in the forums and on google to figure out how to do this, but I still don't understand the best way to go about it.

I am a newbie when it comes to encoding, so please forgive if my questions don't make sense.

Basically, I converted a bunch of movies to H.264 in the US before I went travelling. I want to be able to play them on a standalone DVD player in my apartment.

Can anyone tell me if there's anyway to get a remotely decently looking re-encode from H.264 to DivX (XVid might be ok too, I think the player will play those)?

I found some info saying that ffmpeg could be used to convert H.264, but people were saying that it wasn't working due to a conversion bug.... apparently converting to YUV worked ok, but other conversions don't.

Does anyone have any experience doing this, and know whether going from lossy Mp4 to lossy Mp2 causes too much picture degradation?

Thanks for any help,
C

craigcharlie
19th January 2007, 22:04
sorry, have I posted this in the wrong place?

can anyone tell me if there's a better place i can post this?

thanks,
C

nm
19th January 2007, 22:49
What you are asking is how to encode a video file to MPEG-2 or MPEG-4 ASP for playback on a standalone DVD player. With most Windows-based encoding tools, the source format does not matter as long as you have the required decoder installed. In the case of H.264, all you need on the decoding side is ffdshow.

Now, after decoding has been taken care of, the rest of the problem does not really belong to this forum. For more information about encoding tools, take a look at these forums: MPEG-4 encoder GUIs (http://forum.doom9.org/forumdisplay.php?f=78), VirtualDub & VDubMod (http://forum.doom9.org/forumdisplay.php?f=22) and (Auto) Gordian Knot, or for MPEG-2 encoding, the MPEG-1/2 encoding and DVD authoring forums.

Can anyone tell me if there's anyway to get a remotely decently looking re-encode from H.264 to DivX (XVid might be ok too, I think the player will play those)?
DivX and XviD are MPEG-4 ASP, not MPEG-2. Your standalone player probably supports them alright, if you don't use GMC when encoding with XviD. You could also encode to MPEG-2 and author a DVD-video disc, which all DVD players can play. However, MPEG-2 requires more space than MPEG-4 ASP for the same quality.

Resulting quality depends on the quality of your H.264 source video and on the bitrate (or qp) you use when encoding among a few other things. With a high enough bitrate (say >1500 kbps for DVD resolutions), DivX and XviD should look quite decent.

I found some info saying that ffmpeg could be used to convert H.264, but people were saying that it wasn't working due to a conversion bug.... apparently converting to YUV worked ok, but other conversions don't.
ffmpeg is fine if you take your time to learn it. When taking the command-line route, MEncoder is probably a better choice with its filters and good documentation.

Does anyone have any experience doing this, and know whether going from lossy Mp4 to lossy Mp2 causes too much picture degradation?
The quality will degrade, but probably not dramatically.

craigcharlie
19th January 2007, 23:35
thanks so much nm. you have cleared up a lot of things for me... I totally misunderstood what Divx actually was.

I'll try the tools you suggested. Thanks again.

best,
c

craigcharlie
20th January 2007, 00:04
hi again, I'm really sorry for this, but I really am a complete n00b... can anyone explain in really simple terms how to decode an h.264 mp4 and then re-encode as some kind of divx or xvid file? i'd prefer divx in avi container if possible.

i've gone over the previous post several times, and I'm not clear on how to do this.

I thought I needed to decode the h.264 file to a file, and then re-encode that file to a divx avi? But I can't figure out how to do this with any of the tools mentioned here.

Any help would be greatly appreciated... even just saying "use these two tools, now go read the manuals". :)

thanks,
C

nm
20th January 2007, 00:47
I thought I needed to decode the h.264 file to a file, and then re-encode that file to a divx avi? But I can't figure out how to do this with any of the tools mentioned here.
No, generally you just need to open (or maybe import) the H.264 file in the encoding tool. If it opens the file and you can see the video frames, everything is (probably) fine and you can start encoding.

craigcharlie
20th January 2007, 02:51
I'm really sorry, I still don't get how to do this. the more I research this, the more complicated it seems.

Can anyone tell me the name(s) of any encoding tool(s) that can read h.264 AVC Mp4s , and then output Divx files in an avi container?

craigcharlie
20th January 2007, 02:53
mods please close this thread, I'm going to create a new more appropriately titled one, as i've realized the old one doesn't make any sense.

craigcharlie
20th January 2007, 02:55
Is this possible/practical?

If anyone could point me toward any specific tools I would really appreciate it.

thanks,
C

Pookie
20th January 2007, 03:35
http://forum.doom9.org/archive/index.php/t-109531.html

That's about the easiest app out there to convert your formats. You'll see DivX as an output choice. The only reason I can imagine you wanting to do this is to watch it on a DivX DVD player, in which case 640x352 dimensions, 1700kbs, Mp3 audio at 224K will work on most of them. You might want to normalize audio and do a 2 pass encode, but again, I'm just guessing.

http://img403.imageshack.us/img403/672/settingshb4.th.png (http://img403.imageshack.us/my.php?image=settingshb4.png)


Valid links to the required pieces (Unzip both into the same folder):

http://yawoogle.googlepages.com/winmenc.0.61.zip
http://tirnanog.fate.jp/mirror/mplayer/mplayer2006.12.20.P4.7z

craigcharlie
20th January 2007, 04:44
thanks a ton for that!

I also had to download this file to get it to work:
ftp://sourceware.org/pub/pthreads-win32/dll-latest/lib/pthreadGC2.dll

found it from this thread:
http://www.pspvideo9.com/forums/viewtopic.php?p=33699&sid=c6faeafdbb7fc52404c4a6d991a9dc0b

I've just started an encode; I copied the in-progress avi to another folder and opened it with VLC - praise be to jesus it works!!! :)

and there doesn't seem to be any noticable decline in quality either, and there's sound, etc etc. thanks a ton for your help!!!

this really helps me out... i'd converted all these videos to mp4 before i went travelling....never realized i couldn't watch them on a dvd player. it will be great to be able to watch my videos on DVD player/TV - thanks!

bond
20th January 2007, 17:43
threads merged