benshole Posted November 21, 2007 Share Posted November 21, 2007 I was after a (serverside) solution for reading the metadata from .flv files and found flv4php which works brilliantly for smaller files. But as soon as i use a larger file or increase the bitrate the video is encoded at i receive lots of Warning: unpack(): Type d: not enough input, need 8, have 5 in /siteroot/play/FLV/Util/AMFUnserialize.php on line 169 However it appears this only happens after a certain point as i can pull out the first so many keyframe metadata records but then it fails an the keyframe times array isn't populated at all. This is all im using the flv4php lib for so if anyone knows of another way to pull the keyframe information from an flv under linux i would be very grateful! Just for the information... The media is all being encoded using ffmpeg using the same settings : ffmpeg -i infile -ar 22050 -ab 32000 -f flv -b 320000 -r 25 -s 320x240 -acodec libmp3lame outfile.flv Then the metadata being injected using YAMDI. Both done on the same machine. But gives different results depending on the media. Thanks a lot folks!! Ben Quote Link to comment https://forums.phpfreaks.com/topic/78336-flv4php-reading-meta-data-fails-with-larger-files/ Share on other sites More sharing options...
benshole Posted November 22, 2007 Author Share Posted November 22, 2007 Found a sort of solution using flvtool2 to pull the meta data out into an xml file that i can then parse through. However flvtool2 is hideously slow, so any ideas are still more than welcome! Thanks. Ben Quote Link to comment https://forums.phpfreaks.com/topic/78336-flv4php-reading-meta-data-fails-with-larger-files/#findComment-396429 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.