FFMPEG Help D:

Discussion in 'Programming' started by mc2fred, May 3, 2010.

  1. #1
    I'm having a hard time converting a mp4 file... every time it outputs as an empty file.

    Here's my command line :

    ffmpeg -i video1.mp4 -vcodec libx264 -pass 2 -r 29.97 -b 4000 -s 1280x720 -acodec libfaac -ab 192 -ar 48000 -ac 2 video2.mp4

    ffmpeg as worked before and I did not change the configuration of the server nor php since.
    The permissions allow for rwx (777)

    Please help :confused:
     
    mc2fred, May 3, 2010 IP
  2. ccoonen

    ccoonen Well-Known Member

    Messages:
    1,606
    Likes Received:
    71
    Best Answers:
    0
    Trophy Points:
    160
    #2
    get a GUI tool to do it for you, they will output the correct usage syntax for what you want to do.
     
    ccoonen, May 4, 2010 IP
  3. mc2fred

    mc2fred Peon

    Messages:
    16
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    The thing is that it has to be done server-side... we already have programs to do compressions, but we decided to switch to ffmpeg so we can manipulate the files at the same time and save time.

    I've already worked out the php program and the line for most of the compressions we have to do (7 in total).

    I've checked with the lead programmer in charge of the server and he told me that the ffmpeg presets were enabled as well as libx264.

    It's the only codec im having trouble with... any ideas ?
     
    mc2fred, May 4, 2010 IP
  4. mc2fred

    mc2fred Peon

    Messages:
    16
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I've found the problem,


    after completing all the other compressions, I've found that the bitrate for the second pass has to be in bits and equal or greater than the first pass bitrate or else it returns an empty file. Plus, if you set your bitrate in bits (instead of kbits) you will have to write the audio bitrate in bits as well.

    The documentation about 2 pass rendering is pretty rare D:
     
    mc2fred, May 4, 2010 IP
  5. niscterpicturez

    niscterpicturez Peon

    Messages:
    98
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Insert a GUI tool
     
    niscterpicturez, May 4, 2010 IP
  6. NeoCambell

    NeoCambell Peon

    Messages:
    456
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #6
    The value for -b changes from version to version.
    For example, in version 0.5, it uses bits/sec and in version SVN-r6179, it is kbit/s.

    See FFMPEG Command Line Arguments with two EXEs of those versions.

    GUI version is not used when we use ffmpeg for server side encoding.
     
    NeoCambell, May 12, 2010 IP
  7. lmtiger47

    lmtiger47 Peon

    Messages:
    31
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    My suggestion is not to go with 2 passes, since it is not worth of CPU time. Just raise the bitrate a bit and you will be satisfied with results.
     
    lmtiger47, May 31, 2010 IP