Showing posts with label programs. Show all posts
Showing posts with label programs. Show all posts

Thursday, June 13, 2013

CLI Youtube Downloader youtube-dl Linux

Every so often you come across a video on Youtube that you really want. Youtube downloaders come and go. Some work for a long time some work for a couple months. Youtube-dl is a simple CLI for Linux that works great for the time being, allows you to download in multiple formats, and is fairly simple to use. The man pages for the program are very easy to read and almost self explanatory.

With Fedora I simply opened up my terminal program, typed:
yum install youtube-dl
and yum did all the work for me. The CLI was installed and I read through the man pages.
man youtube-dl
For the sake of this tutorial I'll just go through the basics to get the program doing what it's supposed to do. For further info just read the man pages.

Go to youtube, find a video you want to download.

Now open up your terminal program , I use Konsole, and type:
youtube-dl -F youtube.com/video_url_here
Replace the last part of the command with the youtube page url that has your video.

This command will show you the different formats the video is available in. Here's an example of the output:

[youtube] Setting language
[youtube] kb9dxfsPdQs: Downloading video webpage
[youtube] kb9dxfsPdQs: Downloading video info webpage
[youtube] kb9dxfsPdQs: Extracting video information
Available formats:
44 : webm [480x854]
35 : flv [480x854]
43 : webm [360x640]
34 : flv [360x640]
18 : mp4 [360x640]
5 : flv [240x400]
17 : mp4 [144x176]


Once you know the file format you want, simply type:
youtube-dl -f 18 youtube.com/video_url_here
and youtube-dl downloads the video in the file format of your choice. That's it, your done ! Notice -F capital letter gives you the file format, -f lower case with the number in my case 18 downloads the video in mp4 format. If you were to select -f 34 the file would be downloaded as an flv file.

That's the basics, the program offers a few other options, read through the man pages for more info. At the time of this writing the program works great, youtube downloaders tend to come and go. As youtube changes things, programs become outdated and stop working. For the time being this is my downloader of choice. Happy downloading !

Sunday, April 21, 2013

Convert flv clips to mpg and Combine To Make One Long Video.

I had a ton of flv files on my computer and I decided I wanted to convert them to mpg files and then combine them to make a large compilation video. Each video was approximately 5 to 15 minutes in length and I wanted one complete video that ran a little over an hour. Here's what I did.

I found two programs that run from the command line that were perfect for the task at hand. The first program I found was FFmpeg, this program is capable of taking the flv file and converting it to mpg or avi, and I think a couple other formats as well. The other useful program I found was mpgtx, this program is capable of taking multiple mpg files and then combines them to make one giant video file.

It's important to note both these programs have other uses, and I'm barely scraping the surface of what these programs are capable of with this post. However, if your looking to accomplish the same type of project this short post should at least get you headed in the right direction.

Using Fedora I downloaded both programs using yum.

su
yum install ffmpeg


and then

yum install mpgtx.

Yum found the programs, found the dependencies, and installed with no problem. I believe both these programs are also available at sourceforge.net

I then created a directory in my Videos folder and named it project, I copied my flv files that I wanted to work with to that directory. Then using Konsole I went to that directory.

cd username/Videos/project

I then attempted to convert the files with ffmpeg. The first attempt I made was using the basic commands and settings. The program worked great but the video was a bit grainy. FFmpeg is very verbose while it converts the files so I looked at the files pixel size, and then decided to do an exact copy of the video and sound which fixed the image quality but made the video choppy. I then did a bit of research and settled on :

ffmpeg -i filename1.flv -target ntsc-dvd -b 2000k -acodec mp2 -ar 22050 -ab 64k -aspect 4:3 filename1.mpg

For the sake of not writing a dissertation on this program I'll add some links at the bottom as to the different commands and attributes and you can do your own research. The above command however really took care of my problem. The video was converted to about the same quality as the original, no more skipping in frames, and the sound quality seemed perfect. After this I took about nine flv files and simply repeated the above process with each one.

