Results 1 to 2 of 2

Thread: Timecode in QMediaPlayer

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Nov 2013
    Posts
    5
    Thanked 3 Times in 1 Post
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default Timecode in QMediaPlayer

    Hello.
    I'm developing tool to create subtitles. I have to get timecode not only frame number.Is it possible using QMediaPlayer? Very helpful would be also answer how to get FPS(MetaDate doesn't work).

    Qt Code:
    1. subtitletools::subtitletools()
    2. {
    3. mplayer=new QMediaPlayer();
    4. vwidget=new QVideoWidget();
    5. vwidget->setAspectRatioMode(Qt::IgnoreAspectRatio);
    6. mplayer->setVideoOutput(vwidget);
    7. QString file=QFileDialog::getOpenFileName(this,"Otwórz plik");
    8. mplayer->setMedia(QUrl::fromLocalFile(file));
    9. mplayer->setVolume(100);
    10. mplayer->setPlaybackRate(1);
    11. mplayer->play();
    12. }
    To copy to clipboard, switch view to plain text mode 

  2. The following 3 users say thank you to mkarol for this useful post:


  3. #2
    Join Date
    Nov 2013
    Posts
    5
    Thanked 3 Times in 1 Post
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default Re: Timecode in QMediaPlayer

    Ok,I have to read docs more carefully. Function: QMediaPlayer:: position() return not number of frame but time in milliseconds. But question about FPS is still active.
    Last edited by mkarol; 5th December 2013 at 19:01.

Similar Threads

  1. Playing MP4 and FLV with QMediaPlayer
    By JasonKretzer in forum Newbie
    Replies: 2
    Last Post: 12th September 2013, 22:58
  2. QMediaPlayer Questions
    By morpheus in forum Newbie
    Replies: 1
    Last Post: 25th August 2013, 15:03
  3. set raw data buffer to QMediaPlayer
    By saman_artorious in forum Qt Programming
    Replies: 1
    Last Post: 20th August 2013, 10:13
  4. QMediaplayer setposition is wrong
    By oldkkk2008 in forum Qt Programming
    Replies: 1
    Last Post: 11th March 2013, 11:58
  5. QMediaPlayer problems
    By alenn.masic in forum Qt Programming
    Replies: 1
    Last Post: 25th February 2013, 16:32

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.