我在AM5728开发板上调试视频保存功能上碰到个问题:
按照 TI WIKI 视频保存相关的文档, 将转换后的 nv12 文件进行 H264 编码
按照 TI WIKI 视频保存相关的文档, 将转换后的 nv12 文件进行 H264 编码
gst-launch-1.0 filesrc location=videotestsrc_320x240.nv12 ! videoparse width=320 height=240 format=nv12 ! vpe ! ducatih264enc ! filesink location=videotestsrc_320x240.264
当内核版本为4.4.19时(对应SDK版本3.0),可以正常运行,得到的视频压缩文件也能正常播放。
而当内核版本为4.9.41时(对应SDK版本4.0),,命令无法正常运行,报错为:
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
(gst-launch-1.0:1058): GStreamer-CRITICAL **: gst_caps_is_strictly_equal: assertion 'GST_IS_CAPS (caps2)' failed
(gst-launch-1.0:1058): GStreamer-CRITICAL **: gst_caps_get_structure: assertion 'GST_IS_CAPS (caps)' failed
(gst-launch-1.0:1058): GStreamer-CRITICAL **: gst_structure_get_string: assertion 'structure != NULL' failed
ERROR: from element /GstPipeline:pipeline0/GstVideoParse:videoparse0: Internal data stream error.
Additional debug info:
../../../gst-plugins-bad-1.8.3/gst/rawparse/gstrawparse.c(487): gst_raw_parse_loop (): /GstPipeline:pipeline0/GstVideoParse:videoparse0:
stream stopped, reason error
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
*** Error in `gst-launch-1.0': free(): invalid pointer: 0xb5400e20 ***
Aborted (core dumped)
无法得到视频压缩文件;如果去掉 vpe !即命令为:
gst-launch-1.0 filesrc location=videotestsrc_320x240.nv12 ! videoparse width=320 height=240 format=nv12 ! ducatih264enc ! filesink location=videotestsrc_320x240.264
则可正常运行,但得到的压缩文件不正常,播放时,几乎全为绿色,貌似在新的SDK4.0版本上,VPE模块无法正常工作
希望得到你们的帮助!!谢谢!!