Networking

Unix and Linux network configuration. Multiple network interfaces. Bridged NICs. High-availability network configurations.

Applications

Reviews of latest Unix and Linux software. Helpful tips for application support admins. Automating application support.

Data

Disk partitioning, filesystems, directories, and files. Volume management, logical volumes, HA filesystems. Backups and disaster recovery.

Monitoring

Distributed server monitoring. Server performance and capacity planning. Monitoring applications, network status and user activity.

Commands & Shells

Cool Unix shell commands and options. Command-line tools and application. Things every Unix sysadmin needs to know.

Home » Featured, XBMC

Converting 1080i to 720p for XBMC

Submitted by on January 23, 2011 – 7:22 am2 Comments

If you are using XBMC as your video player, you might have encountered a problem playing 1080i AVCHD (*.ts or *.m2ts) videos. When playing such files, you may see just a gray screen with some digital artifacts. One possible solution is to convert such files to 720p H.264/MPEG-4 AVC format using ffmpeg utility and x264 encoder. The ffmpeg utility is available for Windows, Mac, Linux and other operating environments.

Download ffmpeg for your operating system. You can find download locations for ffmpeg for Windows here. For Unix-based operating systems, you can download source code and compile it yourself. Or you can download a pre-compiled version for your specific OS and processor architecture. Software repositories for most Linux distributions will include a pre-compiled version of ffmpeg.

XBMC having difficulty playing 1080i video

The ffmpeg package for Windows will include a folder called “ffpresets”. This folder will contain text files with pre-configured options for ffmpeg to achieve desired video quality. Linux ffmpeg packages may not come with the presets, but you can easily find them online.

Here is a quick example of converting a 1080i video file to 720p on Windows. The ffmpeg package has been downloaded in extracted to “C:\Users\Bob\Desktop\ffmpeg\” directory. The ffmpeg presets directory is “C:\Users\Bob\Desktop\ffmpeg\ffpresets”. The file we are going to convert is “C:\Users\Bob\Documents\Videos\Video File.1080i.ts”

The conversion process may take some time, depending on the duration of the video and processing power of your computer. Ffmpeg does not show estimated time or percentage of completion. You will see something like this in your command window:

If you know the runtime of the original video, you can use this information to estimate how long it will take to finish re-encoding the file. Just look at the “time=” field. It shows the number of seconds of the original video that have been converted to the new format. In our example above, the conversion utility has been running for about 30 minutes and converted about 20 minutes of the video.

Below is an example of converting an entire directory full of 1080i *.ts and *.m2ts video files to 720p *.avi format on Linux one at a time using a script. This may be convenient if you have many files to convert, but you don’t wont to babysit the process. In this example the ffmpeg is located in /usr/bin/ and the ffpresets are located in /etc/ffmpeg/ffpresets. The video files are located in /home/bob/videos and a few subfolders.

  • LN13

    My web host doesn’t support ffmpeg but said if I can find a video hosting script that doesn’t use ffmpeg I could use it. Anyone know of any?

    Thanks
    Hi guys, thanks for the replies. I was in fact looking to host the videos on my account though. I am looking for an alternative to phpmotion, basically, that doesn’t use ffmpeg.

  • Echo

    Ok, so I want to make a program that requires FFMpeg (http://ffmpeg.org/) to run, and I want to be able to distribute my program. How would I give proper credit to FFMpeg so as I am not taking credit for their work? Do I put their license in something like FFMPEG-LISENCE.txt? Thanks!