Page 1 of 3 123 LastLast
Results 1 to 10 of 24

Thread: Change conversion command ffmpeg/mencoder

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

    Default Change conversion command ffmpeg/mencoder

    You can use mencoder or ffmpeg to do conversion of video to FLV format. You can choose the one that works well on your server. To set this, edit the file 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;

    If you need to use ffmpg for all video convertions, change

    Code:
    $cmd_all = $cmd_mencoder;
    to

    Code:
    $cmd_all = $cmd_ffmpeg;

    If you need to use ffmpge for converting files with extension dat, then use

    $convert_dat = $cmd_ffmpeg;
    You can also use your own custom convertion command for each of the file extensions.

  2. #2
    Join Date
    May 2007
    Posts
    4

    Default

    Thank you

  3. #3
    Join Date
    May 2007
    Posts
    588

    Default

    which is better?

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

    Default

    mencoder support more formats.

    For more details, go a search

    http://www.google.com/search?q=ffmpeg+vs+mencoder

  5. #5
    Join Date
    May 2007
    Posts
    98

    Default

    I had to use ffmpeg for .wmv videos.

    The quality was really awful with mencoder.

    So, I use:

    Code:
    $convert_wmv = $cmd_ffmpeg;
    Now I have to finetune the bitrates to get the optimal quality/size...

  6. #6
    Join Date
    Jun 2007
    Posts
    5

    Default Re: Change conversion command ffmpeg/mencoder

    Quote Originally Posted by admin
    You can use mencoder or ffmpeg to do conversion of video to FLV format. You can choose the one that works well on your server. To set this, edit the file 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;

    If you need to use ffmpg for all video convertions, change

    Code:
    $cmd_all = $cmd_mencoder;
    to

    Code:
    $cmd_all = $cmd_ffmpeg;

    If you need to use ffmpge for converting files with extension dat, then use

    $convert_dat = $cmd_ffmpeg;
    You can also use your own custom convertion command for each of the file extensions.

    I cant find this file include/settings/video_conversion.php. Where is it? Should I create it? It is not in the include folder. There is also no settings folder in there.

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

    Default

    This will be available if you are using release - 20070530

    You can see release by loging into admin area.

  8. #8

    Default

    How come this doesn't work? I have changed the file according to the instructions here and it still defaults to ffmpeg.

  9. #9
    Join Date
    Jun 2007
    Posts
    5

    Default No FLV video for me

    I have crawled this forum for a while and have tried many remedies suggested by Admin, but I still cannot get my site to convert uploaded video to flv file.
    Here's the major problem. I am an experienced Windows admin, but have learned everything I know about linux in the past 4 weeks trying to get this site to work.
    I am self hosting and running UBUNTU/Debian linux (Dapper release) and have managed to get the site requirements installed, in addition to the Vshare script. Most things seems to be working including file uploads but the end result is that a .flv file is not created, despite there being no obvious reason for the failure in the debug.txt file.

    Here is a snippet from my debug.txt file

    ################### VSHARE DEBUG LOG START ###################


    Temporary File Name :/tmp/phpIVQPWu
    File Size :69818368
    File Type :video/mpeg
    File Name :AV11252005_190804.mpg

    -------------------------------------------------------------

    INSERT INTO video SET

    UID=2,

    title='DUNE_TEST_3',

    description='DUNE TEST 3',

    keyword='test3 dune3',

    channel='0|7|0',

    space = '67',

    addtime='1183668887',

    adddate='2007-07-05',

    vkey='758126099',

    type='public',

    active=0,

    filehome=''

    -------------------------------------------------------------

    SQL EXECUTED

    LAST INSERT ID = 3
    VIDEO URL = http://www.howdudothat.com/vshare/view/3/dune-test-3/
    VIDEO LOCATION = /var/www/vshare/video/3.mpg
    Uploded File Moved to: /var/www/vshare/video/3.mpg
    Initialize ffmpeg - Begin
    Initialize ffmpeg - END
    Get video duration - START
    Get video duration - END
    DURATION: 215.724866
    Create Thumbnail - START
    Create Thumbnail - END

    CONVERT COMMAND:

    /usr/local/bin -i /var/www/vshare/video/3.mpg -acodec mp3 -ar 22050 -ab 32 -f flv /var/www/vshare/flvideo/3.flv


    UPDATE VIDEO SQL:
    update video set

    vdoname='3.mpg',

    flvdoname='3.flv',

    duration='215.724866' WHERE VID=3


    And here is what happens when I run the suggested Convert.php script with the appropriate convert command:

    Last line of the output:
    Return value: 126


    What does this mean?

    I have tried using both mencoder and ffmpeg in the video_conversion.php script to no avail.

    What am I missing here? What else can I do to try and see where the file conversion is breaking down?

    Please help. :cry:

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

    Default

    The convert command from the log file says

    /usr/local/bin -i /var/www/vshare/video/3.mpg -acodec mp3 -ar 22050 -ab 32 -f flv /var/www/vshare/flvideo/3.flv
    Ask your web host if they can run it on the server ?

    Path to ffmpeg ends with ffmpeg. Your says /usr/local/bin that is not correct. Ask your web host about correct path of ffmpeg, mencoder, etc... Then fix it in config.php, it should end with ffmpeg.

    If video is not getting converted, you need to check if convert command works on the server, if not it is problem with your requirements not properly working on the server.

Page 1 of 3 123 LastLast

Similar Threads

  1. Downloading FFmpeg,Mplayer, Mencoder and Flvtool2
    By tanjiajun_34 in forum Installation Support
    Replies: 1
    Last Post: 01-16-2008, 04:14 PM
  2. 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
  3. increase video quaility with mencoder scale command.
    By leki in forum Template Modifications
    Replies: 2
    Last Post: 09-07-2007, 07:39 PM
  4. FFmpeg, Mencoder, ect...
    By Killerbee in forum Installation Support
    Replies: 2
    Last Post: 08-18-2007, 02:08 PM
  5. mencoder not working? use FFMPEG INSTEAD! :)
    By mersh in forum Installation Support
    Replies: 10
    Last Post: 06-28-2007, 08:56 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
  •