Gstreamer: transcoding Matroska video to mp4

The hardware we are working on does not support playing mkv files. Therefore, I need to transcode the Matroska (mkv) video files to the mp4 video file.

As I understood from the material available online on transcoding, I need to do the following:

  • highlight the various streams of the mkv file using the matroskademux element .
  • decodes audio and video streams into raw format using the available mkv decoder and
     put this data into mux4 muxer and transcode to the required format.

Can someone tell me if I am taking the right approach? Any information / link to this would be very helpful.

Vikram

+5
source share
1 answer

Depending on what is in the Matroska file, you may not need to decode it, just remux.

I assume the video, for example, is H264, so just do it. Below is an example of a pipeline for gst-launch for remapping a file with h264 and mp3.

gst-launch-0.10 -v filesrc location=$file \
! matroskademux name="demux" demux. ! h264parse ! queue \
! mp4mux name=mux ! filesink location=$file._out.mp4 demux. \
! mp3parse ! queue ! mux.`

You can also watch the Transcageddon transcoder (www.linuxrising.org), which should give you a wish.

+4
source

All Articles