One-bash-liner to get rid of .WMV container

For reasons known probably to only a very few, selected ones – videos contained in the “.WMV” container seem to have occasional problems with seeking and positioning when played back with XBMC (or “Kodi” if you adapted to the brave new name). To alleviate the problem I eventually wrote a one-liner that copies all video and audio streams from “.WMV” files into Matroska containers:

SAVEIFS=$IFS; IFS=$(echo -en "\n\b"); for i in $( ls *.wmv ) ; do ffmpeg -i "$i" -c copy "${i%.*}".mkv ; done ; IFS=$SAVEIFS

CD into the directory with the video files you want to process and go. Obviously you need to have a working ffmpeg installation first.

Advertisements
This entry was posted in Video and tagged , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s