VideoHelp Forum
+ Reply to Thread
Results 1 to 6 of 6
Thread
  1. Member
    Join Date
    Nov 2006
    Location
    United States
    Search Comp PM
    Please help me if you can.

    I need to convert .mov files to .flv files on a linux web server that's
    running on RedHat Enterprise v4. I have ssh access as root, so there's
    pretty much no limit on what I'm "allowed" to do.

    I've installed ffmpeg and ffmpeg-php (I compiled them from the most
    recent source code - via svn).

    I've also built and installed mp3lame, ogg, vorbis, faac, faad, amr, etc.

    I used this to configure ffmpeg:

    ./configure --prefix=/usr --enable-mp3lame --enable-shared --enable-libogg
    --enable-vorbis --enable-a52 --enable-faac --enable-faad --enable-xvid
    --enable-pp --enable-dts --enable-gpl --enable-amr_nb --enable-amr_wb
    --enable-pthreads --enable-x264 --enable-a52bin --enable-faadbin

    I've enabled a lot of stuff in the ffmpeg configuration because I want to
    convert .avi, .mpg, etc. files as well as .mov files. But all the conversions
    will be [.whatever] -> .flv.

    When I run the test script (test_ffmpeg.php) from a browser, the output for
    a .mov file looks like this:

    file name = /home/kaspar/public_html/tests/test_media/CNN_Next.mov
    duration = 209.376 seconds
    frame count = 3141
    frame rate = 15.000 fps
    comment =
    title =
    author =
    copyright =
    frame height = 240 pixels
    frame width = 320 pixels
    has audio = Yes
    get pixel format = yuv420p
    get pixel aspect ratio = 1
    get video codec = mpeg4

    Fatal error: Could not open codec for /home/user/public_html/tests/test_media/CNN_Next.mov in /home/user/public_html/tests/test_ffmpeg.php on line 55

    Sounds like there's a problem with the codec that ffmpeg wants to use.

    Can anyone tell me what's wrong here? Which codec packages I need to
    install on the server? Or if I've configured ffmpeg wrong when I built it?

    Thanks in advance!
    Quote Quote  
  2. Member
    Join Date
    Dec 2004
    Location
    Australia
    Search Comp PM
    libavcodec handles mpeg4 decoding, also qdm2 audio decoding and you enabled faad (most qt files uses aac or qdm2 audio). I guess the mov uses a format of not supported by ffmpeg? If so there isn't anything you can do since ffmpeg only uses internal decoders.

    On second thoughts, line 55 appears to be about video bitrate, but that is v0.5.0. Svn I think is different since after getVideoCodec, I have getAudioCodec.

    Tried the test php file here and I got warnings for video on the mp3 (obviously no video) and warnings about audio with the video only avi. The code doesn't check if there is a video/audio stream. No fatal errors though.
    Quote Quote  
  3. Member
    Join Date
    Nov 2006
    Location
    United States
    Search Comp PM
    Thanks for looking into it, celtic_druid. I checked again and I wasn't sure
    I'd gotten ffmpeg-php from svn. So I fetched that and re-installed it. The
    line numbers are slightly different now. Running the test now gives exactly
    the same results, except the fatal error occurs at line 53, which is:

    printf("get audio codec = %s
    ", $mov->getAudioCodec());

    Note that I've changed all the /n to
    to make it easier to read in browser.

    Now it looks like ffmpeg didn't find the audio codec for the test .mov file.

    As for ffmpeg only using internal decoders, I suppose I was misled by the
    option of --enable--shared. I thought that meant it could use libraries that
    were external to ffmpeg/libavcodec.

    Can you suggest another way of determining which audio codec the .mov
    file needs? There might still be a solution to this failure if I had more info.
    Quote Quote  
  4. I'm a MEGA Super Moderator Baldrick's Avatar
    Join Date
    Aug 2000
    Location
    Sweden
    Search Comp PM
    moving you to our linux forum section.
    Quote Quote  
  5. Member
    Join Date
    Dec 2004
    Location
    Australia
    Search Comp PM
    --enable--shared means that ffmpeg compiles shared libraries. To use shared you --enable-mp3lame, etc. although it can use static ones.

    Identifying the audio would be nice, however if ffmpeg doesn't support it, then it doesn't support it. mediainfo or QuickTime itself should be able to identify what the audio is.
    Quote Quote  
  6. Member
    Join Date
    Nov 2006
    Location
    United States
    Search Comp PM
    Thanks for the tips. Audio is AAC LC, according to Mediainfo.

    Seems like ffmpeg should handle that, though. But when I try
    to convert it to .flv at the command line, it says:

    ffmpeg version 0.4.9-pre1, build 4718, Copyright (c) 2000-2004 Fabrice Bellard
    built on Nov 12 2006 12:26:11, gcc: 3.4.6 20060404 (Red Hat 3.4.6-3)
    Input #0, mov,mp4,m4a,3gp, from 'CNN.mov':
    Duration: N/A, bitrate: N/A
    No audio or video streams available

    I suppose that means it "can't handle the truth" about this file?
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!