qyot27
22nd September 2008, 06:31
This has me stumped. I had wanted a way of quickly batch encoding scripts to YV12-mode HuffYUV (also using the adaptive huffman tables option) that would still tell me things like frame progress and other things that VirtualDub's batch controller doesn't. I found avs2avi and it worked the way I liked, except it has some issues with either ffdshow decoding the file through AVISource, or FFmpegSource, or both (see thread here (http://forum.doom9.org/showthread.php?t=141148) for my query on that topic). So, I thought I would see how ffmpeg itself and mencoder both fared when dealing with encoding such files.
As a test, I had a small FLV file that was served in a script only containing this line:
DirectShowSource("test.flv",fps=29.97,convertfps=true,audio=false)
When encoding with ffdshow (revision 2110, Sep 8 2008, clsid) through avs2avi - or VirtualDub, since there's only a difference of a few kilobytes in the output size - the size was at or around 60,182 KB.
Using ffmpeg (Sherpya-r14227), with these options:
ffmpeg -i test.avs -vcodec ffvhuff -context 1 -vstrict -1 -an test-ffmpeg.avi
The output size was 74,887 KB.
Using mencoder (dev-SVN-r27419-4.2.2), with roughly the same options produced a file only one kilobyte smaller than the ffmpeg output - which I expected.
My question was why is there a 14 MB difference in size between ffmpeg/mencoder and ffdshow's VFW? Now, when I use mencoder's VFW capabilities to call ffdshow:
mencoder "test.avs" -o "test-mencoder.avi" -ovc vfw -xvfwopts codec=ff_vfw.dll
Then the output is 61,711 KB. Which is close to the output produced by avs2avi or VirtualDub, but it's still larger by over a meg.
All of these encodes were done on the same test script - nothing changed at all. What I'm concerned about is that other things are occurring in mencoder (both in the instance of it encoding the file or the instance of using VFW) to cause the size difference - an unnecessary colorspace conversion, or something else. Since I don't really know much about how either ffmpeg or mencoder handle input files, then I don't know whether my fears/doubts are misplaced or if there are other conditions to be mindful of or commandline options to pass to make sure that everything is treated okay.
I've attached the log from all four (ffmpeg, avs2avi, mencoder, and mencoder using VFW) tests. Maybe there's something there that can shed light on this.
As a test, I had a small FLV file that was served in a script only containing this line:
DirectShowSource("test.flv",fps=29.97,convertfps=true,audio=false)
When encoding with ffdshow (revision 2110, Sep 8 2008, clsid) through avs2avi - or VirtualDub, since there's only a difference of a few kilobytes in the output size - the size was at or around 60,182 KB.
Using ffmpeg (Sherpya-r14227), with these options:
ffmpeg -i test.avs -vcodec ffvhuff -context 1 -vstrict -1 -an test-ffmpeg.avi
The output size was 74,887 KB.
Using mencoder (dev-SVN-r27419-4.2.2), with roughly the same options produced a file only one kilobyte smaller than the ffmpeg output - which I expected.
My question was why is there a 14 MB difference in size between ffmpeg/mencoder and ffdshow's VFW? Now, when I use mencoder's VFW capabilities to call ffdshow:
mencoder "test.avs" -o "test-mencoder.avi" -ovc vfw -xvfwopts codec=ff_vfw.dll
Then the output is 61,711 KB. Which is close to the output produced by avs2avi or VirtualDub, but it's still larger by over a meg.
All of these encodes were done on the same test script - nothing changed at all. What I'm concerned about is that other things are occurring in mencoder (both in the instance of it encoding the file or the instance of using VFW) to cause the size difference - an unnecessary colorspace conversion, or something else. Since I don't really know much about how either ffmpeg or mencoder handle input files, then I don't know whether my fears/doubts are misplaced or if there are other conditions to be mindful of or commandline options to pass to make sure that everything is treated okay.
I've attached the log from all four (ffmpeg, avs2avi, mencoder, and mencoder using VFW) tests. Maybe there's something there that can shed light on this.