This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] Linux:如何将 h2642另存为 YUV

Guru**** 2611385 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/583050/linux-how-to-save-h2642-as-yuv

工具/软件:Linux

1、我使用以下命令将 h264解码为 YUV 格式
gst-launch-1.0 -v 文件 rc location=airshow_p352x288_nv12.h264 num-buffers=600! 排队! h264parse! ducatih264dec! 排队! 文件链接位置=1.YUV

2、调试信息如下

正在将管道设置为暂停...

管道是 PREROLLING ...

/GstPipeline0/GstH264Parse:h264parse0.GstPad:src:cap = video/x-h264、width=(int) 352、height=(int) 288、ex解 析=(布尔) true、stream-format=(string) byte-stream、 alignment=(string) au

/GstPipeline0/GstDucatiH264Dec:ducatih264dec0.GstPad:src:cap = video/x-raw、format=(string) NV12、width=(int) 512、height=(int) 384、framerate=(fraction) 0/1

/GstPipeline0/GstQueue:queue1.GstPad:sink:cap = video/x-raw、format=(string) NV12、width=(int) 512、height=(int) 384、framerate=(fraction) 0/1

/GstPipeline0/GstDucatiH264Dec:ducatih264dec0.GstPad:sink:cap = video/x-h264、width=(int) 352、height=(int) 288、trole=(布尔值) true、stream-format=(string) byte-stream、 alignment=(string) au

/GstPipeline0/GstQueue1.GstPad:src:cap = video/x-raw、format=(string) NV12、width=(int) 512、height=(int) 384、framerate=(fraction) 0/1

/GstPipeline:fipine0/GstFileSink:filesink0.GstPad:SINK:cap = VIDEO/x-RAW、format=(string) NV12、width=(int) 512、height=(int) 384、framerate=(fraction) 0/1

/GstPipeline0/GstDucatiH264Dec:ducatih264dec0.GstPad:src:cap = video/x-raw、format=(string) NV12、width=(int) 512、height=(int) 384、framerate=(fraction) 0/1、 ma-ref-frames=(int) 19.

/GstPipeline0/GstQueue:queue1.GstPad:sink:cap = video/x-raw、format=(string) NV12、width=(int) 512、height=(int) 384、framerate=(fraction) 0/1、 ma-ref-frames=(int) 19.

/GstPipeline0/GstQueue:queue1.GstPad:src:cap = video/x-raw、format=(string) NV12、width=(int) 512、height=(int) 384、framerate=(fraction) 0/1、 ma-ref-frames=(int) 19.

/GstPipeline:流水线0/GstFileSink:filesink0.GstPad:sink:cap = video/x-raw、format=(string) NV12、width=(int) 512、height=(int) 384、framerate=(fraction) 0/1、 ma-ref-frames=(int) 19.

管道是 PREROLLED...

正在将管道设置为正在播放...

新时钟:GstSystemClock

从元件"流水线0"获得 EOS。

0:00:01.493697666后结束执行

正在将管道设置为暂停...

正在将管道设置为就绪...

正在将管道设置为 NULL ...

正在释放管道...
我在 ducatih264dec 中找到、当分辨率从352x288变为512x284时、这是什么原因?

 

 

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    解码器的输出将在所有4侧(左侧、右侧、顶部和底部)都有填充、并且随编解码器而变化。 因此、您将看到分辨率为512x384的解码器填充输出。 您可以使用 VPE 裁剪填充区域
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    您好:

    是否可以使用 VPE 编写命令以进行裁剪?
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    只需在 ducatih264dec 之后添加 VPE 即可,这应该起作用。

    ducatih264dec! VPE! 文件链接

    如果需要、您可以添加筛选器以缩放或格式转换到 VPE、如下所示

    ducatih264dec! VPE! 'video/x-raw、width=480、height=320'! 文件链接
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好:

    在图像正常之后进行 VPE 处理之后。

    我仍然有很多问题。

    视频被放大后、1、解码器的输出?

    2、解码输出分辨率的规则是什么?

    3、如下所示、使用 YUVviewerOlus 工具播放 YUV 文件(未添加处理 YUV 文件的 VPE)

    发现没有要处理的图像周围呈绿色的 VPE,但使用 VPE 时,图像是正常的

    VPE 是如何处理缩放或裁剪的图像?
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    1) 1)解码器的输出未放大。 它仅在所有四侧用绿色区域填充。 这是预期的解码器行为。
    2) 2)请参阅 git.ti.com/.../viddec3test.c。 此处查找 padded_width 和 padded_height。 解码器期望这是输出缓冲器的分辨率。
    3) padding info (请参阅 viddec3test.c 中的 topLeft 和 bottreight 坐标)是解码器提供的有关裁剪要求的信息、用于获取整个区域中的活动帧区域。
    VPE 将处理此问题、并可以扩展到不同的分辨率以及像 yuyv 或 RGB 这样的四立方厘米的防冻垫