NGINX - performance HTTP server Support Forums

Please login or register.

Login with username, password and session length
Advanced search  

News:

Welcome to the Unofficial (YET) support forums for NGINX, a performance HTTP server.

Pages: [1]   Go Down

Author Topic: UsingLighttpd, Mplayer/Mencoder and Flvtool2 to Implement Flash Video Streaming  (Read 1585 times)

0 Members and 1 Guest are viewing this topic.

katmai

  • Administrator
  • Jr. Member
  • *****
  • Karma: 0
  • Offline Offline
  • Posts: 57
    • View Profile
code]/usr/local/lib/site_ruby/1.8/flv/amf_string_buffer.rb:163: [BUG] Segmentation fault[/code]

To solve this problem you can go to lib/flv/amf_string_buffer.rb file in flvtool2 source tree and change line 163 from

 
Code: [Select]
   write [(time.to_i * 1000.0)].pack('G')
to

Code: [Select]
    write [(time.to_f * 1000.0)].pack('G')
I want to say BIG THANKS to Dmytro Steflyuk for this fix.

So, as for now you are ready to convert your movies from any video format to flv. You can use following set of command to produce file for streaming:
Code: [Select]
$ mencoder \\
orig_file.ext \\
-ofps 25 \\
-o dest_file.flv \\
-of lavf \\
-oac mp3lame \\
-lameopts abr:br=64 \\
-srate 22050 \\
-ovc lavc \\
-lavfopts i_certify_that_my_video_stream_does_not_use_b_frames \\
-lavcopts vcodec=flv:keyint=50:vbitrate=300:mbd=2:mv0:trell:\\
v4mv:cbp:last_pred=3 -vop scale=320:240
....
....
$ flvtool2 -UP dest_file.flv
...
/usr/local/lib/site_ruby/1.8/flv/amf_string_buffer.rb:163: [BUG] Segmentation fault

To solve this problem you can go to lib/flv/amf_string_buffer.rb file in flvtool2 source tree and change line 163 from

 
Code: [Select]
   write [(time.to_i * 1000.0)].pack('G')
to

Code: [Select]
    write [(time.to_f * 1000.0)].pack('G')
I want to say BIG THANKS to Dmytro Steflyuk for this fix.

So, as for now you are ready to convert your movies from any video format to flv. You can use following set of command to produce file for streaming:
Code: [Select]
$ mencoder \\
orig_file.ext \\
-ofps 25 \\
-o dest_file.flv \\
-of lavf \\
-oac mp3lame \\
-lameopts abr:br=64 \\
-srate 22050 \\
-ovc lavc \\
-lavfopts i_certify_that_my_video_stream_does_not_use_b_frames \\
-lavcopts vcodec=flv:keyint=50:vbitrate=300:mbd=2:mv0:trell:\\
v4mv:cbp:last_pred=3 -vop scale=320:240
....
....
$ flvtool2 -UP dest_file.flv
...
Logged
Pages: [1]   Go Up
 

Page created in 0.111 seconds with 20 queries.