CentOSThis forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have a series of webcam photos I want to string together to make a short film. I'm a Slackware user, have used mencoder and ffmpeg. The system is CentOS though. I ran
Code:
yum whatprovides mencoder
and
Code:
yum whatprovides ffmpeg
, which turn up nothing. (Surprising me.) Have I made a mistake in my search, or should I use something else?
Thanks. I have no choice of distribution on this system - I just work on it. Unfortunately it's old (in interest of security) and I couldn't reconcile modern packages with it. I ended up downloading the source and building.
#Example make a dir and change to it.
mkdir pic
cd ~/pic
#Make 50 .jpg file names into the dir
for i in {1..50}; do
touch camera"$i".jpg
done
Code:
#This is not sorted
ls -tr camera*.jpg | tail -10 | tr '\n' '#' | sed 's/#/ -i /g'
camera39.jpg -i camera44.jpg -i camera43.jpg -i camera42.jpg -i camera47.jpg -i camera46.jpg -i camera45.jpg -i camera50.jpg -i camera49.jpg -i camera48.jpg -i
How about:
Code:
#Make array of files in dir, sorted by number
for file in *; do
sorted=$(echo "$file")
files[$sorted]="$file"
done
#Check it
echo "${files[@]}"
#Get the last 10
last10=$(echo "${files[@]:40}")
#Check it
echo "$last10"
Thanks. I have no choice of distribution on this system - I just work on it. Unfortunately it's old (in interest of security) and I couldn't reconcile modern packages with it. I ended up downloading the source and building.
But you can find good movie software on an old system?
Trying to use an environment variable for the input argument ran into the maximum size of environment variables, in this case about enough for 300 file names. I ended up making links in a temporary directory:
Code:
for file in `ls -tr camera*.jpg | tail -360`
do
ln -sf ../$file .temp/camera-$count.jpeg
let count=count+1
done
then using -i .temp/camera-%03d.jpeg for the input argument.
Trying to use an environment variable for the input argument ran into the maximum size of environment variables, in this case about enough for 300 file names. I ended up making links in a temporary directory:
Code:
for file in `ls -tr camera*.jpg | tail -360`
do
ln -sf ../$file .temp/camera-$count.jpeg
let count=count+1
done
then using -i .temp/camera-%03d.jpeg for the input argument.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.