The metadata generation tool flvtool2 crashes causing a unrecoverable failure when run against a .flv recorded using media server. The cause of the problem is that sometimes (due to connection problems or due to hardware problems) there is no sound streamed and recorded to the FLV. If this is the case, those players skip the part of the file, where no sound information are.This causes almost all players to behave in a strange way.This problem is easily fixed with a minor modification to the flvtool2 source code.
1. Install the ruby and ruby-devel packages on your machine.
2. Download and unzip the flvtool2 1.0.6 source code (flvtool2-1.0.6.zip).
3. Change directory to flvtool2-1.0.6/lib/flv and open the file audio_tag.rb in a text editor.
4. Navigate to line 47 and change the code as follows:
Code: 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
5. Change directory up two levels (cd ../..) and execute the following commands to rebuild and install the flvtool2 application: Code: ruby setup.rb config ruby setup.rb setup ruby setup.rb install
The tool should now function properly.
|
My Blog Title
|