вторник, 23 января 2007 г.

Как конвертировать .flv в .mpg (.avi).

Вы наверное замечали, что самый популярный видео-сервис YouTube предоставляет видеофайлы в специальном Flash-формате - .flv. При попытке скачать такой ролик с YouTube с помощью плагина к Firefox VideoDownloader, последний предложил заодно скачать и FLV-Player для просмотра данного видео. К совету я не прислушался - хватит с меня уже плееров. Решил пойти другим путем. А именно - перекодировать с .flv в .mpg (.avi). Но не тут то было, VideoDownloader ролик так и не скачал. Таким образом, имея лишь ссылку на понравившееся мне видео и желание его скачать, обратился к Google. И нашел.
Программа называется GenTube. На самом деле это обычный скрипт который скачивает и перекодирует видео-файл с формата .flv в .mpg.




Для нормальной работы скрипта нужны следующие программы:
Kdialog, ffmpeg, player of mpg ( mplayer), wget. Тут вроде понятно. Kdialog осуществляет диалог скрипта с пользователем, wget - загружает, ffmpeg - перекодирует и mplayer - проигрывает.
На сайте разработчика можно найти различные версии скрипта и на разных языках. Я остановился на этой - (скачать GenTube-1.0-Jan.tar.gz ).

Работа с данной программой:

Распаковываем скачанный архив и заходим в созданную директорию:


$ tar xzvf GenTube-1.0-Jan.tar.gz
$ cd GenTube-1.0-Jan/


Просмотрев файл README (он, оказывается, на испанском) и описания на сайте - запускаем:


$ ./gentube.sh


Скрипт запускает Kdialog, где нужно выбрать сначала язык интерфейса (English), а потом - Download Video



и ввести URL видео-ролика с YouTube. Скрипт сам запустит, скачает и перекодирует видео. После этого в Kdialog можно нажать Play video и просмотреть ролик в формате .mpg.
Довольно легко и удобно!

В процессе поиска столкнулся с еще некоторыми методами.
1. Скачать видео-ролик в формате .flv и перекодировать с помощью утилиты mencoder:

mencoder input.flv -ofps 15 -vf scale=300:-2 -oac lavc -ovc lavc -lavcopts vcode c=msmpeg4v2:acodec=mp3:abitrate=64 -o output.avi

2. Скачать видео-ролик в формате .flv и перекодировать с помощью утилиты ffmpeg:

ffmpeg -i videotoconvert.flv -ab 56 -ar 22050 -b 500 -s 320x240 output.mpg

(Источник)
3. Попробовать скрипты, написанные на Perl или Bash с сайта bashscripts.org.

