Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Embedding Mplayer into Qt Media Player

Embedding Mplayer into Qt Media Player

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 949 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • O Offline
    O Offline
    Omri
    wrote on last edited by
    #1

    hello!
    I would like to watch an avi file in Qt through Mplayer.
    I have Qt 5.5 and using Mplayer for windows.
    this is my code:
    int main(int argc, char *argv[])
    {

    QApplication a(argc, argv);
    a.setAttribute(Qt::AA_NativeWindows, true);
    Dialog w;
    w.show();
    
    QWidget *player;
    QStringList arguments;
    QProcess *m_pProcessVideo;
    m_pProcessVideo = new QProcess(0);
    player = new QWidget(0);
    //QMediaPlayer* player = new QMediaPlayer;
    
    
    QString winNuber = QString ::number((int) (player->winId()));
    arguments << "-slave" << "-wid" << winNuber << "-vo" << "directx:noaccel" << "-fs" << "C:\\Program Files (x86)\\MPlayer for Windows\\MVI_1343.avi" ;
    m_pProcessVideo->start("C:\\Program Files (x86)\\MPlayer for Windows\\mplayer.exe",arguments);
    return a.exec();
    

    }

    The movie is played-I can hear the sound though can't see anything..I think it's the arguments that are wrong. What are the right arguments?
    Thanks.

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved