2016-07-07 41 views
2

我试图在H.265中编码未压缩的视频;但是,当我编写以下管道时,会收到一条我无法解决的错误消息。我正在关注Tegra X1多媒体用户指南中的示例代码,我不明白为什么下面的管道不起作用。我是视频压缩的初学者,所以任何帮助都非常有用。该代码/错误消息:错误:无法将输入写入OpenMAX缓冲区

[email protected]:~$ gst-launch-1.0 filesrc location=small_mem_vid.mov ! 'video/x-raw, format=(string)I420, framerate=(fraction)30/1, width=(int)1280, height=(int)720' ! omxh265enc ! filesink location=new_encode.mov -e 

Setting pipeline to PAUSED ... 

Inside NvxLiteH264DecoderLowLatencyInitNvxLiteH264DecoderLowLatencyInit set DPB and MjstreamingInside   NvxLiteH265DecoderLowLatencyInitNvxLiteH265DecoderLowLatencyInit set DPB and MjstreamingPipeline is PREROLLING ... 
Framerate set to : 30 at NvxVideoEncoderSetParameterNvMMLiteOpen : Block : BlockType = 8 
===== MSENC ===== 
NvMMLiteBlockCreate : Block : BlockType = 8 
ERROR: from element /GstPipeline:pipeline0/GstOMXH265Enc-omxh265enc:omxh265enc-omxh265enc0: Could not write to resource. 

额外调试信息:

/dvs/git/dirty/git-master_linux/external/gstreamer/gst-omx/omx/gstomxvideoenc.c(2139): gst_omx_video_enc_handle_frame(): /GstPipeline:pipeline0/GstOMXH265Enc-omxh265enc:omxh265enc-omxh265enc0: 
Failed to write input into the OpenMAX buffer 
ERROR: pipeline doesn't want to preroll. 
Setting pipeline to NULL ... 
Freeing pipeline ... 
[email protected]:~$ 
+0

@ chema989是MCVE .. GST-发射管是最小的完整,可验证确实:)它的GStreamer的脚本语言.. – nayana

回答

0

确定.mov文件确实是未压缩的视频? .mov扩展名通常用于快速视频。您可以在Linux中使用“mediainfo”来发现有关文件格式的更多细节。在这种情况下,我不认为你可以直接从filesrc到编码器。您可能需要一个qtdemux和一个解码器,也许avdec_h264取决于mediainfo显示的内容。

您也可能需要启用一些更详细的调试: 出口GST_DEBUG = *:4

+0

谢谢你的回应。我确实知道.mov文件是未压缩的视频,因为当我查看视频属性时,它说它的编解码器是未压缩的打包YUV。我认为这可能与尝试使用filesink创建.mov文件有关。什么是H.265视频最常见的视频扩展? – jack81964

+0

h.265视频可能包含在不同的媒体容器格式中,.mp4很常见。 HEVC是h.265的fourcc值。除了h.265之外,您是否在平台上尝试过其他编码器?也许问题是特定于该编码器? – helloflow