Все эти три метода я не проверял по двум причинам:
а. Задача была выполнена с помощью GenTube;
b. Я не смог загрузить файл .flv с YouTube вручную :(.
Вот что выдает wget:

Resolving www.youtube.com...
failed: Name or service not known.

Но GenTube также использует wget и вроде бы без дополнительных ключей. В общем, если Вы сможете загрузить файл с YouTube, то перекодировать можно любым из указанных выше способов.

45 коммент.:

Von_old комментирует...

По поводу расширения: UnPlug использовать куда удобнее и он не навязывает выкачивания чего бы то ни было.

Tigro комментирует...

А без перекодирования он mplayer'ом играется?

serhiy комментирует...

Огромное спасибо за ссылку на расширение. Видео с YouTube скачал без проблем. Но вот перекодировать с помощью mencoder и ffmpeg пока не получилось. Это нужно посидеть над man ffmpeg. Пока ограничусь GenTube.

serhiy комментирует...

В моем случае играется, но нельзя перемотать (бегунок прокрутки стоит в конце). При попытке мышкой его продвинуть, просмотр умирает. В VLC и Kaffeine не проигрывается.

virens комментирует...

Перекодирую обычным mencoder-ом, всё нормально. Выкачиваю в Огнелисе VideoDownloader.

serhiy комментирует...

Даже не знаю что сказать. У меня в огнелисе VideoDownloder выкачивать отказался напрочь. UnPlug - выкачивает без проблем. А на счет mencoder и ffmpeg, последним пользоваться уже научился. Как-то раньше никогда это не интересовало.

ulmen комментирует...

а звук с видео синхронизирован нормально при пережатии? а то я скачал когда то несколько клипов, но звук съезает при просмотре мплеером :( пережимать еще не пробовал.
кстати, последние версии мплеера нормально перематывают flv

serhiy комментирует...

to ulmen
Все синхронно! Для статистики еще несколько клипов перекодировал. Все работает. Способ с ffmpeg тоже работает. Проверил. Mencoder выдает ошибку.

Unknown комментирует...

Я скачиваю видео с помощью экстеншна Fast Video Download, который внедряет в код страницы ссылку "скачать видео" прямо под ютубовым окошком.
А перекодирую, если нужно, прогой ffmpeg2theora - ей просто нужно указать файл и она создает ogg с таким же названием в той же папке, поддерживает пакетную обработку.
Да и как-то приятнее кодировать не в скучный ави, а в наш, опенсорсный, огг.

serhiy комментирует...

Спасибо всем. Сколько всего нового узнал за эти пару дней. Попробовал ffmpeg2theora. Действительно все просто и все работает. Теперь можно экспериментировать :).

ulmen комментирует...

спасибо, буду пробовать

ulmen комментирует...

проверил, синхронно все :) спасибо.

serhiy комментирует...

Нашел еще один способ загрузки видео с Youtube. На этот раз просто с командной строки. Скачиваем скрипт
http://www.arrakis.es/%7Erggi3/youtube-dl/youtube-dl
и кидаем его например в ~/bin/
дальше в командной строке набираем youtube-dl http://youtube......

Анонимный комментирует...

Вот пользуйтесь :)
В качестве параметра на вход задаем урл youtube и имя выходного файла

#!/bin/bash

wget -c -S http://youtube.com/get_video.php\?`curl -s $1 | grep player2.swf | cut -f2 -d? | cut -f1 -d\"` 2> /tmp/y1;

uf=`grep Location /tmp/y1 | sed "s/.*Location: //g"`;

wget "$uf" -O /tmp/y.flv 2> /dev/null;

ffmpeg -i /tmp/y.flv -ab 48 -ar 22050 -acodec mp3 -b 100 -s 320x240 -vcodec xvid /tmp/$2.avi 2> /dev/null;

rm /tmp/y.flv;

rm /tmp/y1;

exit

Unknown комментирует...

Спасибо большое))
Я помню пользовался этой программой, но перекодировать не получалось(( Тут попробовал тупо с помощью ffmpeg, теперь всё путём))

Unknown комментирует...

Попробуй http://softtelecom.ru/mb.htm
но это конвертация сразу с инета, но зато с самых популярных сайтов

calibra комментирует...

Спасибо за программу , а то я пользуюсь демо версией, ваша статья как раз мне помогла.

Flv player комментирует...

Gen Tube is the best to download videos from YouTube, it works great! Thanks for sharing this post........

Cheap Viagra комментирует...

К совету я не прислушался - хватит с меня уже плееров. Решил пойти другим путем. А именно - перекодировать с .flv в .mpg (.avi). Но не тут то было, VideoDownloader ролик так и не скачал. Таким образом, имея лишь ссылку на понравившееся мне видео и желание его скачать, обратился скачивает и перекодирует видео-файл с формата .flv в .mpg.

Canadian Viagra комментирует...

последний предложил заодно скачать и FLV-Player для просмотра данного видео. К совету я не прислушался - хватит с меня уже плееров, Для нормальной работы скрипта нужны следующие программы:
Kdialog, ffmpeg.

Yuri комментирует...

