Go Back   Zune Boards > Help Forum > Tutorials

Tutorials A collection of tutorials to help you with various programs.

Closed Thread
 
LinkBack Thread Tools
Old 07-24-2009, 10:59 AM   #1 (permalink)
Zewbie
 
Join Date: Jul 2009
Posts: 3
unixTechie is on a distinguished road
Default avi conversion to mp4 for xbox 360 with ffmpeg

Hi all,

I haven't seen anyone discuss this method for converting avi files to mp4 for sharing to the xbox 360 here - As an old command-line junkie, this method serves me well, and is very fast. This will work in either linux or in Windows under Cygwin. I suppose it'll work on Macs as well as long as ffmpeg is available for it.

Prerequisites:

Bash-shell environment under linux, cygwin, or similar.
ffmpeg with aac support compiled in.
Optional: megp4ip package (for mp4tags) to insert embedded .png artwork.

I wrote the following little shell script (avi2zune) to facilitate the conversion. I hope someone finds it useful:

Code:
#!/bin/sh

if [ ! "$1" -o ! "$2" ]; then
  echo "Usage: avi2zune filename.avi 4:3|16:9 [artwork.png]"
  exit
fi

if [ "$2" = "4:3" ]; then
  RES="512x384"
elif [ "$2" = "16:9" ]; then
  RES="640x360"
else
  echo "Aspect Ratio must be 4:3 or 16:9"
  exit
fi

mp4name=`basename $1 .avi`.mp4

ffmpeg -i $1 -f mp4 -vcodec mpeg4 -b 1000k -r 23.976 -s $RES -aspect $2 -acodec libfaac -ab 128k -ar 48000 -ac 2 $mp4name

if [ "$3" ]; then
  mp4tags -P $3 $mp4name
else
  exit
fi



unixTechie is offline  

Advertisement [Remove Advertisement]
Old 07-28-2009, 03:25 AM   #2 (permalink)
I refuse to help pirates
Support Team
Member
 
zachnehrenberg's Avatar
 
Join Date: Nov 2007
Location: Renton
Posts: 507
zachnehrenberg will become famous soon enough
Send a message via MSN to zachnehrenberg Send a message via Yahoo to zachnehrenberg
Default

This is a nice tutorial but please repost this in the Tutorials section of the forums where it will be of more use. Thank you
__________________


PLEASE NOTE: If I have not replied to your problem within 24 hours, please PM me and I will get back to you. For problems that are very severe and need fast support you can PM me and I will personally solve your problem for you. Other than that please do not expect a reply in a timely fashion. I run a support business and am currently in a class action lawsuit. Futhermore... IF I CAN'T READ YOUR "ENGLISH" THEN YOU WILL NOT BE HELPED




zachnehrenberg is offline  
Closed Thread

Bookmarks

Thread Tools