Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to set Subtilties in MP4
Forum Updated to NodeBB v4.3 + New Features

How to set Subtilties in MP4

Scheduled Pinned Locked Moved General and Desktop
mp4
1 Posts 1 Posters 681 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    houmingc
    wrote on last edited by houmingc
    #1

    have two srt files (India and English)
    MP4 initially not having subtitles. How to set English subtitles (.srt) to MP4 player.
    Can play subtitles in MP4player but how it can be done in code?

    void MainWindow::video()
    {
        playlist= new QMediaPlaylist();
        player= new QMediaPlayer();
        videoWidget = new QVideoWidget();
    
        playlist->addMedia(QUrl::fromLocalFile("/opt/bird.mp4"));
        playlist->addMedia(QUrl::fromLocalFile("/opt/arrow.mp4"));
    
        playlist->setPlaybackMode(QMediaPlaylist::Loop);
        playlist->setCurrentIndex(1);
        player->setPlaylist(playlist);
        player->setVolume(100);
        player->setVideoOutput(videoWidget);
        playlist->setCurrentIndex(1);
        player->play();
    
    }
    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved