AnsweredAssumed Answered

Playing back video on Qt5

Question asked by ralph__ on Feb 16, 2015
Latest reply on Jun 1, 2015 by yuantian tang

I'm trying to use Qt to play back a video. Here is my code:


// Play a video.

    QApplication app(argc, argv);

    qDebug("Try to play a video: %s", argv[1]);


    QVideoWidget* videoWidget = new QVideoWidget;



    QMediaPlayer* player = new QMediaPlayer;






    return app.exec();


Unfortunately when I execute this code on my iMX6Q board (which normally has no problems using gst-launch to play back video) I end up with a series of static vertical lines appearing on the monitor and no video.

What do I need to do to get video working from Qt?

Here is the output on the console by the way when I try to play back a video using the code above:


# /usr/local/smartfade2/Console /usr/sample720p60_40Mbps.mp4

mxc_sdc_fb fb.26: 1280x720 h_sync,r,l: 40,110,220  v_sync,l,u: 5,5,20 pixclock=74250000 Hz

Try to play a video: /usr/sample720p60_40Mbps.mp4


(gst-plugin-scanner:446): GStreamer-CRITICAL **: gst_element_class_add_pad_template: assertion 'GST_IS_PAD_TEMPLATE (templ)' failed


(gst-plugin-scanner:446): GStreamer-WARNING **: Failed to load plugin '/usr/lib/imx-mm/audio-codec/': /usr/lib/imx-mm/audio-codec/ undefined symbol: src_up2_prefilter_proc


(Console:442): GStreamer-CRITICAL **: gst_object_ref_sink: assertion 'GST_IS_OBJECT (object)' failed

This plugin does not support setParent!

This plugin does not support setParent!

[INFO]  Product Info: i.MX6Q/D/S

vpudec versions

        plugin: 3.0.11

        wrapper: 1.0.46(VPUWRAPPER_ARM_LINUX Build on Feb 16 2015 14:50:08)

        vpulib: 5.4.23


[INFO]  bitstreamMode 1, chromaInterleave 1, mapType 0, tiled2LinearEnable 0