Important: Please read the Qt Code of Conduct -

QWidget with mplayer slave mode

  • Hi!

    I would like to play movie files on my rpi 3 with framebuffer. From console is working fine:

    SDL_VIDEODRIVER=fbcon SDL_FBDEV=/dev/fb1 mplayer -vo sdl -vf scale -xy 320 /var/spool/samba/movies.....

    I tried lot of examples, but not working, what is the correct argument list to QProcess in this environment?
    It is a minimal sample:

            QString cmd;
    	player = new QWidget();
    	pproc = new QProcess();
    	player->setGeometry(0, 0, 320, 240);
    	cmd = QString("mplayer -slave -wid %1 /var/spool/samba/movies...").arg(player->winId());
    	qDebug() << cmd;

    Thanks a lot.

  • Lifetime Qt Champion


    It's the same as described in QProcess's details.

  • Sorry, you misunderstood me, I tried also with QStringList type arguments.
    I need the mplayer's correct arguments.

  • Lifetime Qt Champion

    Did you check the outputs of QProcess to see if the application is starting properly and is doing something ?

  • @SGaist

    I found the solution in the mplayer's docs, the -wid not working in linuxfb environment. The qprocess started the mplayer who writes the framebuffer directly, it's working.