Unable to play mkv video using gstreamer
Describe your issue
I am unable to play MKV files using gstreamer. I've tried many different ways and none worked for me.
Initially I wrote a program to extract a frame out of the video using playbin
, it works for most of the videos I input to it. But for some files when I call gst_element_get_state(playbin, NULL, NULL, 5*GST_SECOND)
I get GST_STATE_CHANGE_FAILURE
as return.
Triggered by that I started trying another ways to reproduce the video, for example:
gst-play-1.0 ~/Downloads/cicd.mkv
That opens the player but all the frames are black.
I also tried:
gst-launch-1.0 -v playbin3 uri=file:///home/$USER/Downloads/cicd.mkv
gst-launch-1.0 -v playbin uri=file:///home/$USER/Downloads/cicd.mkv
And again all I got was a black screen.
Using VLC and other players I was able to play the video.
Other MKV videos I have works with all methods listed above.
Expected Behavior
I would expect to be able to play the video using gstreamer.
Observed Behavior
gstreamer is unable to properly play the video, programatically it gives error and using cli tools it shows only completely black frames.
Setup
- Operating System: Ubuntu 22.04.4 LTS x86_64
- Device: Computer
- GStreamer Version: 1.20.3
- gst-play-1.0 version 1.20.1
- gst-launch-1.0 version 1.20.3
Steps to reproduce the bug
- Download the video in this issue
- open terminal
- type
gst-play-1.0 ~/Downloads/cicd.mkv
- You can also try
gst-launch-1.0 -v playbin3 uri=file:///home/$USER/Downloads/cicd.mkv
orgst-launch-1.0 -v playbin uri=file:///home/$USER/Downloads/cicd.mkv
How reproducible is the bug?
We tried in many different machines running linux, so it is not device specific.
Additional Information
Video that is failing: cicd.mkv
Worth to mention that the video above was also encoded using gstreamer.