I’ve tried VLC and OMX Player - both don’t work.
Does anyone know of a media player to just play .mkv videos that works with the arm64? I’m just looking to play some video files and movies on the jetson nano while its hooked up to my TV display.
I’m still learning gstreamer but its definitely not plug and play
Hi,
Yo may execute gst-launch-1.0:
$ gst-launch-1.0 uridecodebin uri=file:///home/nvidia/sample_720p.mp4 ! nvoverlaysink
Or gst-play-1.0
$ gst-play-1.0 file:///home/nvidia/sample_720p.mp4
1 Like
Ok, I realised the problem might have been the .mkv
files that I was trying to play.
It seems like gst-play-1.0
plays well with .mp4
And for the record, totem seems like a good command line option for arm64 from what I’ve observed so far.
Where can I get more informatin about the nvoverlaysink
? Does autovideosink
work?
1 Like
Hi,
Please check gstreamer user guide:
https://developer.nvidia.com/embedded/dlc/l4t-accelerated-gstreamer-guide-32-2
Suggest you use NVIDIA plugins to enable hardware encoding/decoding.
So I’ve been messing about Gstreamer plugins and it seems like only gst-launch-1.0
is the only option that is capable of playing high-res mastroska films for my media center. Totem crashes pretty often.
I’ve used the following plugin commands to play a pretty high-res movie (which comes with a subtitle stream):
gst-launch-1.0 textoverlay name=ov ! autovideosink \
filesrc location=~/Videos/sample.mkv ! queue ! decodebin3 name=d d.video_0 ! 'video/x-raw(memory:NVMM)' ! nvvidconv interpolation-method=3 flip-method=0 ! 'video/x-raw(memory:NVMM), format=(string)I420' ! videoconvert ! videorate rate=10.0 ! ov.video_sink d.audio_0 ! queue ! audioconvert ! speed speed=10.0 ! alsasink -e
It has quite a number of spurious functions partly to familiar myself with playback and video conversion plugins. I’m down to one last problem. How on earth do I get subtitles, or text for the matter, onto my videos?
I used decodebin3
which outputs video, audio and text streams. One pipeline I’ve tried and didn’t work is:
gst-launch-1.0 subtitleoverlay name=ov ! autovideosink \
filesrc location=~/Videos/sample.mkv ! queue ! \
decodebin3 name=d d.video_0 ! 'video/x-raw(memory:NVMM)' ! \
nvvidconv interpolation-method=3 flip-method=0 ! \
'video/x-raw(memory:NVMM), format=(string)I420' ! \
videoconvert ! videorate rate=10.0 ! ov.video_sink d.audio_0 ! \
queue ! audioconvert ! speed speed=10.0 ! alsasink d.text_0 ! queue ! \
ov.subtitle_sink -e
Hi,
subtitleoverlay is native gstreamer plugin and does not support NVMM buffers. Please try
gst-launch-1.0 subtitleoverlay name=ov ! autovideosink \
filesrc location=~/Videos/sample.mkv ! queue ! \
decodebin3 name=d d.video_0 ! 'video/x-raw(memory:NVMM)' ! \
nvvidconv interpolation-method=3 flip-method=0 ! video/x-raw ! \
videoconvert ! videorate rate=10.0 ! ov.video_sink d.audio_0 ! \
queue ! audioconvert ! speed speed=10.0 ! alsasink d.text_0 ! queue ! \
ov.subtitle_sink -e
Hi! Thanks for your prompt reply! I’m afraid that didn’t work and threw out the following errors:
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Opening in BLOCKING MODE
NvMMLiteOpen : Block : BlockType = 261
NVMEDIA: Reading vendor.tegra.display-size : status: 6
NvMMLiteBlockCreate : Block : BlockType = 261
Redistribute latency...
Caught SIGSEGV
#0 0x0000007f837b7048 in __GI___poll (fds=0x55a489d310, nfds=547667853936, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:41
#1 0x0000007f838c3e40 in () at /usr/lib/aarch64-linux-gnu/libglib-2.0.so.0
#2 0x00000055a474cd90 in ()
Spinning. Please run 'gdb gst-launch-1.0 27168' to continue debugging, Ctrl-C to quit, or Ctrl-\ to dump core.
How does the video/x-raw
cap filter supposed to work exactly? Is there some implicit conversion?
And just for the record. MPlayer works but it doesn’t do hardware acceleration. I’ve tried using vdpau
but I don’t think its supported on the Maxwell GPUs
Hi,
We can run the video file with subtitle:
https://mkvtoolnix.download/samples/vsshort-vorbis-subs.mkv
Command:
$ gst-launch-1.0 filesrc location= vsshort-vorbis-subs.mkv ! matroskademux name=dem dem.video_0 ! queue ! avdec_msmpeg4 ! subtitleoverlay name=sub dem.subtitle_0 ! queue ! sub. sub. ! xvimagesink
Please refer to the pipeline and check if you can apply to your video files. If you are not able to work out a pipeline, please attach a video file so that we can try.
Thanks @DaneLLL that works!
I’ve also noticed the topology using gst-discoverer
Topology:
container: Matroska
subtitles: Timed Text
subtitles: Timed Text
audio: Vorbis
video: DivX MPEG-4 Version 3
Properties:
Duration: 0:01: 11.255000000
Seekable: yes
Live: no
Tags:
container format: Matroska
language code: und
encoder: Xiph.Org libVorbis I 20020717
encoder version: 0
audio codec: Vorbis
nominal bitrate: 96001
bitrate: 96001
video codec: DivX MS-MPEG-4 Version 3
The video in question is something I um, torrented, and has the following topology:
Topology:
container: Matroska
subtitles: Timed Text
audio: E-AC-3 (ATSC A/52B)
video: H.264 (High Profile)
Properties:
Duration: 1:00: 17.638000000
Seekable: yes
Live: no
Tags:
container format: Matroska
language code: en
audio codec: E-AC-3 audio
bitrate: 640000
extended comment: DURATION=01:00: 17.632000000
video codec: H264
I’ve noticed that running matroskademux
and respective avdec_xx
(in my case its avdec_h264
) doesn’t make use of hardware decoding. As a result, the playback speeds can’t really go past 1.0, as compared to letting decodebin3
run the handle the decoding instead - which is a lot more performant.
Can I clarify what’s at play here?
As for following your pipeline, I managed to get subtitles and videos working with matroskademux but not audio. This is my non-working pipeline command:
gst-launch-1.0 -e subtitleoverlay name=ov ! autovideosink \
filesrc location=~/Videos/<movie>.mkv ! \
matroskademux name=d d.video_0 ! queue ! avdec_h264 ! videorate rate=1.0 ! ov. d.audio_0 ! queue ! ac3parse ! alsasink
Hi,
You may set
$ export GST_DEBUG=*FACTORY*:4
run
gst-launch-1.0 uridecodebin uri=file:///home/nvidia/test.mkv ! alsasink
and check what audio elements are picked. So that you can construct the pipeline of using subtitleoverlay.
@DaneLLL That is a great share. I’m assuming what you mean was to use GST_DEBUG=*FACTORY*:4
to test out gst-play-1.0
or individual pipeline elements because the shared command doesn’t work. I used it nonetheless to see whatdecodebin3
did under the hood and fixed the audio issue (eac3 vs ac3). The debug feedback was invaluable because the pipeline is so unforgiving
I’m starting to see why its the NVMM buffer from the accelerated decode nvv4l2_decoder function that might be causing issues with the subtitleoverlay
even thought it states that its caps are ANY
.
I’m starting to think it might be better to not rely on the automagic subtitle/textoverlay functions and use a different nvidia text overlay, though I’m not entirely clear on how to do this. If you know anything in this area do let me know because it would be great to retain accelerated video decoding
Hi,
We don’t have implementation for displaying subtitle. You have to use gstreamer native plugins, or implement it through nvivafilter(CUDA programming).