Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Brainstorm
  4. [Solved] How to merging media files with Qt?

[Solved] How to merging media files with Qt?

Scheduled Pinned Locked Moved Brainstorm
4 Posts 3 Posters 3.5k Views
  • 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.
  • S Offline
    S Offline
    scroverty
    wrote on last edited by
    #1

    Hi, I'm new to Qt and this forum, please treat me kindly.

    I'm working with many media files that need to be merged together (ogg vorbis, for instance).

    Is there any Qt Class that help me doing so? Like using cat:

    @cat file1.ogg file2.ogg > file3.ogg@

    The result is a file contain sound from the other 2.

    Many thanks for those who give me answer!

    Alvis Ar'Berkeley Andrew.
    Pleased to meet you!

    1 Reply Last reply
    0
    • D Offline
      D Offline
      deimos
      wrote on last edited by
      #2

      You can achieve this just with "QFile":http://qt-project.org/doc/qt-4.8/QFile.html class: create a file3.ogg then read both file1 and file2 while writing their content into file3.
      You can also use "QProcess":http://qt-project.org/doc/qt-4.8/QProcess.html to execute that command but this is OS dependant.

      1 Reply Last reply
      0
      • S Offline
        S Offline
        scroverty
        wrote on last edited by
        #3

        Thank you, deimos!

        Alvis Ar'Berkeley Andrew.
        Pleased to meet you!

        1 Reply Last reply
        0
        • H Offline
          H Offline
          hipersayan_x
          wrote on last edited by
          #4

          Be very careful, joining two or more videos as raw files not always works, not all video/audio formats accept a new data stream after it ends, and this method will not work with different formats.
          The best way of achieving this, is transcoding the files with, for instance, "FFmpeg":http://ffmpeg.org/pipermail/ffmpeg-user/2012-February/004983.html, you can run FFmpeg through "QProcess":http://qt-project.org/doc/qt-4.8/QProcess.html.

          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