Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 32

Thread: Problems converting to mp4 with mencoder and ffmpeg

  1. #21
    Join Date
    Aug 2009
    Location
    Caracas,Venezuela.
    Beans
    65
    Distro
    Ubuntu 10.04 Lucid Lynx

    Angry Re: Problems converting to mp4 with mencoder and ffmpeg

    Quote Originally Posted by andrew.46 View Post
    Mobile phones can be a little picky about codecs unfortunately. Grab one or two of the files that work and run FFmpeg across them:
    Code:
    ffmpeg -i input.mp4
    and post the terminal output here. Of course replace the name 'input.mp4' with the name of your own file.
    Done, this is what appears in prompt:

    Code:
    ffmpeg -i Forzadeldestino1-1.mp4 
    FFmpeg version SVN-r0.5.9-4:0.5.9-0ubuntu0.10.04.3, Copyright (c) 2000-2009 Fabrice Bellard, et al.
      configuration: --extra-version=4:0.5.9-0ubuntu0.10.04.3 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --disable-stripping --disable-vhook --enable-runtime-cpudetect --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --enable-shared --disable-static
      libavutil     49.15. 0 / 49.15. 0
      libavcodec    52.20. 1 / 52.20. 1
      libavformat   52.31. 0 / 52.31. 0
      libavdevice   52. 1. 0 / 52. 1. 0
      libavfilter    0. 4. 0 /  0. 4. 0
      libswscale     0. 7. 1 /  0. 7. 1
      libpostproc   51. 2. 0 / 51. 2. 0
      built on Jan 24 2013 19:42:59, gcc: 4.4.3
    
    Seems stream 0 codec frame rate differs from container frame rate: 30000.00 (30000/1) -> 29.97 (30000/1001)
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Forzadeldestino1-1.mp4':
      Duration: 00:26:17.59, start: 0.000000, bitrate: 2355 kb/s
        Stream #0.0(und): Video: mpeg4, yuv420p, 480x360 [PAR 1:1 DAR 4:3], 29.97 tbr, 29.97 tbn, 30k tbc
        Stream #0.1(und): Audio: mp3, 48000 Hz, stereo, s16, 112 kb/s
    At least one output file must be specified
    Note: if this is helpful, I used acidrip to rip my DVD's to my computer in an .avi format...in acidrip could be read "codec: mp3lame".

  2. #22
    Join Date
    Dec 2006
    Beans
    6,940

    Re: Problems converting to mp4 with mencoder and ffmpeg

    I am sorry I actually meant files that played on your phone, sorry for the confusion!
    You think that's air you're breathing now?

  3. #23
    Join Date
    Aug 2009
    Location
    Caracas,Venezuela.
    Beans
    65
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Problems converting to mp4 with mencoder and ffmpeg

    Quote Originally Posted by andrew.46 View Post
    I am sorry I actually meant files that played on your phone, sorry for the confusion!
    Well, I can't use ffmpeg on my cell phone, but I read "File Format not supported"..but trust me, it has nothing to do with the cellphone, because it plays mp4 and 3gp files well...the only files it can't play are those i created with ffmpeg.

  4. #24
    Join Date
    Sep 2006
    Beans
    3,494

    Re: Problems converting to mp4 with mencoder and ffmpeg

    It has everything to do with the phone. If you find a video that works on the phone, and copy it to your computer, you can obtain the details of the file with ffmpeg. This information can be used to create a video that may work on the phone.

  5. #25
    Join Date
    Dec 2006
    Beans
    6,940

    Re: Problems converting to mp4 with mencoder and ffmpeg

    Quote Originally Posted by Johann-1.0 View Post
    Well, I can't use ffmpeg on my cell phone, but I read "File Format not supported"..but trust me, it has nothing to do with the cellphone, because it plays mp4 and 3gp files well...the only files it can't play are those i created with ffmpeg.
    As FakeOutdoorsman has mentioned you need to get one of the successful video files from your phone to your computer, can you hook in a usb cable and drag one across or bluetooth one across? The mp4 container can hold many different codecs and your phone has an aversion to some of these or perhaps to some small setting within an otherwise acceptable codec...
    You think that's air you're breathing now?

  6. #26
    Join Date
    May 2008
    Location
    United Kingdom
    Beans
    4,265
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Problems converting to mp4 with mencoder and ffmpeg

    Quote Originally Posted by FakeOutdoorsman View Post
    libav users should use avconv instead of the libav version of ffmpeg.
    Thank you for your replies, FakeOutdoorsman.

    I see on the ffmpeg download page:
    FFmpeg Ubuntu packages for Precise, Oneiric, Natty, Maverick, and Lucid (amd64, i386) are available at Jon Severinsson's FFmpeg PPA.
    Is it sufficient for me to add that PPA and update ffmpeg that way? Or will there be conflicts with Ubuntu?
    Problems with WINE?
    Full Circle Magazine :: Confused "allot"? :: Cheap Linux stickers
    In my day, we had outdoors in which to run, play, and socialise. Now we have computers to do those.

  7. #27
    Join Date
    Aug 2009
    Location
    Caracas,Venezuela.
    Beans
    65
    Distro
    Ubuntu 10.04 Lucid Lynx

    Talking Re: Problems converting to mp4 with mencoder and ffmpeg

    Ooooooooooook, sorry for the misunderstanding.

    Here is the prompt message:

    Code:
    ffmpeg -i gutenacht.3gp 
    FFmpeg version SVN-r0.5.9-4:0.5.9-0ubuntu0.10.04.3, Copyright (c) 2000-2009 Fabrice Bellard, et al.
      configuration: --extra-version=4:0.5.9-0ubuntu0.10.04.3 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --disable-stripping --disable-vhook --enable-runtime-cpudetect --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --enable-shared --disable-static
      libavutil     49.15. 0 / 49.15. 0
      libavcodec    52.20. 1 / 52.20. 1
      libavformat   52.31. 0 / 52.31. 0
      libavdevice   52. 1. 0 / 52. 1. 0
      libavfilter    0. 4. 0 /  0. 4. 0
      libswscale     0. 7. 1 /  0. 7. 1
      libpostproc   51. 2. 0 / 51. 2. 0
      built on Jan 24 2013 19:42:59, gcc: 4.4.3
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'gutenacht.3gp':
      Duration: 00:05:42.75, start: 0.000000, bitrate: 84 kb/s
        Stream #0.0(und): Audio: aac, 22050 Hz, mono, s16
        Stream #0.1(und): Video: mpeg4, yuv420p, 176x144 [PAR 1:1 DAR 11:9], 12 tbr, 12 tbn, 12 tbc
    At least one output file must be specified
    This video works great...but is in 3gp...so it could be good to try with 3gp instead of mp4 with ffmpeg.

    In fact, I'm observing that only 3gp videos play ok...in mp4 files only works the sound, not the images. How can I convert to 3gp instead in ffmpeg?
    Last edited by Johann-1.0; February 12th, 2013 at 02:26 PM. Reason: Wrong information

  8. #28
    Join Date
    Oct 2010
    Location
    London
    Beans
    481
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Problems converting to mp4 with mencoder and ffmpeg

    To use 3gp, simply use .3gp instead of .mp4 for your output.

  9. #29
    Join Date
    Aug 2009
    Location
    Caracas,Venezuela.
    Beans
    65
    Distro
    Ubuntu 10.04 Lucid Lynx

    Unhappy Re: Problems converting to mp4 with mencoder and ffmpeg

    Quote Originally Posted by evilsoup View Post
    To use 3gp, simply use .3gp instead of .mp4 for your output.
    It doesn't work

    Code:
    Forzadeldestino1-1.avi
    
    convertirarchivos: 29: -acodec: not found
    FFmpeg version SVN-r0.5.9-4:0.5.9-0ubuntu0.10.04.3, Copyright (c) 2000-2009 Fabrice Bellard, et al.
      configuration: --extra-version=4:0.5.9-0ubuntu0.10.04.3 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --disable-stripping --disable-vhook --enable-runtime-cpudetect --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --enable-shared --disable-static
      libavutil     49.15. 0 / 49.15. 0
      libavcodec    52.20. 1 / 52.20. 1
      libavformat   52.31. 0 / 52.31. 0
      libavdevice   52. 1. 0 / 52. 1. 0
      libavfilter    0. 4. 0 /  0. 4. 0
      libswscale     0. 7. 1 /  0. 7. 1
      libpostproc   51. 2. 0 / 51. 2. 0
      built on Jan 24 2013 19:42:59, gcc: 4.4.3
    
    Seems stream 0 codec frame rate differs from container frame rate: 30000.00 (30000/1) -> 29.97 (30000/1001)
    Input #0, avi, from 'Forzadeldestino1-1.avi':
      Duration: 00:26:17.59, start: 0.000000, bitrate: 2364 kb/s
        Stream #0.0: Video: mpeg4, yuv420p, 480x360 [PAR 1:1 DAR 4:3], 29.97 tbr, 29.97 tbn, 30k tbc
        Stream #0.1: Audio: mp3, 48000 Hz, stereo, s16, 112 kb/s
    Output #0, 3gp, to 'Forzadeldestino1-1.3gp':
        Stream #0.0: Video: h263, yuv420p, 480x360 [PAR 1:1 DAR 4:3], q=2-31, 200 kb/s, 90k tbn, 29.97 tbc
        Stream #0.1: Audio: 0x0000, 48000 Hz, stereo, s16, 64 kb/s
    Stream mapping:
      Stream #0.0 -> #0.0
      Stream #0.1 -> #0.1
    [h263 @ 0x1206100]The specified picture size of 480x360 is not valid for the H.263 codec.
    Valid sizes are 128x96, 176x144, 352x288, 704x576, and 1408x1152. Try H.263+.
    Error while opening codec for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height

  10. #30
    Join Date
    Oct 2010
    Location
    London
    Beans
    481
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Problems converting to mp4 with mencoder and ffmpeg

    I would recommend upgrading to a more up-to-date version of fmpeg, according to your terminal your version is from 2009! this PPA is a good one. I think that what I am about to write will not work on the version you have at the moment.

    Once you've done that, the following command should create an output file with the same parameters to your 3gp file that works on your phone:

    Code:
    ##  convert 16:9 video
    ffmpeg -i input.avi -map 0:a -map 0:v -filter:v 'scale=176:-1,pad=176:144:(ow-iw)/2:(oh-ih)/2' \
    -c:v mpeg4 -q:v 4 -c:a aac -b:a 96k -ac 1 -ar 22050 -strict experimental output.3gp
    
    ##  convert 4:3 video
    ffmpeg -i input.avi -map 0:a -map 0:v -filter:v 'scale=-1:144,pad=176:144:(ow-iw)/2:(oh-ih)/2' \
    -c:v mpeg4 -q:v 4 -c:a aac -b:a 96k -ac 1 -ar 22050 -strict experimental output.3gp
    The scale video filter... well, scales the video down - the 16:9 does so width-wise, scaling the height to keep in ratio with the width, and the 4:3 one does it height-wise. This is then fed to the pad, which puts the scaled video over the centre of a black box with a size of 176x144.

    -ac 1 -ar 22050 makes the audio mono and gives it a sample rate of 22050 Hz. These are probably not strictly necessary. -map 0:a -map 0:v tells ffmpeg to make the audio be the first stream (stream 0) and the video be after the audio. Again, probably not necessary. The rest of the options are standard ffmpeg encoder things.

Page 3 of 4 FirstFirst 1234 LastLast

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
  •