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

Thread: HOWTO: Quickly convert videos to Ipod / Smartphone format

  1. #1
    Join Date
    Mar 2006
    Beans
    228

    HOWTO: Quickly convert videos to Ipod / Smartphone format

    Found a little script that will convert videos to IPod video format (i.e. mp4 with xvid and aac encoding) utilising ffmpeg and ruby. The nice thing about this is that it will preserve the original aspect ratio and add black bars depending, so videos look like they should do (well aside from being in QVGA 320x240 resolution!). Some smartphones (such as the Nokia N95) are also able to display this format =)

    The script can be found here

    For a little HOWTO:

    Open up synaptic and ensure that you have ffmpeg and ruby installed/

    Download the script:

    Code:
    wget http://thomer.com/howtos/mp4ize
    Make it so you can run it:

    Code:
    chmod +x mp4ize
    Move it so it's system-wide:

    Code:
    sudo mv mp4ize /usr/local/bin
    Now, if you want to convert a video, just open up a terminal and type mp4ize [videoname] and it will make an IPod mp4 version in the same folder. Enterprising Nautilus Actions users may want to add a right click menu version for this by adding /usr/local/bin/mp4ize as a path and %M as a parameter.

  2. #2
    Join Date
    Nov 2006
    Location
    Gloucester, ENGLAND
    Beans
    201

    Re: HOWTO: Quickly convert videos to Ipod / Smartphone format

    works great, would be nice if we could adjust the framerame aswell

    i find video bitrate of 200 and audio of 64 works best

    would like to drop fps to 15 on all the videos as well

    any possibility you can add this feature?

  3. #3
    Join Date
    Mar 2006
    Beans
    228

    Re: HOWTO: Quickly convert videos to Ipod / Smartphone format

    Hiya

    As I mentioned, I didn't do the actual mp4ize script, but I would imagine that it's possible to change the ruby script

    Code:
    DEFAULT_ARGS = "-f mp4 -vcodec xvid -maxrate 1000 -qmin 3 -qmax 5 -bufsize 4096 -g 300 -acodec aac"
    and add -r 15 (though check with man ffmpeg, then resave the file.

    Will try and bit later - good point about the n95 max rate, didn't realise it was 15.

  4. #4
    Join Date
    Mar 2006
    Beans
    228

    Re: HOWTO: Quickly convert videos to Ipod / Smartphone format

    Altered the framerate and bitrates to your specs - takes off a fair chunk of the file size (approx a 1/3rd on the two I've tried).

    Edit: The second file is the script with the bitrate changes but not the framerate changes - this increases the resultant file size a little, but gets rid of the choppiness.
    Attached Files Attached Files
    Last edited by Footissimo; August 14th, 2007 at 06:44 AM.

  5. #5
    Join Date
    Feb 2006
    Location
    Amsterdam
    Beans
    28
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: HOWTO: Quickly convert videos to Ipod / Smartphone format

    Hey thanks for the tutorial..!
    But actually i read that the video play of n95 fps was max 30 fps..?

    I tried to do what you did with the first script and it works for several video files but with every video my n95 doesn't play audio but it does play the video.. What should i do to also make the audio work?
    Or should I try another video convertor..?
    Thankss

  6. #6
    Join Date
    Feb 2007
    Beans
    29
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: HOWTO: Quickly convert videos to Ipod / Smartphone format

    Hi guys, I am getting this when I try to run it. Any help would be greatly appreciated.

    Code:
    jzl@fawn:~/Desktop$ mp4ize test.avi FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2004 Fabrice Bellard
      configuration:  --enable-gpl --enable-pp --enable-pthreads --enable-vorbis --enable-libogg --enable-a52 --enable-dts --enable-libgsm --enable-dc1394 --disable-debug --enable-shared --prefix=/usr 
      libavutil version: 0d.49.0.0
      libavcodec version: 0d.51.11.0
      libavformat version: 0d.50.5.0
      built on Jan 28 2007 22:48:38, gcc: 4.1.2 20070106 (prerelease) (Ubuntu 4.1.1-21ubuntu7)
    Input #0, avi, from 'test.avi':
      Duration: 00:42:40.5, start: 0.000000, bitrate: 1146 kb/s
      Stream #0.0: Video: mpeg4, yuv420p, 624x352, 23.98 fps(r)
      Stream #0.1: Audio: mp3, 48000 Hz, stereo, 160 kb/s
    Must supply at least one output file
    FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2004 Fabrice Bellard
      configuration:  --enable-gpl --enable-pp --enable-pthreads --enable-vorbis --enable-libogg --enable-a52 --enable-dts --enable-libgsm --enable-dc1394 --disable-debug --enable-shared --prefix=/usr 
      libavutil version: 0d.49.0.0
      libavcodec version: 0d.51.11.0
      libavformat version: 0d.50.5.0
      built on Jan 28 2007 22:48:38, gcc: 4.1.2 20070106 (prerelease) (Ubuntu 4.1.1-21ubuntu7)
    Unknown codec 'xvid'

  7. #7
    Join Date
    Feb 2006
    Location
    Amsterdam
    Beans
    28
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: HOWTO: Quickly convert videos to Ipod / Smartphone format

    Have u tried running it with an other avi file?

  8. #8
    Join Date
    Jun 2007
    Beans
    97

    Re: HOWTO: Quickly convert videos to Ipod / Smartphone format

    I get the same 'unknown codex xvid' error.

    Have tried different .avi files with no change.

    I hope someone can direct us on where we are going wrong/what we need to do to fix.

    Many Thanks

  9. #9
    Join Date
    Feb 2007
    Beans
    29
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: HOWTO: Quickly convert videos to Ipod / Smartphone format

    daforze, I have tried 10 different video files.

  10. #10
    Join Date
    Feb 2006
    Location
    Amsterdam
    Beans
    28
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: HOWTO: Quickly convert videos to Ipod / Smartphone format

    I think this guide is better: http://ubuntuforums.org/showthread.p...&highlight=n95

    But it wouldn't succeed for me as I already had some weird problems with my repositories so I cant get trough the guide..

    So now now i'm converting my videos on WINDOWS !!!
    But eh let me know if it worked?

Page 1 of 3 123 LastLast

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
  •