ffmpeg -i xyz.avi -acodec libfaac -ab 128k -s 320x176 -vcodec libx264 -b 400kb -threads 2 xyz.mp4
from this link
Tag: ipod
Find your Ipod fwid
Linux
Connect your iPod
In terminal type sudo lsusb -v | grep -i Serial
Look for your iPod device, the FWID should be the 16 character long string shown.
Windows
If iTunes is installed FWID should be retrieved automatically.
Otherwise (XP or newer only):
Open the Control panel and got to Device manager
Find your iPod in the list of devices (probably under hard drives) and double click it
Go to Details tab and select Device Instance ID in the drop down box
The FWID is the 16 digit number near the end of the string shown
Mac
Connect your iPod
From the apple menu (top left of screen) select About this Mac and click More Info
(optional) Select Mini Profile in the View menubar
In the left column select Hardware and then USB
In the USB Device Tree you should see your iPod listed, select it
the FWID is the Serial Number listed in the lower box
Convert FLAC to ALAC
If you have a ipod you know it can’t play FLAC files. If you still want lossless quality music you’ll have to convert it to ALAC. This can be done very easily with ffmpeg. Here is how to do it:
ffmpeg -i input_flac_file -acodec alac outputfile.m4a
Here is a script to convert all flac files in a directory to alac.
#!/bin/bash
#get all flac files in a directory
#loop over all files
#get file name without extention
#run it through ffmpeg with the output file as the filename.m4a
for file in *flac
do
basename=`basename "$file" .flac`
ffmpeg -i "$file" -acodec alac "$basename".m4a;
done