Results 1 to 5 of 5

Thread: ffmpeg converts: video stream too slow.. plz help!

  1. #1
    Join Date
    Feb 2009
    Location
    Goa, India
    Beans
    55
    Distro
    Ubuntu 9.10 Karmic Koala

    ffmpeg converts: video stream too slow.. plz help!

    hey i tried converting a music vid in mkv format, vcodec=H264, acodec=mp3, r=24fps, to
    a 3gp format using acodec=libfaac, vcodec H263 and r=24fps, i got an output in which the video is too slow, as in the last 30 seconds contains no audio as there is nothing left to play but the video keeps goin on. Since the fps is the same in both files, could the vcodec be a problem?

    also plz tell me which codecs are suported by the following containers:
    avi, mkv, flv, 3gp, mpg

    i got the full listing of all codec supported by
    Code:
    ffmpeg -formats
    but this gives a gigantic list in which not all of them work.

    for example ,i cant convert using the mpeg codec, also, to get an mp3 audio stream, i can't just use
    Code:
    -acodec mp3
    , i am sure there are many more inconsistencies that i havn't come across since i have not yet experimented with all the codecs in the list. any pro ffmpeg-ers.. plz help.. i thot ffmpeg was sups to be a classy utility, to me it seems like a big hassle!!

  2. #2
    Join Date
    Mar 2006
    Location
    Devon UK
    Beans
    419

    Re: ffmpeg converts: video stream too slow.. plz help!

    Have you tried letting ffmpeg select the various codecs for you, if you just give a command like:
    Code:
    ffmpeg -i somefile.mkv outfile.3gp
    ffmpeg is horrendously complex and i usually just let it decide for itself.
    In /dev/null no one can hear the kernel panic!
    Don't EVER use sudo rm -rf / . if you don't understand a command check it out first!
    BACK UP YOUR DATA OR YOU WILL LOSE IT!!
    Supergrub - The best thing since sliced bread www.supergrubdisk.org

  3. #3
    Join Date
    Jul 2008
    Location
    Birmingham, England
    Beans
    2,400

    Re: ffmpeg converts: video stream too slow.. plz help!

    Quote Originally Posted by abhigyan91 View Post
    hey i tried converting a music vid in mkv format, vcodec=H264, acodec=mp3, r=24fps, to
    a 3gp format using acodec=libfaac, vcodec H263 and r=24fps, i got an output in which the video is too slow, as in the last 30 seconds contains no audio as there is nothing left to play but the video keeps goin on. Since the fps is the same in both files, could the vcodec be a problem?

    also plz tell me which codecs are suported by the following containers:
    avi, mkv, flv, 3gp, mpg

    i got the full listing of all codec supported by
    Code:
    ffmpeg -formats
    but this gives a gigantic list in which not all of them work.

    for example ,i cant convert using the mpeg codec, also, to get an mp3 audio stream, i can't just use
    Code:
    -acodec mp3
    , i am sure there are many more inconsistencies that i havn't come across since i have not yet experimented with all the codecs in the list. any pro ffmpeg-ers.. plz help.. i thot ffmpeg was sups to be a classy utility, to me it seems like a big hassle!!
    I would not specify the frame rate unless you need to change it, if left as is then it will simply copy it from the input. Also to get mp3 you need a different codec for it:

    Code:
    ffmpeg -i somefile.mkv -vcodec h264 -s 320x240 -aspect 4:3 -sameq -acodec libmp3lame -ac 2 -ab 128k output.3gp
    Use -vcodec copy to force copying of all video data - this will override the commands below

    • -vcodec h264 means encode in h264 (the other one I use is mpeg4)
    • -s 320x240 means size of 320x240
    • -aspect 4:3 means force a 4:3 aspect ratio (320/240 = 4/3)
    • -sameq means same quality (use -b <num>k to pick a bitrate


    Like above you can use -acodec copy to copy the audio and override the settings below

    • -acodec libmp3lame means encode to mp3 (it may also be liblamemp3) but another one is libfaac to encode to m4a
    • -ac 2 means dual channels
    • -ab 128k means 128kbps audio


    ffmpeg is a very classy utility and I am the envy of my windows friends because I can choose how to encode (for example I have a high quality video but sacrifice filesize because it is not a problem on a 2gb memory card). You just have to learn how to use it and for that it's best to look in the man page and pass whichever flags look cool xD

  4. #4
    Join Date
    Sep 2006
    Beans
    3,713

    Re: ffmpeg converts: video stream too slow.. plz help!

    Quote Originally Posted by abhigyan91 View Post
    hey i tried converting a music vid in mkv format, vcodec=H264, acodec=mp3, r=24fps, to
    a 3gp format using acodec=libfaac, vcodec H263 and r=24fps, i got an output in which the video is too slow, as in the last 30 seconds contains no audio as there is nothing left to play but the video keeps goin on. Since the fps is the same in both files, could the vcodec be a problem?

    also plz tell me which codecs are suported by the following containers:
    avi, mkv, flv, 3gp, mpg
    You may find this useful: Comparison of container formats [wikipedia.org]

    i got the full listing of all codec supported by
    Code:
    ffmpeg -formats
    but this gives a gigantic list in which not all of them work.

    for example ,i cant convert using the mpeg codec, also, to get an mp3 audio stream, i can't just use
    Code:
    -acodec mp3
    , i am sure there are many more inconsistencies that i havn't come across since i have not yet experimented with all the codecs in the list. any pro ffmpeg-ers.. plz help.. i thot ffmpeg was sups to be a classy utility, to me it seems like a big hassle!!
    Default FFmpeg in the Ubuntu repository does not have restricted encoders enabled, so you have to do it manually but it isn't too hard:

    HOWTO: Easily enable MP3, MPEG4, AAC, and other restricted encoding in FFmpeg [ubuntuforums.org]

  5. #5
    Join Date
    Feb 2009
    Location
    Goa, India
    Beans
    55
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: ffmpeg converts: video stream too slow.. plz help!

    @FakeOutdoorsman: Thank you for the wikipedia site, exactly what i needed. I had already installed the unstripped version of ffmpeg(option B in the link you provided), though still, i am not able to acess some codecs like mpeg and mpeg4.

    @supersonic: Thanks for the mini-tutorial, i din;t know libmp3lame was the name for encoding in mp3.

    however, i still am not able to convert properly, the video is too slow, making the video go on even while the audio stops. Also the quality is not the same even if i use -sameq.. I am planning to reinstall ffmpeg and compile it from the source code itself, maybe that will help.

Tags for this Thread

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
  •