Skip to content
QtWS25 Call for Papers
  • 0 Votes
    7 Posts
    2k Views
    S

    Ok.
    I have found a solution

    QImage imageToReturn = QImage((uchar*)converted_image.data, converted_image.cols, converted_image.rows, QImage::Format_RGB888); imageToReturn.convertToFormat(QImage::Format_RGB32);

    I have found that when i started to compare metadata between QImage constructed from cv::Mat data and QImage constructed as in second example

  • 0 Votes
    4 Posts
    811 Views
    QuentinJanuelQ

    Here is pretty much the commands I use to deploy the app:

    qmake videoplayer/videoplayer.pro -o build/MakeFile -r -spec win32-msvc2010 -nocache jom -f Makefile -s windeployqt --release release
  • 0 Votes
    3 Posts
    3k Views
    Jonathan LevanonJ

    Thanks. Ended up really using mediainfo, got it with the following method

    int getVideoDuration(std::string fileName){ MediaInfo MI; MI.Open(fileName); int duration = std::stoi(MI.Get(Stream_General, 0, "Duration")); MI.Close(); return duration; }
  • 0 Votes
    26 Posts
    9k Views
    W

    @SilverSurfer I don't have the time handy to do a full working example, but this is the technique in glsl:
    https://www.khronos.org/opengl/wiki/Data_Type_(GLSL)#Swizzling

    (The vec4 can hold "rgba" values if that's what you put in it - the example there just calls it "xyzw" because the data type generically handles any 4 floats.)

    Basically, start from an example that draws an image with a simple glsl shader as a texture. Then hack on the shader until it flips around the colors like you want when it draws the texture. Then use your code that gets the image over the network to upload the image as the OpenGL texture every frame.

  • 0 Votes
    4 Posts
    2k Views
    Z

    @GrecKo thanks for your comment. I've managed to create the window in which people would touch the video, but I'm not sure how to make the player. I've seen there is a library, Qt media, but I don't really know how to bind it with the other screen.

  • 0 Votes
    8 Posts
    7k Views
    L

    Solved, gstreamer-0.10-ffmpeg was missing.

    sudo add-apt-repository ppa:mc3man/gstffmpeg-keep sudo apt-get update sudo apt-get install gstreamer0.10-ffmpeg

    UPDATE:

    Not really solved, using this plugin breaks GStreamer:

    $ export GST_DEBUG=2 $ ./RPIStreamer 0:00:01.232878440 29169 0x7f0414007320 WARN qtdemux qtdemux_types.c:191:qtdemux_type_get: unknown QuickTime node type iods 0:00:01.233010807 29169 0x7f0414007320 WARN qtdemux qtdemux_types.c:191:qtdemux_type_get: unknown QuickTime node type avc1 0:00:01.233055875 29169 0x7f0414007320 WARN qtdemux qtdemux_types.c:191:qtdemux_type_get: unknown QuickTime node type avcC 0:00:01.233095592 29169 0x7f0414007320 WARN qtdemux qtdemux_types.c:191:qtdemux_type_get: unknown QuickTime node type btrt 0:00:01.235499777 29169 0x7f0414007320 WARN qtdemux qtdemux.c:6006:qtdemux_parse_segments:<qtdemux0> streaming; discarding edit list segments 0:00:01.235563181 29169 0x7f0414007320 WARN qtdemux qtdemux.c:7044:qtdemux_parse_trak:<qtdemux0> unknown version 00000000 0:00:01.236318578 29169 0x7f0414007320 WARN qtdemux qtdemux.c:6006:qtdemux_parse_segments:<qtdemux0> streaming; discarding edit list segments 0:00:01.264479125 29169 0x7f0414007680 WARN playsinkconvertbin gstplaysinkconvertbin.c:481:gst_play_sink_convert_bin_cache_converter_caps:<GstPlaySinkAudioConvert@0x7f03f801a050> No conversion elements 0:00:01.290541635 29169 0x7f04140071e0 WARN ffmpeg gstffmpegdec.c:2299:gst_ffmpegdec_frame:<ffdec_h2640> ffdec_h264: decoding error (len: -1, have_data: 0) 0:00:01.297533958 29169 0xba4d40 WARN basesrc gstbasesrc.c:2625:gst_base_src_loop:<source> error: Internal data flow error. 0:00:01.297562286 29169 0xba4d40 WARN basesrc gstbasesrc.c:2625:gst_base_src_loop:<source> error: streaming task paused, reason not-negotiated (-4) Error: "Internal data flow error."
  • 1 Votes
    2 Posts
    2k Views
    pauleddP

    I think I found a solution. I roughly quadrupled the QCameraViewfinder size and repositioned it to the middle.
    Its all done with "cameraVf->setGeometry(x,y,x,y);". And I parented the viewfinder to a new QFrame
    to have a frame and to have the viewfinder not overlaying the start button.

    alt text

    mainwindow.cpp

    ... QFrame *frameVideo = new QFrame(frame4); // extra frame where the video is in frameVideo->setGeometry(5,35,375,380); camera = new QCamera("/dev/video0"); cameraVf = new QCameraViewfinder(frameVideo); camera->setViewfinder(cameraVf); cameraVf->setGeometry(0,0,375,380); QCameraViewfinderSettings vfsettings; vfsettings.setPixelFormat(QVideoFrame::Format_YUV420P); vfsettings.setResolution(640,480); camera->setViewfinderSettings(vfsettings); cameraVf->show(); ... void MainWindow::onZoomClicked(){ if(cameraVf->width() != 1600) { cameraVf->setGeometry(-590,-490,1600,1440); // zoom in } else { cameraVf->setGeometry(0,0,375,380); // zoom out } }
  • 0 Votes
    1 Posts
    784 Views
    No one has replied
  • 0 Votes
    4 Posts
    2k Views
    SGaistS

    Then it sounds like a regression… Can you check against the latest 5.7 to see if it still happens ?

  • 0 Votes
    16 Posts
    6k Views
    AmazingQtA

    @raven-worx Got keys from plugin meta data ("audiocapture")
    QFactoryLoader::QFactoryLoader() checking directory path "/home/MYPATH/build-desktop-system-dev-Desktop_Qt_5_5_1_GCC_32bit-Release/MY_PROJECT/mediaservice" ...
    defaultServiceProvider::requestService(): no service found for - "org.qt-project.qt.mediaplayer"

  • 0 Votes
    1 Posts
    870 Views
    No one has replied
  • 0 Votes
    1 Posts
    811 Views
    No one has replied
  • 0 Votes
    4 Posts
    2k Views
    timdayT

    Actually, I have now seen the .mov files played by QML's MediaPlayer on Windows. I'm making things slightly difficult for myself by not having a Windows machine in the house, so this has all been on an AWS EC2 instance; that gives you a Server2012R2 session... but that seems to have no media player support at all until you enable "Windows Desktop Experience". I also installed a "K-Lite Codec Pack", but since I'd installed that before I enabled the "desktop experience" stuff, I'm not sure if it was needed or not (will try and remove the codec pack at some point, if it's uninstallable; strongly suspect it is needed though). Anyway, that's the existence proof the .mov files can work I was looking for.

    Thanks for the other suggestions...

    I'm not too keen on turning to other tools like VLC or ffmpeg if I can possibly avoid it. Stock Qt has so far served me remarkably well as a one-stop shop for multiplatform applications and I'm very reluctant to have to bring in something else too. Transcoding my video content to something that worked everywhere would have been a more attractive solution if needed.

  • 0 Votes
    2 Posts
    901 Views
    SGaistS

    Hi

    Which platform are you running your application on ?

  • 0 Votes
    10 Posts
    4k Views
    SGaistS

    Hi,

    Not a direct answer but maybe the QtGStreamer might be an option.

    Hope it helps

  • 1 Votes
    2 Posts
    2k Views
    michaelLM

    @JSmith said in Video frame rate on iMX6:

    smoothly

    @JSmith did you get it to work with better fps >30 fps on iMx6Q with Qt5?

  • 0 Votes
    10 Posts
    4k Views
    SGaistS

    Hi,

    Then that's something you should ask to the QtAV authors. It's not an official Qt module.

  • 0 Votes
    1 Posts
    966 Views
    No one has replied
  • 0 Votes
    1 Posts
    1k Views
    No one has replied