I'm having problems regarding conversion of video to flv format. Below is my command

for conversion, but it seems to convert the video to flv but the file size remains 0

KB, what could be the problem, please suggest.

My command:

$command =$ffmpegPath . " -i " . $srcFile . " -ar " . $srcAR . " -ab " . $srcAB . "

-f flv -s " . $srcWidth . "x" . $srcHeight . " " . $destFile . " | " . $flvtool2Path

. " -U stdin " . $destFile;

Please Help me ASAP. It's urgent

Thanks in advance

Regards
Hem

Recommended Answers

All 2 Replies

Tried but errors :


/usr/bin/ffmpeg -i upload_v/El-Bahia-Video.mp4 -ar 44100 -ab 64 -f flv -s 1280x720 upload_v/El-Bahia-Video.flv | /usr/bin/flvtool2 -U stdin upload_v/El-Bahia-Video.flv
FFMPEG setting on server is like this

ffmpeg-php version 0.6.3
ffmpeg-php built on Dec 28 2011 21:00:16
ffmpeg-php gd support enabled
ffmpeg libavcodec version Lavc52.123.0
ffmpeg libavformat version Lavf52.111.0
ffmpeg swscaler version SwS0.14.1
When i run this command file is get converted in to flv formate but its size is zero.

also have this kind of error :

ERROR: undefined method `timestamp' for nil:NilClass
ERROR: /usr/lib/ruby/gems/1.8/gems/flvtool2-1.0.6/lib/flv/stream.rb:285:in `lasttimestamp'
ERROR: /usr/lib/ruby/gems/1.8/gems/flvtool2-1.0.6/lib/flv/stream.rb:274:in `duration'
ERROR: /usr/lib/ruby/gems/1.8/gems/flvtool2-1.0.6/lib/flvtool2/base.rb:181:in `add_meta_data_tag'
ERROR: /usr/lib/ruby/gems/1.8/gems/flvtool2-1.0.6/lib/flvtool2/base.rb:137:in `update'
ERROR: /usr/lib/ruby/gems/1.8/gems/flvtool2-1.0.6/lib/flvtool2/base.rb:47:in `send'
ERROR: /usr/lib/ruby/gems/1.8/gems/flvtool2-1.0.6/lib/flvtool2/base.rb:47:in `execute!'
ERROR: /usr/lib/ruby/gems/1.8/gems/flvtool2-1.0.6/lib/flvtool2/base.rb:46:in `each'
ERROR: /usr/lib/ruby/gems/1.8/gems/flvtool2-1.0.6/lib/flvtool2/base.rb:46:in `execute!'
ERROR: /usr/lib/ruby/gems/1.8/gems/flvtool2-1.0.6/lib/flvtool2/base.rb:206:in `process_files'
ERROR: /usr/lib/ruby/gems/1.8/gems/flvtool2-1.0.6/lib/flvtool2/base.rb:44:in `execute!'
ERROR: /usr/lib/ruby/gems/1.8/gems/flvtool2-1.0.6/lib/flvtool2.rb:168:in `execute!'
ERROR: /usr/lib/ruby/gems/1.8/gems/flvtool2-1.0.6/lib/flvtool2.rb:228
ERROR: /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
ERROR: /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
ERROR: /usr/lib/ruby/gems/1.8/gems/flvtool2-1.0.6/bin/flvtool2:2
ERROR: /usr/bin/flvtool2:19:in `load' ERROR: /usr/bin/flvtool2:19

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.