Wowza Community

flvtool2 EOFError and FFmpeg Segmentation Error

Ok, so I’ve been generating thumbnails from FLVs using ffmpeg. About 80% of the time, it works without any issues.

But sometime, some FLV’s appear to be faulty and they cause error in FFmpeg which says ‘Segmentation Fault’ or ‘Segmentation Error’.

When this happens, I process these faulty FLV files through FLVTool2, and inject metadata into them which fixes about 80% of the time also. But the remaing 20% is a huge problem because FLVtool2 outputs a 0 byte sized FLV file.

The problem I believe is the same as from this thread below but it was reportedly fixed in wowza version 1.0 and we’re using 1.5, so I’m not sure what to do…

http://www.wowza.com/forums/showthread.php?p=896

This is the output from my FLVTool2:

ERROR: EOFError

ERROR: /usr/lib/ruby/site_ruby/1.8/flv/amf_string_buffer.rb:37:in `read’

ERROR: /usr/lib/ruby/site_ruby/1.8/flv/amf_string_buffer.rb:243:in `read__STRING’

ERROR: /usr/lib/ruby/site_ruby/1.8/flv/audio_tag.rb:56:in `read_header’

ERROR: /usr/lib/ruby/site_ruby/1.8/flv/audio_tag.rb:47:in `after_initialize’

ERROR: /usr/lib/ruby/site_ruby/1.8/flv/tag.rb:56:in `initialize’

ERROR: /usr/lib/ruby/site_ruby/1.8/flv/stream.rb:447:in `new’

ERROR: /usr/lib/ruby/site_ruby/1.8/flv/stream.rb:447:in `read_tags’

ERROR: /usr/lib/ruby/site_ruby/1.8/flv/stream.rb:58:in `initialize’

ERROR: /usr/lib/ruby/site_ruby/1.8/flvtool2/base.rb:272:in `new’

ERROR: /usr/lib/ruby/site_ruby/1.8/flvtool2/base.rb:272:in `open_stream’

ERROR: /usr/lib/ruby/site_ruby/1.8/flvtool2/base.rb:238:in `process_files’

ERROR: /usr/lib/ruby/site_ruby/1.8/flvtool2/base.rb:225:in `each’

ERROR: /usr/lib/ruby/site_ruby/1.8/flvtool2/base.rb:225:in `process_files’

ERROR: /usr/lib/ruby/site_ruby/1.8/flvtool2/base.rb:44:in `execute!’

ERROR: /usr/lib/ruby/site_ruby/1.8/flvtool2.rb:168:in `execute!’

ERROR: /usr/lib/ruby/site_ruby/1.8/flvtool2.rb:228

ERROR: /usr/bin/flvtool2:2:in `require’

ERROR: /usr/bin/flvtool2:2

Skipping file /usr/local/WowzaMediaServerPro/content/test.flv

Any help would be appreciated, thanks

We put the fix in then took it back out because it was flvtool2 that actually had the problem. Try following the instructios in this forum post to fix flvtool2:

http://www.wowza.com/community/t/-/36

Charlie

Thanks for the quick reply, I’ll try that fix and let you know what happens.

Yup the solution worked great.

For anyone getting the EOF error in flvtool2, you can try yamdi instead of flvtool2. It does the same job but doesn’t error out on some encoded FLV files.

I was having the error when trying to inject metadata into FLVs encoded with Adobe Media Encoder CS4.

The alternative was encoding with f4v however that’s not fully supported since most people do not have Flash 9.115 or whatever version is needed at the moment :o