20240508在RK3588的Buildroot系统下播放MP4视频

20240508在RK3588的Buildroot系统下播放MP4视频

2024/5/8 18:09

开发板:飞凌的OK3588-C

SDK:Linux/Buildroot R4版本

4.4.2.5 播放 H264 格式视频

[root@ok3588:/]# gst-launch-1.0 filesrc location=13850_h264.mp4 ! qtdemux ! queue ! h264parse !

mppvideodec ! waylandsink

//播放 H264 视频

Setting pipeline to PAUSED ...

Pipeline is PREROLLING ...

Pipeline is PREROLLED ...

Setting pipeline to PLAYING ...

Redistribute latency...

New clock: GstSystemClock

Got EOS from element "pipeline0".

Execution ended after 0:00:03.303679248

Setting pipeline to NULL ...

Freeing pipeline ...

0,0 到不了 左上角,有你们的nx App Launcher V2 p1标题栏

gst-launch-1.0 filesrc location=1.mp4 ! qtdemux ! queue ! h264parse ! mppvideodec ! waylandsink "render-rectangle=<0,0,426,400>"

这个是直接通过wayland显示的窗口,跟桌面上的应用是没关系的,应该是播放窗口的纵横比跟视频纵横比不一致导致的

这个 参数满屏了。解码4K录像(通过OV13855录像的)

gst-launch-1.0 filesrc location=1.mp4 ! qtdemux ! queue ! h264parse ! mppvideodec ! waylandsink "render-rectangle=<0,0,1024,600>"

实际LOG:
root@ok3588:/# file 1.mp4
sh: file: command not found
root@ok3588:/# file
sh: file: command not found
root@ok3588:/# busybox file 1.mp4
file: applet not found
se ! mppvideodec ! waylandsinkfilesrc location=1.mp4 ! qtdemux ! queue ! h264pars
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
Redistribute latency...
New clock: GstSystemClock
Got EOS from element "pipeline0".
Execution ended after 0:02:59.283971806
Setting pipeline to NULL ...
Freeing pipeline ...
root@ok3588:/#
root@ok3588:/#
se ! mppvideodec ! waylandsinkfilesrc location=1.mp4 ! qtdemux ! queue ! h264pars
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
Redistribute latency...
New clock: GstSystemClock
Got EOS from element "pipeline0".
Execution ended after 0:02:59.283815514
Setting pipeline to NULL ...
Freeing pipeline ...
se ! mppvideodec ! waylandsink "render-rectangle=<0,0,426,400>"! queue ! h264pars
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
Redistribute latency...
New clock: GstSystemClock
Got EOS from element "pipeline0".
Execution ended after 0:02:59.283847846
Setting pipeline to NULL ...
Freeing pipeline ...
root@ok3588:/#
root@ok3588:/#
se ! mppvideodec ! waylandsink "render-rectangle=<0,0,1024,600>" queue ! h264pars
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
Redistribute latency...
New clock: GstSystemClock
Got EOS from element "pipeline0".
Execution ended after 0:02:59.283834389
Setting pipeline to NULL ...
Freeing pipeline ...
root@ok3588:/#

4.3 视频硬解码

OK3588 支持 H264,H265、VP8、VP9 视频硬解码,H264 解码器支持 8K@30fps,H265 解码器支持

8K@60fps。

OK3588 使用 mppvideodec 组件进行视频硬解码,它的输出格式为:NV12,I420,YV12。

4.3.1 解码并播放 H264 格式视频

[root@ok3588:/]# gst-launch-1.0 filesrc location=/userdata/media/1080p_60fps_h264-30S.mp4 ! qtdemux !

h264parse ! mppvideodec ! waylandsink

Pipeline is PREROLLING ...

[ 1705.438451] dwhdmi-rockchip fde80000.hdmi: Rate 266625000 missing; computeRedistribute latency. ..

NRedistribute latency...

dynamically

Pipeline is PREROLLED ...

Setting pipeline to PLAYING ...

Redistribute latency...

New clock: GstAudioSinkClock

0:00:01.4 / 0:00:30.0 (4.8 %)

4.3.2 解码并播放 H264 格式视频带音频

[root@ok3588:/]# gst-launch-1.0 filesrc location=/userdata/media/1080p_60fps_h264-30S.mp4 ! qtdemux

name=demux demux.video_0 ! queue ! h264parse ! mppvideodec ! waylandsink demux.audio_0 ! queue !

aacparse ! faad ! alsasink

Pipeline is PREROLLING ...

[ 1705.438451] dwhdmi-rockchip fde80000.hdmi: Rate 266625000 missing; computeRedistribute latency. ..

NRedistribute latency...

dynamically

Pipeline is PREROLLED ...

Setting pipeline to PLAYING ...

Redistribute latency...

New clock: GstAudioSinkClock

0:00:01.4 / 0:00:30.0 (4.8 %)

4.3.3 解码并播放 H265 格式视频

[root@ok3588:/]# gst-launch-1.0 filesrc location=/userdata/media/4k_60fps_h265-30S.mp4 ! qtdemux !

h265parse ! mppvideodec ! waylandsink

Pipeline is PREROLLING ...

[ 1705.438451] dwhdmi-rockchip fde80000.hdmi: Rate 266625000 missing; computeRedistribute latency. ..

NRedistribute latency...

dynamically

Pipeline is PREROLLED ...

Setting pipeline to PLAYING ...

Redistribute latency...

New clock: GstAudioSinkClock

0:00:01.4 / 0:00:30.0 (4.8 %)

4.3.4 解码并播放 H265 格式视频带音频

[root@ok3588:/]# gst-launch-1.0 filesrc location=/userdata/media/4k_60fps_h265-30S.mp4 ! qtdemux

name=demux demux.video_0 ! queue ! h265parse ! mppvideodec ! waylandsink demux.audio_0 ! queue !

aacparse ! faad ! alsasink

Pipeline is PREROLLING ...

[ 1705.438451] dwhdmi-rockchip fde80000.hdmi: Rate 266625000 missing; computeRedistribute latency. ..

NRedistribute latency...

dynamically

Pipeline is PREROLLED ...

Setting pipeline to PLAYING ...

Redistribute latency...

New clock: GstAudioSinkClock

0:00:01.4 / 0:00:30.0 (4.8 %)

4.3.5 解码并播放 VP9 格式视频

[root@ok3588:/]# gst-launch-1.0 filesrc location=/userdata/media/1080p_60fps_vp9-30S.mp4 ! qtdemux !

vp9parse ! mppvideodec ! waylandsink

Pipeline is PREROLLING ...

[ 1705.438451] dwhdmi-rockchip fde80000.hdmi: Rate 266625000 missing; computeRedistribute latency. ..

NRedistribute latency...

dynamically

Pipeline is PREROLLED ...

Setting pipeline to PLAYING ...

Redistribute latency...

New clock: GstAudioSinkClock

0:00:01.4 / 0:00:30.0 (4.8 %)

4.3.6 解码并播放 VP9 格式视频带音频

[root@ok3588:/]# gst-launch-1.0 filesrc location=/userdata/media/1080p_60fps_vp9-30S.mp4 ! qtdemux

name=demux demux.video_0 ! queue ! vp9parse ! mppvideodec ! waylandsink demux.audio_0 ! queue !

aacparse ! faad ! alsasink device=plughw:1,0

Pipeline is PREROLLING ...

[ 1705.438451] dwhdmi-rockchip fde80000.hdmi: Rate 266625000 missing; computeRedistribute latency. ..

NRedistribute latency...

dynamically

Pipeline is PREROLLED ...

Setting pipeline to PLAYING ...

Redistribute latency...

New clock: GstAudioSinkClock

0:00:01.4 / 0:00:30.0 (4.8 %)

4.3.7 解码并播放 VP8 格式视频

[root@ok3588:/]# gst-launch-1.0 filesrc location=/userdata/media/1080p_30fps_vp8.webm ! matroskademux !

queue ! mppvideodec ! waylandsink

Setting pipeline to PAUSED ...

Pipeline is PREROLLING ...

Redistribute latency...

Redistribute latency...

Pipeline is PREROLLED ...

Setting pipeline to PLAYING ...

Redistribute latency...

New clock: GstAudioSinkClock

Got EOS from element "pipeline0".

Execution ended after 0:00:29.573170846

Setting pipeline to NULL ...

Freeing pipeline ...

4.3.8 解码并播放 VP8 格式视频带音频

[root@ok3588:/]# gst-launch-1.0 filesrc location=/userdata/media/1080p_30fps_vp8.webm typefind=true !

video/webm ! matroskademux name=dec dec. ! queue ! mppvideodec ! waylandsink dec. ! queue ! decodebin !

audioconvert ! audioresample ! alsasink device=plughw:1,0

Setting pipeline to PAUSED ...

Pipeline is PREROLLING ...

Redistribute latency...

Redistribute latency...

Pipeline is PREROLLED ...

Setting pipeline to PLAYING ...

Redistribute latency...

New clock: GstAudioSinkClock

Got EOS from element "pipeline0".

Execution ended after 0:00:29.573170846

Setting pipeline to NULL ...

Freeing pipeline ...

相关推荐
Koi慢热35 分钟前
路由基础(全)
linux·网络·网络协议·安全
soulteary1 小时前
突破内存限制:Mac Mini M2 服务器化实践指南
运维·服务器·redis·macos·arm·pika
简鹿办公1 小时前
如何提取某站 MV 视频中的音乐为 MP3 音频
音视频·简鹿视频格式转换器·视频提取mp3音频
yufengxinpian1 小时前
集成了高性能ARM Cortex-M0+处理器的一款SimpleLink 2.4 GHz无线模块-RF-BM-2340B1
单片机·嵌入式硬件·音视频·智能硬件
爱吃青椒不爱吃西红柿‍️1 小时前
华为ASP与CSP是什么?
服务器·前端·数据库
hzyyyyyyyu2 小时前
内网安全隧道搭建-ngrok-frp-nps-sapp
服务器·网络·安全
runing_an_min3 小时前
ffmpeg视频滤镜:替换部分帧-freezeframes
ffmpeg·音视频·freezeframes
刽子手发艺3 小时前
WebSocket详解、WebSocket入门案例
网络·websocket·网络协议
Mr_Xuhhh4 小时前
重生之我在学环境变量
linux·运维·服务器·前端·chrome·算法