GStreamer can't decode Canon XF705 H265 10bit MXF video

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

GStreamer can't decode Canon XF705 H265 10bit MXF video

David Manpearl-2

I have been unable to decode H265 10-bit MXF formats from Canon XF705 using GStreamer v1.14.1

My goal is to transcode into H264 with a GStreamer pipeline something like this (link to input video file is below):

gst-launch-1.0 filesrc location=A003C002H1901045W_CANON.MXF ! qtdemux ! h265parse ! avdec_h265 ! videoconvert ! videoscale ! video/x-raw,width=1280,height=720 ! x264enc ! h264parse ! queue ! mp4mux ! filesink location=video.mp4

Setting pipeline to PAUSED, PREROLLING ...

ERROR: from element /GstPipeline:pipeline0/GstQTDemux:qtdemux0: This file is invalid and cannot be played.

Additional debug info:

qtdemux.c(747): gst_qtdemux_pull_atom (): /GstPipeline:pipeline0/GstQTDemux:qtdemux0:

atom has bogus size 101591860

ERROR: pipeline doesn't want to preroll.

  

I have had similar errors with decodebin, qtdemux, mxfdemux, and avdemux_mxf as in the examples below.


Here are some of the pipelines I have unsuccessfully tried:


gst-launch-1.0 -v filesrc location=A003C002H1901045W_CANON.MXF ! qtdemux ! fakesink

Setting pipeline to PAUSED, PREROLLING ...
ERROR: from element /GstPipeline:pipeline0/GstQTDemux:qtdemux0: This file is invalid and cannot be played.
Additional debug info:
qtdemux.c(747): gst_qtdemux_pull_atom (): /GstPipeline:pipeline0/GstQTDemux:qtdemux0:
atom has bogus size 101591860
ERROR: pipeline doesn't want to preroll.

 

gst-launch-1.0 -v filesrc location=A003C002H1901045W_CANON.MXF ! mxfdemux ! h265parse ! fakesink
Setting pipeline to PAUSED, PREROLLING ...
WARNING: from element /GstPipeline:pipeline0/GstMXFDemux:mxfdemux0: Delayed linking failed.
Additional debug info:
./grammar.y(510): gst_parse_no_more_pads (): /GstPipeline:pipeline0/GstMXFDemux:mxfdemux0:
failed delayed linking some pad of GstMXFDemux named mxfdemux0 to some pad of GstH265Parse named h265parse0
ERROR: from element /GstPipeline:pipeline0/GstMXFDemux:mxfdemux0: Internal data stream error.
Additional debug info:
mxfdemux.c(3257): gst_mxf_demux_loop (): /GstPipeline:pipeline0/GstMXFDemux:mxfdemux0:
ERROR: pipeline doesn't want to preroll.

 

gst-launch-1.0 -v filesrc location=A003C002H1901045W_CANON.MXF ! avdemux_mxf ! fakesink
Setting pipeline to PAUSED, PREROLLING ...
WARNING: from element /GstPipeline:pipeline0/avdemux_mxf:avdemux_mxf0: Delayed linking failed.
Additional debug info:
./grammar.y(510): gst_parse_no_more_pads (): /GstPipeline:pipeline0/avdemux_mxf:avdemux_mxf0:
failed delayed linking some pad of avdemux_mxf named avdemux_mxf0 to some pad of GstFakeSink named fakesink0
ERROR: from element /GstPipeline:pipeline0/avdemux_mxf:avdemux_mxf0: Internal data stream error.
Additional debug info:
gstavdemux.c(1590): gst_ffmpegdemux_loop (): /GstPipeline:pipeline0/avdemux_mxf:avdemux_mxf0:
streaming stopped, reason error (-5)
ERROR: pipeline doesn't want to preroll.

 

Example file download: https://www.dropbox.com/sh/q5m7cxgneq5z5h3/AAAh-d3FdhouZ2bFv2FajR18a?dl=0
(note: Adobe Premiere can decode this file. Quicktime and VLC cannot)

Here are some stats on this file:


ffprobe -hide_banner -show_format -show_streams -print_format json A003C002H1901045W_CANON.MXF

  Metadata:
    uid             : 3b6f6487-8405-4901-802e-242719000075
    generation_uid  : 3b6f6487-8405-4903-802e-242719000075
    company_name    : CANON
    product_name    : XF705
    product_version : 1.00
    product_uid     : 060e2b34-0401-010d-0e15-005658460400
Duration: 00:00:16.02, start: 0.000000, bitrate: 157466 kb/s
  Stream #0:0: Video: none, none(progressive), 3840x2160, SAR 1:1 DAR 16:9,
9.94 fps, 59.94 tbr, 59.94 tbn, 59.94 tbc
            "codec_type": "video",
            "codec_tag": "0x0000",
            "width": 3840,
            "height": 2160,
            "has_b_frames": 0,
            "r_frame_rate": "60000/1001",

 

mediainfo A003C002H1901045W_CANON.MXF
  Format : MXF
  Format version : 1.3
  Format profile : OP-1a
  Writing application : CANON XF705 1.00
  Codec ID : 0E15000402100001-0E15000500013000
  Color space : YUV
  Chroma subsampling : 4:2:2
  Bit depth : 10 bits
  Scan type : Progressive


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: GStreamer can't decode Canon XF705 H265 10bit MXF video

Tim Müller
On Fri, 2019-07-26 at 11:43 -0700, David Manpearl wrote:

Hi David,

This is what I get:

$ gst-play-1.0 A003C002H1901045W_CANON.MXF
WARNING No decoder available for type 'video/x-mxf-
06.0e.2b.34.04.01.01.0c.0e.15.00.04.02.10.00.01-
06.0e.2b.34.04.01.01.0c.0e.15.00.05.00.01.30.00'.
WARNING debug information: gsturidecodebin.c(921): unknown_type_cb ():
/GstPlayBin:playbin/GstURIDecodeBin:uridecodebin0

I think we're just missing mappings for H265 in mxfdemux from the looks
of it.

Could you file an issue in gitlab please?

https://gstreamer.freedesktop.org/documentation/contribute/index.html#how-to-file-issues-and-request-for-enhancements

Cheers
 Tim

--
Tim Müller, Centricular Ltd - http://www.centricular.com

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: GStreamer can't decode Canon XF705 H265 10bit MXF video

rachelgomez161999
In reply to this post by David Manpearl-2
The Canon XF705 camera records videos in the H.265/HEVC format which uses advanced compression techniques to achieve high-quality video at lower bitrates. However, some applications may not be able to handle this format.

To decode H.265/HEVC files in GStreamer, you need to have the necessary plugins installed. One option is to use the gst-libav plugin which provides support for a wide range of codecs including H.265/HEVC. To install the plugin, you can run the following command:

arduino
Copy code
sudo apt-get install gstreamer1.0-libav
Once the plugin is installed, you should be able to decode H.265/HEVC files using GStreamer. You can test this by running the following command:

css
Copy code
gst-launch-1.0 filesrc location=/path/to/video.mxf ! decodebin ! autovideosink
Replace /path/to/video.mxf with the path to your MXF video file. The decodebin element will automatically detect the codec and use the appropriate decoder plugin to decode the video. The autovideosink element will display the video on your screen.

If you still encounter issues with decoding the video, you may need to check if there are any additional GStreamer plugins that are required for your specific use case.


Regards,
Rachel Gomez