Firefly开源社区

打印 上一主题 下一主题

[应用开发] ffmedia编码模块无法实时写文件及rtsp推流黑屏

74

积分

0

威望

0

贡献

技术小白

积分
74
发表于 2024-3-5 14:59:09      楼主
dengkx 发表于 2024-2-28 09:10
文件写入模块不依赖任何东西,有数据就会被及时即时写入,从你的描述看似乎是解码或编码模块没有产生数据 ...

我使用h264格式视频只进行推流,vlc拉取也是黑屏,可能是rtsp服务器这部分有点问题
回复

使用道具 举报

74

积分

0

威望

0

贡献

技术小白

积分
74
发表于 2024-3-5 15:56:19      沙发
本帖最后由 wx__AxJ5zO 于 2024-3-5 16:22 编辑
dengkx 发表于 2024-3-5 15:20
拉最新v2.2.4代码,可以使用本地文件编码h264或h265推rtsp流测试:
./demo xxx.mp4 -e h264 -l -s -p 5 ...
  1. root@firefly:/home/firefly/demo/ff# python3 demo.py -i /home/firefly/demo/ff/1.mp4 -e 0 -l -p 554
  2. Firefly FFMedia: v2.2.4
  3. input source is a regular file.
  4. INFO: 16ModuleFileReader: init: Get Video Resolution( 1280 x 720 )
  5. mpp[18612]: mpp_rt: NOT found ion allocator
  6. mpp[18612]: mpp_rt: found drm allocator
  7. mpp[18612]: mpp_info: mpp version: 49f29006 author: Jeffy Chen    2021-08-04 [drm]: Add mmap flag detection
  8. mpp[18612]: mpp_info: mpp version: 49f29006 author: Jeffy Chen    2021-08-04 [drm]: Add mmap flag detection
  9. mpp[18612]: mpp_enc: MPP_ENC_SET_RC_CFG bps 2048000 [1920000 : 2176000] fps [30:30] gop 60
  10. mpp[18612]: mpp_enc: send header for set cfg change rc_mode/fps/gop
  11. mpp[18612]: mpp_enc: mode cbr bps [1920000:2048000:2176000] fps fix [30/1] -> fix [30/1] gop i [60] v [0]
  12. INFO: rtsp_server: rtsp_new_demo: rtsp server demo starting on port 554
  13. ==================Pipe===================
  14. ModuleFileReader (H264 1280x720)
  15.    |--->ModuleMppDec (NV12 1280x720)
  16.            |--->ModuleMppEnc (H264 1280x720)
  17.                    |--->ModuleRtspServer (Unknow V4L2 Format 0x0)

  18. wait...INFO: 10MppDecoder: getTimeoutSample: 0x98439a0 frame info changed 1 error 0 discard 0
  19. INFO: rtsp_server: rtsp_new_client_connection: new rtsp client 192.168.1.5:51540 comming
  20. INFO: rtsp_server: rtsp_new_rtp_connection: new rtp over udp for video ssrc:22345678 local_port:49152-49153 peer_addr:192.168.1.5 peer_port:51820-5182
复制代码



ffplay rtsp://192.168.1.35:554/live/0 -rtsp_transport tcp 无画面,输出信息如下
  1. Input #0, rtsp, from 'rtsp://192.168.1.35:554/live/0':   0B f=0/0
  2.   Metadata:
  3.     title           : rtsp_demo
  4.   Duration: N/A, start: 0.000000, bitrate: N/A
  5.   Stream #0:0: Video: h264 (High), yuv420p(progressive), 1280x720, 30 fps, 30 tbr, 90k tbn
  6.     nan M-V:    nan fd=   0 aq=    0KB vq=    0KB sq=    0B f=0/0
复制代码


使用MP4及H264推流后,vlc拉流仍然黑屏,
报错有 Unknow V4L2 Format 0x0

回复

使用道具 举报

74

积分

0

威望

0

贡献

技术小白

积分
74
发表于 2024-3-15 11:29:58      板凳
dengkx 发表于 2024-3-15 10:38
已复现,这个问题应该是不同平台编码器差异导致的,下个版本会修复该问题。

好的
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

友情链接 : 爱板网 电子发烧友论坛 云汉电子社区 粤ICP备14022046号-2
快速回复 返回顶部 返回列表