View streaming from Flash Media Server with Qt


Qt is a cross-platform application and UI framework for developers using C++ or QML, a CSS & JavaScript like language. Qt Creator is the supporting Qt IDE.
Normally using a Flash/AIR client to view a streaming from Adobe Media Server/Flash Media Server, but if we need a client in Qt/C++ to view a streaming?

What is QtAV?

A media playback framework based on Qt and FFmpeg. It helps you to write a player easily. https://github.com/wang-bin/QtAV

See an example with QtAV and Flash Media Server/Adobe Media Server
[cpp]
#include
#include
#include

int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QtAV::WidgetRenderer renderer;
renderer.show();
QtAV::AVPlayer player;
player.setRenderer(&renderer);
player.play(“rtmp://localhost/live/streamName”);
return a.exec();
}
[/cpp]
Very easy =D

Reference
https://github.com/wang-bin/QtAV

Was this article helpful? feel free to make a donation and help keep the blog in the air
Adobe, Flash Media Server, Qt , , ,

Leave a Reply