Example how to play media within WinCC OA, for example MP4/MKV files

Find and share HowTos to various installations / configurations!
7 posts • Page 1 of 1
agruber
Posts:147
Joined: Tue Sep 07, 2010 2:52 pm

Example how to play media within WinCC OA, for example MP4/MKV files

Post by agruber »

Hi there,

A few customers asked us in the past how to easily play video files in WinCC OA as it was possible in the past with some media player active x plugins.

To do just that I have made a small example with an EWO.

Extract the ZIP file to your WinCC OA project and you should have a working example of it (for WinCC OA 3.13 Windows x64). Just open the VPlayerExample.xml in GEDI/UI to see the usage.

What I have tried and works is:
Playing local files: AVI, MKV (h264), MP4 (h264)
Playing network files via http: MP4 (h264) (example is http://techslides.com/demos/sample-videos/small.mp4 )

What did not work was camera streams via RTSP or HTTP (both password protected). The same URLs work in VLC.

When I did the EWO I saw that its really easy to make an EWO out of an existing QtWidget. The source is included in the API directory, so see for yourself. Also you can use the source to build the EWO for other platforms, it should work everywhere, where WinCC OA works as its just using QT libraries.

Of course there are some lots of things missing, especially a proper error handling or more of the available signals, but its just a proof of concept. Have fun with it. Comments are very welcome.

Please note, as this is not part of the product WinCC OA, no support can be given via WinCC OA product support.

BR,
Andreas
Head of Customer Care https://www.winccoa.com/fileadmin/image ... widget.zip Image
Attachments
VideoPlayerWidget.jpg
WinCCOA_videoplayer_widget.zip
(21.45 KiB) Downloaded 170 times

rehermann
Posts:1
Joined: Tue Dec 14, 2010 8:36 am

Re: Example how to play media within WinCC OA, for example MP4/MKV files

Post by rehermann »

Hi Andreas,

any idea how to view streams from IP-Cams via RTSP?

Best regards
Uwe

agruber
Posts:147
Joined: Tue Sep 07, 2010 2:52 pm

Re: Example how to play media within WinCC OA, for example MP4/MKV files

Post by agruber »

Uwe Rehermann wrote:
any idea how to view streams from IP-Cams via RTSP?
I made some tests creating a VLC EWO. I made it work. However, this is very complicated, technical and eventually problematic with licensing of VLC.

RTSP should be possible with WinCC OA video.

marcel@realsolutions.nu
Posts:12
Joined: Mon Aug 02, 2010 10:22 am

Re: Example how to play media within WinCC OA, for example MP4/MKV files

Post by marcel@realsolutions.nu »

Hi Uwe,

In one project I've used the VLC-activex (64-bits) to H264/RTSP streaming video and got that working (without much effort).....
(by default the VLC activeX uses 1000msec as buffering time, so your video is always delayd, but this can be changed to e.g. 200/300msed to get it 'realtime' )


br, Marcel

ubusto
Posts:11
Joined: Tue Apr 05, 2016 9:55 am

Re: Example how to play media within WinCC OA, for example MP4/MKV files

Post by ubusto »

Marcel van der Jagt wrote:
In one project I've used the VLC-activex (64-bits) to H264/RTSP streaming video and got that working (without much effort).....
(by default the VLC activeX uses 1000msec as buffering time, so your video is always delayd, but this can be changed to e.g. 200/300msed to get it 'realtime' )
Could you be so kind to tell me how to do that?, i need to show an IP Camera stream withing WinCCOA 3.14, i tried to use the 64 bits version of VLC, and then use the ActiveX in a Panel, but it says error loading...

I am asking that question here: https://portal.etm.at/index.php?option= ... =4619#4619

martin.jelemensky
Posts:16
Joined: Wed Aug 09, 2017 1:20 pm

Re: Example how to play media within WinCC OA, for example MP4/MKV files

Post by martin.jelemensky »

If I could ask a question(s) to this older topic. I am currently working on a project to play a mp4 in wincc oa 3.14 using qt 5.5.0 and when i tried to implement your code (ewo) in wincc oa the video would not run. When i pressed the open and autorun button the ewo objects just blinks and immediately disappears. The ewo objects just appears with black background and i am getting the following warning in the log view :

WARNING, 54, Unexpected state, Qt, QWindowsWindow::setGeometryDp: Unable to set geometry 1920x1173+-1911+36 on QWidgetWindow/'scriptEditorWindow'. Resulting geometry: 1920x1167+-1911+36 (frame: 9, 36, 9, 9, custom margin: 0, 0, 0, 0, minimum size: 183x233, maximum size: 16777215x16777215).

I would like to ask if this is a problem of a Qt media library or a WinCC OA problem. Or do i need to install some additional libraries ? Thank you.

Aliabdali_farhad
Posts:1
Joined: Thu Apr 26, 2018 7:16 am

Re: Example how to play media within WinCC OA, for example MP4/MKV files

Post by Aliabdali_farhad »

Hi Andreas,

I could not release a dll or .ewo using API EWO TEMPLATE, even if I could release .ewo or dll on windows is that ok to use on other systems like linux ?

How could I compile this widget or API template for WinccOA 3.15/ linux RHELX 86_64(Red Hat Enterprise Linux Server 7.2) on Virtual-machine 12.5.7 build-5813279, just for API template is there any way compile .pro file with gcc ? tried to compile it by gcc adding DEFINES += "QT_LIBINFIX=WinCC_OA" "QT_NAMESPACE=WinCC_OA" QT_NO_VERSION_TAGGING, passed :syntax error
collect2: error: ld returned 1 exit status

I already installed Qt 5.5 (not on linux yet) on windows 10 64_X64 and including: msvc2013_64 /qml & qmake .
QML debugging activated but qmake didn't on creator , I manually ran both qml & qmake exe files to compile TEMPLATE.pro on Windows cmd didn't work , result : no release or make file, so seems to me Qt creator, make and qmake exe ,Winccoa and linux are not right versions matching


Thanks

7 posts • Page 1 of 1