Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: mencoder not working? use FFMPEG INSTEAD! :)

  1. #1
    Join Date
    May 2007
    Posts
    394

    Default mencoder not working? use FFMPEG INSTEAD! :)

    Hello:

    This is not a problem with the script, but rather my setup. When I upload an mpg (one I successfully uploaded to your vshare demo site) everything SEEMS to go fine. The mpeg is uploaded, there's a thumbnail for the file, but no flv file is actually placed in the flvideo folder. The uploaded movie itself appears in the video folder, but no corresponding FLV file - although the data for the file is there, including run time...

    flvtool2 seems to be installed properly and working,
    so does ffmpeg, and ffmpeg-php http://TheWall.net/phpinfo.php

    FLV files that are uploaded work fine.

    Here's an example of one that is not working:
    http://www.thewall.net/view/2/test/

    There's a thumbnail, and it THINKS the flv file is there, but it's not.

    IF anyone has any ideas what I should be looking at, I'd really appreciate it.

  2. #2
    Join Date
    Apr 2007
    Posts
    2,202

    Default

    It seems there is problem with mencoder installation on your server, check if your server can run the conversion command with out errors

    /usr/local/bin/mencoder /home/thewall_net/public_html/video/7.mpg -o /home/thewall_net/public_html/flvideo/7.flv -of lavf -oac mp3lame -lameopts abr:br=56 -ovc lavc -lavcopts vcodec=flv:vbitrate=500:mbd=2:mv0:trell:v4mv:cbp:l ast_pred=3 -srate 22050 -lavfopts i_certify_that_my_video_stream_does_not_use_b_fram es
    You can ask the server admin to run the command on SSH prompt or try running it from PHP script as described in

    http://forums.buyscripts.in/viewtopic.php?t=351

  3. #3
    Join Date
    May 2007
    Posts
    394

    Default

    Here's what I tried while logged in as root (copied from debug.txt)

    Code:
    /usr/local/bin/mencoder /home/thewall_net/public_html/video/9.mpg -o /home/thewall_net/public_html/flvideo/9.flv -of lavf -oac mp3lame -lameopts abr:br=56 -ovc lavc -lavcopts vcodec=flv:vbitrate=500:mbd=2:mv0:trell:v4mv:cbp:last_pred=3 -srate 22050 -lavfopts i_certify_that_my_video_stream_does_not_use_b_frames
    Here's the error I got:
    Code:
    MPlayer was compiled without libmp3lame support.
    -lameopts is not an MEncoder option
    Meanwhile, if I locate libmp3lame.so:

    Code:
    [root@clicker1 lame-3.97]# locate libmp3lame.so
    /usr/lib/libmp3lame.so.0
    /usr/local/lib/libmp3lame.so.0.0.0
    /usr/local/lib/libmp3lame.so.0
    /usr/local/lib/libmp3lame.so
    AND when I ./configure mplayer, I see this:

    Code:
    Checking for libmp3lame (for mencoder) ... yes 
    Checking for mencoder ... yes
    Real head scratcher.....

  4. #4
    Join Date
    May 2007
    Posts
    394

    Default

    Well, the problem with the above, was that I did not configure libmp3lame as shared.

    I uninstalled both programs, then recompiled libmp3lame with shared enabled, made and installed, did same with mplayer (for mencoder)

    Now it does something more than it did before, but not much.

    I get a zero-byte flv file.

    Here's the command line feedback:

    [root@clicker1 flvtool2-1.0.6]# /usr/local/bin/mencoder /home/thewall_net/public_html/video/12.wmv -o /home/thewall_net/public_html/flvideo/12.flv -of lavf -oac mp3lame -lameopts abr:br=56 -ovc lavc -lavcopts vcodec=flv:vbitrate=500:mbd=2:mv0:trell:v4mv:cbp:l ast_pred=3 -srate 22050 -lavfopts i_certify_that_my_video_stream_does_not_use_b_fram es
    MEncoder dev-SVN-r23322-3.4.6 (C) 2000-2007 MPlayer Team
    CPU: Intel(R) Core(TM)2 CPU 6400 @ 2.13GHz (Family: 6, Model: 15, Stepping: 6)
    CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
    Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2

    success: format: 0 data: 0x0 - 0x88443
    ASF file format detected.
    [asfheader] Audio stream found, -aid 1
    [asfheader] Video stream found, -vid 2
    VIDEO: [WMV3] 320x240 24bpp 1000.000 fps 0.0 kbps ( 0.0 kbyte/s)
    [V] filefmt:6 fourcc:0x33564D57 size:320x240 fps:1000.00 ftime:=0.0010
    ================================================== ========================
    Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
    AUDIO: 44100 Hz, 2 ch, s16le, 88.1 kbit/6.24% (ratio: 11015->176400)
    Selected audio codec: [ffwmav2] afm: ffmpeg (DivX audio v2 (FFmpeg))
    ================================================== ========================
    ** MUXER_LAVF ************************************************** ***************
    You have certified that your video stream does not contain B frames.
    REMEMBER: MEncoder's libavformat muxing is presently broken and will generate
    INCORRECT files in the presence of B frames. Moreover, due to bugs MPlayer
    will play these INCORRECT files as if nothing were wrong!
    ************************************************** *****************************
    OK, exit
    Opening video filter: [expand osd=1]
    Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
    ================================================== ========================
    Opening video decoder: [dmo] DMO video codecs
    DMO dll supports VO Optimizations 0 1
    DMO dll might use previous sample when requested
    GetOutput r=0x0 size:230400 align:1
    StreamCount r=0x0 1 1
    Decoder supports the following formats: YV12 YUY2 UYVY YVYU RGB8 RGB555 RGB565 RGB24 RGB32
    Decoder is capable of YUV output (flags 0x1b)
    VDec: vo config request - 320 x 240 (preferred colorspace: Packed YUY2)
    VDec: using Planar YV12 as output csp (no 0)
    Movie-Aspect is undefined - no prescaling applied.
    videocodec: libavcodec (320x240 fourcc=31564c46 [FLV1])
    [VE_LAVC] High quality encoding selected (non-realtime)!
    Selected video codec: [wmv9dmo] vfm: dmo (Windows Media Video 9 DMO)
    ================================================== ========================

    Exiting...
    [root@clicker1 flvtool2-1.0.6]#


    It looks to me like it thinks it did the job...

    if any ideas, would be thankful.
    I've tried this with wmv, mov, and mpg, same results. I get a thumbnail of any of them, but a zero-byte flv file.

    thanks for any help that might find it's way here :)

  5. #5
    Join Date
    Apr 2007
    Posts
    2,202

    Default

    I don't know why it is not working for you. You can ask in mplayer mailing list to find a solution or use ffmpeg for converting video.

  6. #6
    Join Date
    May 2007
    Posts
    394

    Default

    Quote Originally Posted by admin
    I don't know why it is not working for you. You can ask in mplayer mailing list to find a solution or use ffmpeg for converting video.
    Yah, that's a good idea. I did sign up on their mailing list and will send in the question.

    How would I tell the script to use ffmepg?

  7. #7
    Join Date
    Apr 2007
    Posts
    2,202

    Default

    in include/settings/video_conversion.php


    Code:
    <?php
    
    $cmd_ffmpeg = "$config[ffmpeg] -i $video_src -acodec mp3 -ar 22050 -ab 32 -f flv $video_flv";
    $cmd_mencoder = "$config[mencoder] $video_src -o $video_flv -of lavf -oac mp3lame -lameopts abr:br=56 -ovc lavc -lavcopts vcodec=flv:vbitrate=500:mbd=2:mv0:trell:v4mv:cbp:last_pred=3 -srate 22050 -lavfopts i_certify_that_my_video_stream_does_not_use_b_frames";
    
    $cmd_all = $cmd_mencoder;
    
    
    $convert_3gp = $cmd_all;
    $convert_mp4 = $cmd_all;
    $convert_mov = $cmd_all;
    $convert_asf = $cmd_all;
    $convert_mpg = $cmd_all;
    $convert_avi = $cmd_all;
    $convert_mpeg = $cmd_all;
    $convert_wmv = $cmd_all;
    $convert_rm = $cmd_all;
    $convert_dat = $cmd_all;

    Find

    Code:
    $cmd_all = $cmd_mencoder;
    Replace with

    Code:
    $cmd_all = $cmd_ffmpeg;

  8. #8

    Default

    Quote Originally Posted by admin
    in include/settings/video_conversion.php


    Code:
    <?php
    
    $cmd_ffmpeg = "$config[ffmpeg] -i $video_src -acodec mp3 -ar 22050 -ab 32 -f flv $video_flv";
    $cmd_mencoder = "$config[mencoder] $video_src -o $video_flv -of lavf -oac mp3lame -lameopts abr:br=56 -ovc lavc -lavcopts vcodec=flv:vbitrate=500:mbd=2:mv0:trell:v4mv:cbp:last_pred=3 -srate 22050 -lavfopts i_certify_that_my_video_stream_does_not_use_b_frames";
    
    $cmd_all = $cmd_mencoder;
    
    
    $convert_3gp = $cmd_all;
    $convert_mp4 = $cmd_all;
    $convert_mov = $cmd_all;
    $convert_asf = $cmd_all;
    $convert_mpg = $cmd_all;
    $convert_avi = $cmd_all;
    $convert_mpeg = $cmd_all;
    $convert_wmv = $cmd_all;
    $convert_rm = $cmd_all;
    $convert_dat = $cmd_all;

    Find

    Code:
    $cmd_all = $cmd_mencoder;
    Replace with

    Code:
    $cmd_all = $cmd_ffmpeg;
    Admin, which is better? $cmd_mencoder or $cmd_ffmpeg

  9. #9
    Join Date
    May 2007
    Posts
    394

    Default

    Quote Originally Posted by admin
    in include/settings/video_conversion.php
    Find
    Code:
    $cmd_all = $cmd_mencoder;
    Replace with
    Code:
    $cmd_all = $cmd_ffmpeg;
    WOO-HOO!!!!!!!!!!!!!!!!!!! That works! Thank you SO much admin... appreciate you looking at this!

    Quote Originally Posted by spun2u
    Admin, which is better? $cmd_mencoder or $cmd_ffmpeg
    Spun2u, I've heard that mencoder does better, but this sure works fine for me. Some day I'll get mencoder working again, but this works just dandy.

    Thanks again admin.

  10. #10
    Join Date
    Apr 2007
    Posts
    2,202

    Default

    mencoder support more video formats than ffmpeg. It is told mencoder take less system resource to do the video conversion.

Page 1 of 2 12 LastLast

Similar Threads

  1. Change conversion command ffmpeg/mencoder
    By admin in forum Frequently Asked Questions
    Replies: 23
    Last Post: 07-10-2008, 09:15 PM
  2. install program for [FFmpeg ,Mplayer + Mencoder ,Flvtool2 ]
    By nivekos in forum Installation Support
    Replies: 1
    Last Post: 06-30-2008, 02:26 AM
  3. Downloading FFmpeg,Mplayer, Mencoder and Flvtool2
    By tanjiajun_34 in forum Installation Support
    Replies: 1
    Last Post: 01-16-2008, 04:14 PM
  4. Video formats that don't work with vshare (mencoder/ffmpeg)
    By leki in forum Frequently Asked Questions
    Replies: 5
    Last Post: 10-28-2007, 02:04 AM
  5. FFmpeg, Mencoder, ect...
    By Killerbee in forum Installation Support
    Replies: 2
    Last Post: 08-18-2007, 02:08 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •