video encoding

If you want to talk about your personal paperweight, you've found the right place!

Moderator: Moderators

video encoding

Postby random guy » Sun Sep 28, 2008 23:15

hey i got loads of video files on my desktop. all different formats and sizes and qualities etc. some high def. some standard def. and some just youtube quality.

its all a total mess and a lot of it probably takes more space than it needs to since i dont really know anything about videos and dont know anything about its compression. i dont know what format is best, i use vlc and it plays just about everything i have very seen anyway.

is there a way i can use an video format converter (plenty of command line ones exist) that will recursively go through my "videos" directory and re-encode all my videos to a better compressed format but maintaining the video quality (high def should stay high def and standard def should stay standard def etc.)?

it would be awesome to save all that space.

thanks for the help.
<:~-- That random guy from nowhere has made another statement and vanished --~:>
random guy
Advanced Hen
 
Posts: 244
Joined: Fri Sep 15, 2006 1:58
Location: New York

Re: video encoding

Postby xlnagla » Mon Sep 29, 2008 1:21

if you already have a command line converter, then yes! This will work as long as the convertor won't screw with non-movie files you give it.

Code: Select all
bleh=0

while [[ 1 ]]
do
for foobar
in `ls `
do
<command> $foobar /outputfolder
done
if [[ `ls -alp | grep ^d | sed s/.*\ //g` != `ls ajklsdfjslkd` ]]
then
cd `ls -alp | grep ^d | sed s/.*\ //g`
bleh = `expr $bleh + 1`
else
while [[ $bleh -gt 0 ]]
do
cd ../
done
done



I just wrote that in 5 minutes, so bear in mind it may be buggy... just write me back with the command and output folder you're using and I'll fix it.

~xlnagla
xlnagla
Sagely Hen
 
Posts: 1078
Joined: Mon May 28, 2007 2:44

Re: video encoding

Postby WarraWarra » Mon Sep 29, 2008 18:33

Looks nice.
I was looking for something similar for mp3's to aac+ a month ago , 15gb / 5000 mp3's of music with likely 20% or more duplicates with similar or different names and some junk quality ones :pale: Just ended up deleting most of it.

Possible future add on's :
Do you need to add something to check if needed codes is installed ? and or install them if not.
Might want to add something to create a folder and then check for enough space on hd or folder to dump the files into , maybe something to clean the temp files afterwards .
Presuming it takes same space as original format to calc space requirements give warning and then continues until disk full or task completed without stopping the process.
Progress bar per file and total as this will take ages depending on volume of files .
Resume / pause task where it does not do same files over , MD5 check for completed files or something , file format limiting ie: exclude known file type if video ones is too many to list / formats , exclude mp3 wav ?
Then can later add specific commands for each file type provided the command line converter has this options.

Then make a gui interface and sell it LOL.
Heck can likely use spritz and modify it to be a gui for this ?
WarraWarra
Sagely Hen
 
Posts: 1989
Joined: Wed Jan 03, 2007 21:01
Location: 31.324270, -113.585511

Re: video encoding

Postby random guy » Tue Sep 30, 2008 5:15

wow that looks kinda cool, i dont understand it a lot. i sure gotta learn some more scripting.

it seems like mplayer or mencoder are good. is xvid the best format?

i would just send all the data to my empty partition sdb7 (/media/sdb7)so that i could test a handful and make sure they are fine before overwriting the versions i got already.

thanks a lot for the help. i appreciate it.
<:~-- That random guy from nowhere has made another statement and vanished --~:>
random guy
Advanced Hen
 
Posts: 244
Joined: Fri Sep 15, 2006 1:58
Location: New York

Re: video encoding

Postby xlnagla » Tue Sep 30, 2008 5:34

Ha, maybe I will change it to C and write a gtk wrapper for it, you guys seem to like the idea a lot. I'll give it a look tomorrow, and I'll make it so that arguments can be used to specify the program and the output directory (or maybe just the output directory if the program's got complicated options). As for the best format, .ogv ftw.

~xlnagla
xlnagla
Sagely Hen
 
Posts: 1078
Joined: Mon May 28, 2007 2:44


Return to Off Topic

Who is online

Users browsing this forum: No registered users and 2 guests