Gstreamer : transcoding Matroska video to mp4

时间秒杀一切 提交于 2019-12-07 06:25:54

问题


The hardware on which we are working on doesnt support playing of mkv files. So i'm required to transcode Matroska (mkv) video filea to mp4 video file.

As I have understood from the material available online on transcoding,I'm required to do the following :

  1. separate out different streams of mkv file using matroskademux element.
  2. decode the audio and Video streams into raw format using available mkv decoder and
    supply this data to the mp4 Muxer element and re-encode to required format.

Could anyone please tell me if I applying right approach? Any information/link on this would be very helpful.

vikram


回答1:


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

I assume the video for instance is H264, so just remux that. Below is an example pipeline for gst-launch for remuxing 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 look at the Transmageddon transcoder (www.linuxrising.org) which should give you want you want.



来源:https://stackoverflow.com/questions/8412688/gstreamer-transcoding-matroska-video-to-mp4

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!