DISQUS

Homo-Adminus Blog: Using Lighttpd, Mplayer/Mencoder and Flvtool2 to Implement Flash Video Streaming

  • kpumuk · 3 years ago
    [...] current version of flvtool2 has really annoying bug, that prevents it from working with mencoder generated flv files [...]

    Small addition: with ffmpeg you have the same problem :-)
  • NickFaker · 3 years ago
    Or... you could run a Red5 server - http://osflash.org/red5
  • Pupkin-Zade · 3 years ago
    Добрый день!

    Хочу опубликовать вашу статью на сайте. Допустимо ли это?
  • Brajeshwar · 3 years ago
    Nice Article. I think even some websites provides them like templates (they even include hosting). Look at http://www.alstrasoft.com/.
  • ND · 3 years ago
    "..Ffmpeg sucks.."

    Mplayer/Mencoder relies on ffmpeg to do much of the encoding... - it's included with the package.
  • madkarma · 3 years ago
    Hey, looks like someone stole your blog entry without giving any credit:
    http : // www . zoji . com / kao / blogs / 75691
  • Scoundrel · 3 years ago
    2madkarma: thanks. will write an email to him.
  • Kermee · 3 years ago
    My humble apologizes. It has been fixed.
  • Scoundrel · 3 years ago
    2Kermee: Great thanks!
  • Scoundrel · 3 years ago
    Notice: Read my new article about flash streaming “Flash Video (FLV) Streaming with Nginx” to learn, how to implement streaming server with nginx.
  • Netnoise · 3 years ago
    You probably didn't understand how mod_flv_streaming works: It requires a start-parameter in the url and therefore won't work with (most) flv players out there. See the docs at: http://jan.kneschke.de/projects/flv-streaming/
  • Scoundrel · 3 years ago
    I completely understand how it works because I've used it on our streaming servers before nginx got same feature.
  • Amigo · 3 years ago
    Огромное спасибо за статью
    Обязательно использую :)
  • Ben · 3 years ago
    Small detail in comparison, but what's the best way to get frame grabs of the videos, like YouTube has as a single-image preview?
  • Scoundrel · 3 years ago
    2Ben: I'm working on post about thumbs ripping now. Gonna finish it this week.
  • Kermee · 3 years ago
    2Scoundrel: Excellent! Looking forward to instructions on doing thumbnail ripping! Thanks!
  • Christopher J. Bottaro · 3 years ago
    When I run the mencoder command, I get this error:

    CAN'T GET SPECIFIED FORMAT
    Cannot initialize muxer.
    Exiting...

    Any ideas? Mplayer can play fli files fine...

    Thanks for the help.
  • DF · 3 years ago
    Can this solution be utilized in a shared hosting environment. For example, could I install and run the mplayer and mencoder on a shared hosting site with GoDaddy. The server is Red Hat Linux with Apache.

    Any advice would be greatly appreciated.

    Thanks!
  • BB · 2 years ago
    Can i apply this solution for live streaming? (input from a webcam for example)
  • alex · 2 years ago
    >любой flash player, понимающий идею стриминга >видео
    Например? С поддержкой конструкции ?start=
  • Scoundrel · 2 years ago
    2alex: да. именно. он должен читать метаинфо в самом начале и потом при переходах по видео (перематывании) делать ?start=XXX на позицию, указанную в метаинфо рядом с номером ближайшего кейфрейма.
  • alex · 2 years ago
    Да это я понял. Есть уже существующие и работающие реализации - желательно на флэше? Пробовал http://www.flashcomguru.com/index.cfm/2005/11/2... . При перемотке не обрывает старые закачки. 10 раз перемотаю - имею 11 потоков для одного файла. Ещё раз 6-7 перемотаю - плеер повиснет.
  • Scoundrel · 2 years ago
    2alex: Мы писали сами... Наш флеш-девелопер за день наколбасил хотя до этого ваще не видел флеш-фидео. Потому я уверен, что не сильно сложно. Хотя, может, есть и готовое.
  • lhotski · 2 years ago
    Спасибо за пост. mplayer forever.
    Но flvtool2 в силу свой чистой скриптовости имхо жутко тормозная штука и на больших роликах массовую конвертацию делает тяжким трудом :) Достойной заменой может послужить Yamdi, делающая то же самое в контексте задачи и работающая в на порядки быстрее.
  • Scoundrel · 2 years ago
    2lhotski: Wow! Great thanks really useful thing!
  • willy · 2 years ago
    Здравствуйте! Спасибо за информацию! Есть вопрос - какая конфигурация сервера подойдёт для создания работоспособного сайта с видеоконтентом (на начальной стадии)?
    Спасибо.
  • Adi · 2 years ago
    Hi, I have use the same mencoder command above listed and it works fine. But my video player is a bit big, and when I play the converted flv video, its pixelated,i.e the quality is not good.

    What are the things I need to change to make it a size of 407x305 and quality will be better.
  • Kos · 1 year ago
    Есть проблема при конвертации mov (QuickTime) файла в flv. Вот такая команда.
    mencoder input.mov -o output.flv -of lavf \
    -oac mp3lame -lameopts abr:br=56 -srate 22050 -ovc lavc \
    -lavcopts vcodec=flv:vbitrate=500:mbd=2:mv0:trell:v4mv:cbp:last_pred=3 \
    i_certify_that_my_video_stream_does_not_use_b_frames

    С -nosound работает. То есть как я понял проблема с
    аудио кодеком.
    Opening audio decoder: [faad] AAC (MPEG2/4 Advanced Audio Coding)
    AUDIO: 44100 Hz, 2 ch, s16le, 64.0 kbit/4.54% (ratio: 8000->176400)
    Selected audio codec: [faad] afm: faad (FAAD AAC (MPEG-2/MPEG-4 Audio) decoder)

    Но итоге получаю ошибку.
    Cannot initialize muxer.
    Exiting...

    Кто-нибудь сталкивался с подобным?
  • Don · 1 year ago
    You should probably use flvmeta (http://code.google.com/p/flvmeta/) instead of flvtool2.

    It's a small tool written in C that is much faster than flvtool2, which is written in ruby, and uses way too much memory.