Question about mkv and avi muxing

张若 zr92zr at gmail.com
Mon Sep 12 11:52:26 UTC 2016


I am using gstreamer 1.0 on imx 6 board with kernel 3.14 to do some video
colorspace conversions. However, playback of the output video has some
problems.

The input video is YUYV (YUY2) format with AVI. What I did is to convert it
to I420 format with MKV/AVI.

To MKV:
gst-launch-1.0 -v -e filesrc location=output_clip2.avi ! avidemux !
videoparse height=1080 width=1920 framerate=50/1
format=GST_VIDEO_FORMAT_YUY2 ! videoconvert ! video/x-raw, format=I420,
height=1080, width=1920, framerate=50/1  ! matroskamux ! filesink
location=/mnt/sdcard/testconv.mkv

To AVI:
gst-launch-1.0 -v -e filesrc location=output_clip2.avi ! avidemux !
videoparse height=1080 width=1920 framerate=50/1
format=GST_VIDEO_FORMAT_YUY2 ! videoconvert ! video/x-raw, format=I420,
height=1080, width=1920, framerate=50/1  ! avimux ! filesink
location=/mnt/sdcard/testconv.avi

Above, I only use SW (videoconvert) for conversion. I also try to convert
from YUYV to UYVY first by SW and from UYVY to I420 by HW (
imxipuvideotransform) to reduce the CPU usage.

For both of them, running process is fine and I can get the mkv and avi
files. The problems are with playback of them. For MKV output, I cannot
play the video using VLC, it shows"cannot recognize and find the codec",
but it is successful to play with the Potplayer. For AVI output, both VLC
and Potplayer cannot play the video.

In addition, I also try streaming without any conversion:
gst-launch-1.0 -v -e filesrc location=output_clip2.avi ! avidemux !
matroskamux ! filesink location=/mnt/sdcard/testconv.mkv

The same problem with the output MKV file.

I don't know why this happens. Maybe I did something wrong? I am not sure
and ask for help.

Thanks in advance!

Ruo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160912/89086716/attachment.html>


More information about the gstreamer-devel mailing list