Skip to main content
added 2 characters in body
Source Link

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"Result FileFile" > 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

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

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
added 109 characters in body
Source Link

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

./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
nullecho 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 "Conversion du fichier $line""$line"  >> ToH264.result
           no | avconv -threads 8 -i "$line" -c:v libx264 -crf 20 -c:a copy "${line%.*}.$exto"
   fi
done < ToH264.tmp

if you have a linux I made this script (ToH2364.sh) it could help

./ToH264.sh RootPathOfTheSearch extensionToLookFor ExtentionOfTheEncodedFile CodecToCheck example ./ToH264.sh /media/HDD/ avi mp4 msmpeg4

#!/bin/bash
# erease result file
null > 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 "Conversion du fichier $line"  >> ToH264.result
           no | avconv -threads 8 -i "$line" -c:v libx264 -crf 20 -c:a copy "${line%.*}.$exto"
   fi
done < ToH264.tmp

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
added 3 characters in body
Source Link

if you have a linux I made this script (ToH2364.sh) it could help

./ToH264.sh RootPathOfTheSearch extensionToLookFor ExtentionOfTheEncodedFile CodecToCheck example ./ToH264.sh /media/HDD/ avi mp4 msmpeg4

#!/bin/bash
# erease result file
null > 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 "Conversion du fichier $line"  >> ToH264.result
           no | avconv -threads 8 -i "$line" -c:v libx264 -qcrf 020 -c:a copy "${line%.*}.$exto"
   fi
done < ToH264.tmp

if you have a linux I made this script (ToH2364.sh) it could help

./ToH264.sh RootPathOfTheSearch extensionToLookFor ExtentionOfTheEncodedFile CodecToCheck example ./ToH264.sh /media/HDD/ avi mp4 msmpeg4

#!/bin/bash
# erease result file
null > 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 "Conversion du fichier $line"  >> ToH264.result
           no | avconv -threads 8 -i "$line" -c:v libx264 -q 0 -c:a copy "${line%.*}.$exto"
   fi
done < ToH264.tmp

if you have a linux I made this script (ToH2364.sh) it could help

./ToH264.sh RootPathOfTheSearch extensionToLookFor ExtentionOfTheEncodedFile CodecToCheck example ./ToH264.sh /media/HDD/ avi mp4 msmpeg4

#!/bin/bash
# erease result file
null > 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 "Conversion du fichier $line"  >> ToH264.result
           no | avconv -threads 8 -i "$line" -c:v libx264 -crf 20 -c:a copy "${line%.*}.$exto"
   fi
done < ToH264.tmp
edited body
Source Link
Loading
added 49 characters in body
Source Link
Loading
Source Link
Loading