The metadata generation tool flvtool2 crashes when run on .flv files created using Wowza Media Server Pro.
There is a bug in flvtool2 1.0.6 which causes a unrecoverable failure when run against a .flv recorded using Wowza Media Server Pro. This problem is easily fixed with a minor modification to the flvtool2 source code. The following instructions assume that flvtool2 is either going to be run on Linux or on Windows from within a Linux emulation environment like Cygwin or MinGW.
Install the ruby and ruby-devel packages on your machine.
Download and unzip the flvtool2 1.0.6 source code (flvtool2-1.0.6.zip).
Change directory to flvtool2-1.0.6/lib/flv and open the file audio_tag.rb in a text editor.
Navigate to line 47 and change the code as follows:
from: def after_initialize(new_object) @tag_type = AUDIO read_header end to: def after_initialize(new_object) @tag_type = AUDIO if data_size > 0 read_header end end
Change directory up two levels (cd …/…) and execute the following commands to rebuild and install the flvtool2 application:
ruby setup.rb config ruby setup.rb setup ruby setup.rb install
You are done. The tool should now function properly.
I have submitted a bug to the flvtool2 team to try and get this resolved in a future release of the application. I will add a post to this thread when/if I hear back.
NOTE: I believe this problem will also occur with .flv files recorded using Flash Media Server.