Добрый день!
"2. Скачать видео-ролик в формате .flv и перекодировать с помощью утилиты ffmpeg:
ffmpeg -i videotoconvert.flv -ab 56 -ar 22050 -b 500 -s 320x240 output.mpg"
Опишите, плиз подробно, как кодировать .flv в aiv с помощью WinFF. То есть, как для чайника.
Я установил WinFF, запустил программу, добавил файл .flv и там куча настроек:
Конвертировать и дроп-лист
Пресет и дроп лист
а также видео и аудио настройки.
Напишете, что должно быть в каждом из окошек.
Спасибо.

Анонимный комментирует...

Is his lifespan simply according to Penn nation researchers who used cheap accelerometers
on the munition of parkinson's disease patients to amount arm dangle. The someone may walk recognise that when dopamine neurons die, so the someone is attacked by this disease.

Also visit my blog Parkinson's disease
specialists Paradise Valley

my webpage - Parkinson's disease specialists Paradise Valley

Анонимный комментирует...

Heya! I understand this is somewhat off-topic however I had to ask.
Does operating a well-established blog such as yours take a
large amount of work? I am brand new to writing a blog
however I do write in my journal everyday. I'd like to start a blog so I will be able to share my experience and thoughts online. Please let me know if you have any ideas or tips for brand new aspiring bloggers. Appreciate it!

my blog ... gratis spiele
my website > youtube downloader online

Анонимный комментирует...

When the laptop division went to Lenovo, as in the T61, the design and appearance declined.
replica cartier earrings. Official Picture of President Reagan by the Executive Office of the Presidency used under Public Domain.
In exchange you'll have to pay a bit more for the GT 220, as most models are around $60 or $70 dollars. An analysis this change will give us insight into the supposed benefits they entail. Those pain killers and medications hide the problem without dealing with the true cause. Of course, many people looking to boost their bone health choose to supplement their diets. In fact the publicly owned Ecopetrol has seen an immense FDI surge in the past few years and in spite of being overvalued to some, the stock still is a good bet due to the growth potential it has. Dependency enslaves you, giving others the ultimate power over how you perceive and feel about yourself. For people from non technical background these things look like rocket science.

Have a look at my web blog ... imagiscape.ca

Анонимный комментирует...

You геally make it seеm so easy with your pгesentаtion but I fіnd this matteг to be
reallу something that I think I ωould never unԁerstand.

It seems too complex and extremely broad fοr me. I аm
looking forward for yοur next post, I'll try to get the hang of it!

my homepage http://community.xoomanetworking.com

Анонимный комментирует...

"Is there really no way to transfer my VC and Wii - Ware games from my Wii to another. A look into some of the best Star Wars apps to be found on i - Tunes, including games, fun soundboards, books, and more. In fact an ideal online casino will make the entire gaming experience a pleasurable and a real experience to the gamer.

Also visit my blog post; globalprnews.com

Анонимный комментирует...

Since the Early 1990s, the solid food and do drugs Administration has required this destination and improving line cholesterol
levels. Everyone has two types of cholesterol, you can take up an participating life style and low-cholesterol diet.

See the clause, Niacin beats Zetia assortment for
a few moments with my hired hand liquidizer.
. Yet this step isn't essential!

Here is my site: options treatment cholesterol high
Also see my site: options treatment cholesterol high

Анонимный комментирует...

If there is a change in the search engine algorithms, it is also up to the service provider to keep a watch on such activities.
''. Search engine marketing (SEM) is an essential a part of any site promotion strategy.

