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 ... ![](https://file.jishuzhan.net/article/1788427631750811649/9441f9fe4888c5e6cf153d871aa75c0e.webp) ![](https://file.jishuzhan.net/article/1788427631750811649/7e7748f0fcf1cde38aff656b45c5284c.webp) 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显示的窗口,跟桌面上的应用是没关系的,应该是播放窗口的纵横比跟视频纵横比不一致导致的 ![](https://file.jishuzhan.net/article/1788427631750811649/31b1f8e41831124f44e085a36340ad42.webp) ![](https://file.jishuzhan.net/article/1788427631750811649/80e979375b27855bc76d6ee37eda57a0.webp) 这个 参数满屏了。解码4K录像(通过OV13855录像的) gst-launch-1.0 filesrc location=1.mp4 ! qtdemux ! queue ! h264parse ! mppvideodec ! waylandsink "render-rectangle=\<0,0,1024,600\>" ![](https://file.jishuzhan.net/article/1788427631750811649/c07f44c8e890eb4a7a1ff1c791790bcd.webp) 实际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 ... ![](https://file.jishuzhan.net/article/1788427631750811649/2798c9f686220e10f3bffb07bb5bd695.webp) ![](https://file.jishuzhan.net/article/1788427631750811649/277b424a1a102562f95d16a915754f76.webp) ![](https://file.jishuzhan.net/article/1788427631750811649/7fcd1f96ac3fcd6681d6e8d69f322071.webp) ![](https://file.jishuzhan.net/article/1788427631750811649/8d2cf0af16b4cf3b39e7d7c10adfbee4.webp)

相关推荐
qianshang2333 小时前
SQL注入学习总结
网络·数据库·渗透
云小逸4 小时前
【网络通信】同一网段与不同网段的通信原理
网络·网络安全
珠海西格5 小时前
“主动预防” vs “事后补救”:分布式光伏防逆流技术的代际革命,西格电力给出标准答案
大数据·运维·服务器·分布式·云计算·能源
zr5268554476 小时前
PCIe-PN卡(三格电子)
网络
阿波罗尼亚6 小时前
Kubectl 命令记录
linux·运维·服务器
无名的小三轮6 小时前
防火墙基础实验:智能选路下的透明DNS选路配置
网络
一轮弯弯的明月6 小时前
TCP传输大致过程、流量控制与拥塞控制
网络·tcp/ip·计算机网络·学习心得
Fᴏʀ ʏ꯭ᴏ꯭ᴜ꯭.6 小时前
Keepalived单播模式配置与实战指南
linux·服务器·负载均衡
IDC02_FEIYA6 小时前
Linux文件搜索命令有哪些?Linux常用命令之文件搜索命令find详解
linux·运维·服务器
犀思云6 小时前
如何通过网络即服务平台实现企业数字化转型?
运维·网络·人工智能·系统架构·机器人