[英]I tried to launch h264 video files with gstreamer but got the gray video image
I don't know about gstreamer too much, but I'd like to convert h264 file from the surveillance camera because that video is really important!我不太了解 gstreamer,但我想从监控摄像头转换 h264 文件,因为该视频非常重要!
I use this pipeline to launch the h264 video我使用这个管道来启动 h264 视频
gst-launch-1.0 filesrc location=/path/filename.h264 ! h264parse ! avdec_h264 ! xvimagesink
The video can launch but the video looks like this视频可以启动,但视频看起来像这样
I don't know why.我不知道为什么。 Is it because corrupted files or I did something wrong?
是因为文件损坏还是我做错了什么?
Please help请帮忙
That is because the resolution of the pipeline outcome is not matched with source resolution.那是因为管道输出的分辨率与源分辨率不匹配。 You should filter the video as video/x-h264 and determine the width, height and frame rate properties accordingly.
您应该将视频过滤为 video/x-h264 并相应地确定宽度、高度和帧速率属性。 Then, you should be able to see the video.
然后,您应该能够看到视频。 You can see the example below:
你可以看到下面的例子:
filesrc... , video/x-h264, width=1920, height=1080. filesrc...,视频/x-h264,宽度=1920,高度=1080。 frame-rate=30/1.
帧率=30/1。 ...
...
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.