Discussion:
How to demux a mp4 file to a encoded 264 video file by qtdemux?
Jin
2015-02-06 06:40:12 UTC
Permalink
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.
MaJin
2015-02-06 06:50:06 UTC
Permalink
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 H264 byte stream. I tried the command but there is no output file generated. How could I get the H264 byte stream? Thanks. Jin
Sudhir
2015-02-12 04:16:12 UTC
Permalink
You may try this,

gst-launch-1.0 filesrc location=264.mp4 ! qtdemux ! h264parse !
video/x-h264,stream-format=byte-stream ! filesink location=file.264


~ Sudhir



--
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-tp4670616p4670693.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
Sérgio Agostinho
2015-02-07 12:23:56 UTC
Permalink
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

This should get your h264 data directly to a file.

Cheers

> On 06 Feb 2015, at 06:40, Jin <***@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-***@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Jan Schmidt
2015-02-07 12:30:24 UTC
Permalink
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 <***@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-***@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-***@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
MaJin
2015-02-09 01:14:14 UTC
Permalink
that's great. It works. Thanks a lot.
Jin

> Date: Sat, 7 Feb 2015 23:30:24 +1100
> From: ***@noraisin.net
> To: gstreamer-***@lists.freedesktop.org
> Subject: Re: How to demux a mp4 file to a encoded 264 video file by qtdemux?
>
> 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 <***@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-***@lists.freedesktop.org
> >> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> > _______________________________________________
> > gstreamer-devel mailing list
> > gstreamer-***@lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> >
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-***@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Loading...