The only thing that cannot be "fixed" later is your blog and post
titles. A dedicated SEO expert will devote all the attention and effort in
enhancing the visibility of your website or business in the online
world. This is the best part to ensure complete uniqueness to each of the websites.
The tips are as follows:-. There are many tools online to help
you research relevant keywords, such as the Google Adwords Keyword Tool.
Make buying easy for the customer and they will return often.
) of links. They want to know things about how to create effective copy, general marketing tips and maybe even stuff about social media.
However, in general, SEO services involve using standard and compliant
coding. Moving your hosting to a nearby country
such as Canada or an offshore Caribbean host may provide the same latency times, but reduce the risk
of having your website brought down by a mistake. No - you name
some of your images "breast. Once you find the right and affordable SEO Company, it is essential to talk about your business objectives, target customers and future goals with the professionals to help them develop their strategies accordingly. As of now, Thomas Lenarz has helped many people get the information on reputed SEO companies. You need to try to find reputed SEO consultants. Here are tips on how to identify the right keywords for your business website. And make the work flow smoothly, using good grammar at all times. com is one of the premier portals on the World Wide Web which has been formulated with the intention of providing SEO Hosting options for webmasters around the world who seek a way to ensure that their websites reach the top ranks of all major search engines.

Here is my website http://www.meetmycompany.nl/blogs/user/TanishaPRO

Анонимный комментирует...

Em ocasies muito raras, a high number of inspiring
'loopies' out there that I was strong and help you make
of it. However, most are diagnoised with lupus who once thought to be able
to cut your grass. For dry mouth, hair, if there was a teen, Your Symptoms Are Associated
With Lupus PainLupus-related pain is one of them?
But why isn't there a systemic disease, the heart, kidneys, and fatigue. When is it is believed to contribute to fatigue in autoimmune disease does not document the severity of symptoms.

Also visit my website: Knights Ferry lupus doctor

Анонимный комментирует...

What I didn't know was how I would get all of what I wanted in just six hours. While the effects of antenna polarization may be interpreted as a reduction in the quality of some radio links, some radio designers often make use of this property to tune an antenna to their needs by restricting transmission or reception to signals on a limited number of vectors. These include the artist-branded music channels such as The Grateful Dead Channel, Eminem's Shаde 45, Jimmy Buffett's Radio Margaritaville; there is even the classical music Metropolitan Opera Radio channel.

Feel free to surf to my page ... main page
my web page: Full Post

Анонимный комментирует...

Without the internet, this is not possible to play these novoline games
online and even they can't live online that they perform now with public for additional characteristics and completely attractive in a delusion earth to participate in a game. You will eventually run into the Download Location menu with two options: Wii System Menu and SD Card. The reason for this rather strange feature is that, as described above, apps in the Android Market are listed as they are submitted, without any testing.

my web page :: youtube converter

Анонимный комментирует...

The fact thаt Toyota chοse tο upgrade thе exterioг styling,
interior quality anԁ inteгior roominеѕs of
the redeѕіgned 2012 Үaгis hatchback гather thаn uрgгading the рοwеrtrain ѕауs а lοt
about hοw Toyоta vіеws thе neеds of small сar buyers.
While the effects οf аntenna polaгization may bе іnterρreted as а reduсtion in
the quality of ѕomе гadio linκs, ѕome radіο ԁesigners oftеn maκe use
of thiѕ prορeгty to tune an antenna to their needs by гestгіcting tгansmission or rеception to signalѕ οn а limіted numbеr οf vectors.
Proffeгing multifarious bеnefits to the аԁvеrtisers, it is a quintessential гesoгt
foг cоmρanіes big oг small.

Ηere is mу hοmepаge simply click the next site

Анонимный комментирует...

Magnificent site. Lots of useful information here. I am sending it to some pals ans additionally sharing in delicious.
And obviously, thanks to your effort!

Check out my web blog ... spiele spielen

Анонимный комментирует...

These five free basketball game apps for the i - Phone will
surely help you get your game on. Thus the games like the Mahjongg Spiele as
well as the Naegel machen games are more in demand and this is
the greatest benefit or advantage of the online games. In our next
article, we'll be tackling using SNES4i - Phone to do exactly that - play those old favorites, like Chono Trigger, Super Ghouls and Ghosts, or even Super Mario Bros 3.

Have a look at my webpage ... videos von youtube downloaden

Анонимный комментирует...

Ӏt's really a nice and helpful piece of info. I am happy that you simply shared this useful information with us. Please keep us informed like this. Thank you for sharing.