Now that I had the flv files all converted I then used mpgtx to combine them into one video. This couldn't of been easier. I simply used the following command and mpgtx did the rest.

mpgtx -j filename1.mpg filename2.mpg filename3.mpg filename4.mpg filename5.mpg filename6.mpg -o yourOutputFilnameHere.mpg

This combined all the 5 to 15 minute clips into a 1 hour and 7 minute video. There was no reduction in quality that I noticed and overall I was very pleased with the end result of this project.

As I stated earlier I could write a dissertation on the use of these two programs. This post was not meant to be a tutorial but simply a review of the programs, the basics of how they work, and a review of the basic research I did to make the programs do what I wanted for this particular project. For more information on these programs and all they have to offer you can check out the following links.

mpgtx http://mpgtx.sourceforge.net/#Examples

ffmpeg http://howto-pages.org/ffmpeg/

The above links were the two that I found most useful. There is a ton of information all over the web about these two programs so feel free to do your own research. I plan on learning a lot more about these two programs and will probably be adding some more information and tutorials about these programs to the blog.

Tuesday, April 9, 2013

Cooking With KDE - Krecipes software review.

Like to cook ? Use KDE ? This a great application and way to keep all your recipes organized and in one place.

Taken from Productivity Monday, daily package Fedora book.

Krecipes is a KDE recipe manager. It will store, search for, and re-size recipes, rate their nutritional content, and manage shopping lists. Recipes can be stored in plan files for personal access, or in MySQL or PostgreSQL databases for shared access (or very large recipe collections). You can select recipes based on nutritional requirements or ingredients-on-hand, and you can also generate a shopping list from a group of recipes with items added or removed to suit your needs.

This is a really great GUI program to store all your recipes in one place. The program sorts everything for you, placing recipes in different categories like pasta, desserts, meat, main course, etc, etc. and even has a little thumbnail picture of what you will be cooking. If you download the U.S.D.A. nutritional database, it even breaks down all the nutritional facts of the dish your cooking, how much fat, amount of sodium, calories, and more. I thought this program was great, and here's my review.

So I downloaded the program using yum install krecipes. At the time of this writing the program was krecipes-1.0-0.2.beta2. I was a bit hesitant with it being beta but went ahead with the install anyway. Yum, found all the dependencies, downloaded the program, and installed everything with no problems. I went to application launcher and found the program in the utilities menu, click the icon and the program asked if I wanted to install the U.S.D.A. nutritional database. Why not, I clicked yes, a small progress window popped up and it took about 20 - 25 minutes for krecipes to download and configure everything. I was at work, and my work connection is pretty fast, so if you have a slow connection, this part of the install might take some time. Just a heads up on that. I have to say though, it was really worth the wait. When you get done entering the recipe, and view it in the program, Krecipes shows you the nutritional value of what you will be consuming. I thought this was a really great feature, and perfect if you're cooking for a diabetic, or someone who has to keep track of their salt and fat intake, or a calorie counter.

Entering the recipe couldn't of been easier. Everything's point and click and very easy to follow. Simply click on File, New Recipe, and a window pops up with some tabs for each category like, title, ingredients, instructions, and there's even a tab to rate it. There's even a place to add a thumbnail image of the dish you're cooking.

All the information is stored in a sqlite3 database, and if you're like me and backup everything, just click, Settings, Configure Krecipes, and there's a link to the database file. I uploaded mine to my cloud backup, and also added it to my backup files on my portable drive. Everything about this program was very easy to use. The only thing I configured myself was adding another folder in the program directory to store the thumbnail images, and that really isn't necessary but I'm a bit anal and like to keep things all in one place. You could just make a folder in your pictures directory and name it food thumbs or whatever.

All in all I thought this was a really great program. I cook for someone who has some health issues and the nutritional database is really helpful. I just can't say enough good things about this program. It was easy to install, easy to use, and if you cook and keep recipes on your computer, I strongly suggest downloading this program and giving it a try. I give this program five out of five penguins !

Find out more here, and the program is also available at sourceforge.com here.