How to demux a mp4 file to a encoded 264 video file by qtdemux?

Jan Schmidt thaytan at noraisin.net
Sat Feb 7 04:30:24 PST 2015


On 07/02/15 23:23, Sérgio Agostinho wrote:
> Hi,
>
> Assuming you want the demuxed byte stream written to a file you need to modify your pipeline to this
>
> gst-launch-1.0 -e filesrc location=264.mp4 ! qtdemux name=mdemux mdemux.video_0
> ! queue ! filesink location=/path/to/file/filename

mp4 files don't typically contain a byte-stream format H.264 - they're 
AVC packetised. If you write the qtdemux output to a file like that, 
you'll end up with a non-decodable binary blob.

You need to make sure that the data is converted and written as 
byte-stream output by using h264parse and a capsfilter:

gst-launch-1.0 -e filesrc location=264.mp4 ! qtdemux name=mdemux ! 
h264parse ! video/x-h264,stream-format=byte-stream ! filesink 
location=/path/to/file/filename

Regards,
Jan.

>
> This should get your h264 data directly to a file.
>
> Cheers
>
>> On 06 Feb 2015, at 06:40, Jin <xiah_sunny at hotmail.com> wrote:
>>
>> I found something like
>>
>> gst-launch-1.0 filesrc location=264.mp4 ! qtdemux name=mdemux mdemux.video_0
>> ! queue ! decodebin ! autovideosink
>>
>> 264.mp4 has AVC/H264 encoded byte stream and there is no audio data. I need
>> to demux 264.mp4 to get H265 byte stream. I tried the command but there is
>> no output file generated. How could I get the H265 byte stream?
>>
>> Thanks.
>> Jin
>>
>>
>>
>> --
>> View this message in context: http://gstreamer-devel.966125.n4.nabble.com/How-to-demux-a-mp4-file-to-a-encoded-264-video-file-by-qtdemux-tp4670614.html
>> Sent from the GStreamer-devel mailing list archive at Nabble.com.
>> _______________________________________________
>> gstreamer-devel mailing list
>> gstreamer-devel at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>


More information about the gstreamer-devel mailing list