Here is my website - visit the up coming internet page

Анонимный комментирует...

Αlthough you can't go back to any songs, you can skip songs, mark them as ones you like or dislike, and browse the names, bands, and CD the song is on of all the songs that have played already. Internal or External Sound Mixer "All windows systems come with a internet sound mixer they all differ so you may need to review your manual or online sources to figure out how to enable or use it. This not only allows listeners to listen to their favorite MP3 files along with their SIRIUS radio; it also lets them digitally record their favorite radio songs for instant playback.

Also visit my homepage spiele spielen

Анонимный комментирует...

Try downloading a game demo prior to purchasing the actual game so that you can determine if you're going to enjoy it. When children fit these fun video game titles into actions require time to view those facial seems to be and human body expressions. Many games have role-playing incorporated and from the young age kids quickly learn from your heroes they choose to be.

Feel free to visit my web-site - plae.com

Анонимный комментирует...

Try downloading a game demo prior to purchasing the actual game so that you can determine if you're going to enjoy it. When children fit these fun video game titles into actions require time to view those facial seems to be and human body expressions. Many games have role-playing incorporated and from the young age kids quickly learn from your heroes they choose to be.

Feel free to visit my site; plae.com
Also see my web site > gratis spielen

Анонимный комментирует...

When you quit, you can immediately feel its decision within 24 hours, health
benefits, which can cause you to not smoke forever.
Remove other nearby wireless devices, such as a cordless or cellular
telephone and make sure the mouse is at least eight
inches away from a wireless keyboard. Aside from
these types of power packs, you can even choose the 8-cell and also
12-cell electric battery.

my blog post 9/3/13 21:31

Анонимный комментирует...

If you decide to pursue SEO as a way to generate revenue, you must beware that you will open yourself up to a host of new scam products.
And if you find out something entertaining on internet you will feel as if you are
at the top of the world. The Zune application has been available
for a couple of years now, and as well as being the ideal desktop media player
that handles movies, music, TV and photos, it is also designed to
sync with media players and Windows Phone while providing you with access to the Zune Marketplace to purchase music
and video.

Feel free to surf to my page: click through the following post
Also see my web site > mouse click the up coming web site

Анонимный комментирует...

Over time Pandora gets smarter and smarter as it
gets to know you and your musical tastes. You can
also use You - Tube Mobile Application to record
video content onto your Nokia E63. The Zune application has been available
for a couple of years now, and as well as being the
ideal desktop media player that handles movies, music,
TV and photos, it is also designed to sync with media
players and Windows Phone while providing you with access to the Zune Marketplace to purchase music and video.


Feel free to surf to my web page - http://production.worwis.com

Анонимный комментирует...

If you decide to pursue SEO as a way to generate revenue, you
must beware that you will open yourself up to a host of new scam products.
You will get an account and once you get yourself registered with Odyssey Streaming.
The key is to have a clear understanding of the market so the money spent
on broadcast advertising isn't wasted.

Here is my blog post :: matchsouls.com

Анонимный комментирует...

Your сurгent aгticle features establіѕhеd beneficial to us.
It’s extremely eԁucаtional and уou're simply naturally quite experienced in this area. You possess opened up my own face to different opinion of this particular subject matter using intriguing and strong written content.
My webpage ... buy viagra online

Анонимный комментирует...

Make sure you only use clean balls for playing on indoor simulator.

The reason that you should take a look at a Joana's Star - Craft 2 guide review is obvious. The atmosphere parameters calculated are: temperature, dew point, pressure density, wind (three-dimensional) and visibility. Hardness is less then quartz, or ca 6 on Mohs scale. This game allows players to take on a whole different side of themselves and express their wild side, or even the business man lurking in each of us.

Анонимный комментирует...

Your current аrticle featuгeѕ
pгoven beneficial to mе. It’s rеally helρful and you're simply obviously really well-informed in this field. You have opened our eye to be able to varying opinion of this subject using interesting and sound content.

my website ... buy viagra