PDA

View Full Version : Why is AVI to H264 faster than DVD to H264?


ilovejedd
26th October 2006, 07:03
This is just something I've noticed when encoding videos using ffmpeg to PSP format.

Commandline is simply:
ffmpeg -y -i "<%InputFile%>" -bitexact -vcodec h264 -coder 1 -bufsize 128 -g 250 -s 320x240 -r 29.97 -b 384 -acodec aac -ac 1 -ar 48000 -ab 32 -f psp "<%OutputFile%>.MP4"Assuming the sources are a regular DVD rip (already decrypted to HDD) and an AVI of the same movie (1500kbps DivX or XviD w/orig AC3), both having the same resolution, I'm curious, why does the AVI take significantly less time to encode than the DVD? Or is this a peculiarity in ffmpeg?

This was done using an AMD Sempron 3200, 1GB RAM, AVI and DVD sources were located on a different hard drive from the output. No formal tests, it was just something I noticed.

Shinigami-Sama
26th October 2006, 07:09
read time from the media?

linx05
26th October 2006, 07:14
Wouldn't the AVI be typically a lot smaller than DVD?

DarkZell666
26th October 2006, 10:30
To explicit what shinigami-sama and linx05 seem to suggest :

The hdd needs more work because of the bitrate (quantity of data read at any moment is much bigger for the DVD than the AVI), 8000kbps for DVD vs. 1500kbps for your avi. Disk-access is very slow compared to CPU/RAM operation.

Possibly, the mpeg2 parsing and decoding routines aren't as optimized as the mpeg4 ones, but this is hardly possible imho.