Log in

View Full Version : flv splitter ignoring meta data?


BlindWanderer
21st June 2007, 10:12
Found an interesting bug in FLV Splitter, it misreports the size of some videos.

VLC doesn't exhibit this problem. I think the issue may be that FLV Splitter isn't reading the containers meta data and relying upon the stream data instead. Of course the meta data can be wrong, so it shouldn't necessarily be trusted.

Example:
http://www.ashesandsnow.org/media/richmedia/video/18.flv
Height should be: 180, but it is reported to ffdshow as 192. The extra 12 rows on the bottom are a blur. From my poking at the splitter, it seems that video stream dimensions must be a power of 16. I think what is going on is that the metadata is being used to crop off the rest of the data. This could be fixed by coping the meta data hight and width in to the VIDEOINFOHEADER rcSource & rcTarget.

I'd do this myself but I only have VC Express and can't compile it *shakes fist at MS*.

foxyshadis
21st June 2007, 11:55
You can compile it. You just have to download the PSDK and the DXSDK, compile all the stupid annoying libraries it needs (and rename them, either the libs or in the project dependencies), and it should finally link fine. I have Pro and had to go through all that hassle too; I just gave up trying to get all of MPC's dependencies to compile.

In the meantime, I'll try to remember to look at it too, and you might want to post this bug on new MPC's bugtracker (http://sourceforge.net/tracker/?group_id=170561&atid=854651), because I'm incredibly forgetful.

clsid
21st June 2007, 12:35
If you create a patch, then perhaps drevil_xxl can compile it for you (and everyone else) to enjoy.

BlindWanderer
22nd June 2007, 04:49
You can compile it. You just have to download the PSDK and the DXSDK, compile all the stupid annoying libraries it needs (and rename them, either the libs or in the project dependencies), and it should finally link fine. I have Pro and had to go through all that hassle too; I just gave up trying to get all of MPC's dependencies to compile.

In the meantime, I'll try to remember to look at it too, and you might want to post this bug on new MPC's bugtracker (http://sourceforge.net/tracker/?group_id=170561&atid=854651), because I'm incredibly forgetful.

MS doesn't ship ATL with the Express.
http://msdn.microsoft.com/vstudio/express/support/faq/#vcpp

Anyway the mpc-hc SVN is throwing an error message that suggests to me that the SVN is (partially) corrupted.

Considering all that, I've been poking through the VLC source and I think I may have found the correct solution. It seems that VLC also ignores the height and width parts of the metadata. While I couldn't find where it adjusts the size, there is a comment about a one byte structure, and there is a place where one byte is being read in both source. So it appears the adjust structure was being ignored by our splitter.

Here's what I cobbed together, it shouldn't take much more work to get it to compile. Also someone will probably want to rename the variable and structure, I'm bad at naming variables.
http://home.comcast.net/~mailerdaemon/flvsplitter.zip