4

I've just set up a RaspBMC and I wanted to play a movie. Unfortunately, it just showed a gray screen and played sound.

I've found out, that the movie's codec is DivX 3 Low motion, which is unsupported because of a license issue.

But I have 60 GB content, and I don't want to convert it.

Is there any solution?

Thank you.

  • Why don't you want to convert it? It looks like an older codec. – Alex Chamberlain Sep 17 '12 at 13:30
  • I hope, you can read: "But I have 60 GB content, and I don't want to convert it." – antivirtel Sep 17 '12 at 13:39
  • I can... which is why I asked. – Alex Chamberlain Sep 17 '12 at 13:41
  • Because it takes much time :D Calculate: 130 episodes remaining, Avidemux writes 17m/episode, if we sum: 1.534 day – antivirtel Sep 17 '12 at 13:50
  • 1
    I suspect it will be worth it, as the GPU is closed the only way to get accelerated playback is to use the Foundation's licensed codecs. VLC may play it, but I suspect it will be unbearably slow. – Alex Chamberlain Sep 17 '12 at 13:53
3

if you have a linux I made this script (ToH2364.sh) which look for all avi file and convert only the ones using divx3 codecs (msmpeg4) it could help

./ToH264.sh RootPathOfTheSearch extensionToLookFor ExtentionOfTheEncodedFile CodecToCheck

example

./ToH264.sh /media/HDD/ avi mp4 msmpeg4

but only the directory is mandatory so it could simply be:

./ToH264.sh /media/HDD/

#!/bin/bash
# erease result file
echo "Result File" > ToH264.result
#Get the forlder to search
fld="$1"
#Get the extension to look for if it exist, else look for "avi"
if [[ $2=="" ]]
then exti="avi"
else exti=$2
fi
#Get the futur extension for if it exist, else set "mp4"
if [[ $3=="" ]]
then exto="mp4"
else exto=$3
fi
#Get the codec to look for if it exist, else look for "msmpeg4"
if [[ $4=="" ]]
then cdc='msmpeg4'
else cdc=$4
fi
# exe the search and save the result in TpH264.tmp
find $fld  -name "*.$exti" > ToH264.tmp
#convert each result stored in the file ToH264.tmp if it use the specified codec and if the output file doesn't exist
while read line
do
   if avprobe -show_streams "$line" | grep $cdc
   then
           echo "$line"  >> ToH264.result
           no | avconv -threads 8 -i "$line" -c:v libx264 -crf 20 -c:a copy "${line%.*}.$exto"
   fi
done < ToH264.tmp
  • I signed up just to say, "You sir, are a god" – Gareth Aug 29 '13 at 9:44
1

Cleaner log version Adds runtime stats Adds _converted tag to mark output files and make sure not to overwrite input ones:

#!/bin/bash
#
# Required Ubuntu Packages
#
# libavcodec-extra-53 libav-tools
#
# Examples:
# ./toh264.sh /media/HDD/ avi mp4 msmpeg4
# ./toh264.sh /media/HDD/



# erease result file
echo "Converted Files" > ToH264.result
#Get the forlder to search
fld="$1"
#Get the extension to look for if it exist, else look for "avi"
if [[ $2=="" ]]
then exti="avi"
else exti=$2
fi
#Get the outcome file extension if it exist, else set "mp4"
if [[ $3=="" ]]
then exto="mp4"
else exto=$3
fi
#Get the codec to look for if it exists, else look for "msmpeg4"
if [[ $4=="" ]]
then cdc='msmpeg4'
else cdc=$4
fi
# exe the search and save the result in TpH264.tmp
find $fld  -name "*.$exti" > ToH264.tmp

#convert each result stored in the file ToH264.tmp if it use the specified codec and if the output file doesn't exist
while read line
do
   if [ x$(avprobe -show_streams "$line" 2> /dev/null| grep $cdc) != "x" ]
   then
           echo "Converting" $line
           echo "$line"  >> ToH264.result
           avconv -stats -threads 8 -i "$line" -c:v libx264 -crf 20 -c:a copy "${line%.*}_converted.$exto"
   fi
done < ToH264.tmp

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.