I am trying to rotate a video clockwise with gplay command line.
But it got errors:
[Playing ][Vol=01][00:00:05/00:02:22][fps:29]t
Set rotation between 0, 90, 180, 270: 90
fsl_player_rotate(): AutVideoSinko=videosink : ActualVideoSink=videosink-actual-sink-mfw_v4l
rotate_value = 90
rotate = 90update_mfw_v4lsink_parameter(): Update mfw_v4lsink successfully!
fsl_player_rotate(): After rotate_value == 90
mxc_v4l2_output mxc_v4l2_output.0: vout check task failed
full screen size:1920x1080
Failed to initalize the dispmxc_ipu mxc_ipu: ERR: no-0x0,ipu_queue_task err:-22
lay
mxc_v4l2_output mxc_v4l2_output.0: display work fail ret = -22
But it's fine to rotate 180, but 90 and 270.
And I try the following to rotate by 90:
gst-launch filesrc location=/data/No5.mp4 typefind=true ! videoflip method=clockwise ! aiurdemux ! vpudec ! mfw_v4lsink
Errors again:
MFW_GST_V4LSINK_PLUGIN 3.0.7 build on Nov 11 2013 00:17:51.
WARNING: erroneous pipeline: could not link videoflip0 to aiurdemux0
What is the best way to rotate a video in i.mx6 and how?
Thanks,
Wilson
1) Rotation of 180 is fine
gst-launch filesrc location=/home/media/bbb_short_1080p.avi typefind=true ! ai
urdemux ! vpudec ! mfw_v4lsink rotate=180
Console dump
===========
MFW_GST_V4LSINK_PLUGIN 3.0.8 build on Dec 12 2013 07:15:06.
rotate = 180Setting pipeline to PAUSED ...
[INFO] Product Info: i.MX6Q/D/S
vpudec versions :smileyhappy:
plugin: 3.0.8
wrapper: 1.0.38(VPUWRAPPER_ARM_LINUX Build on Dec 12 2013 07:14:31)
vpulib: 5.4.15
firmware: 2.3.10.40778
Pipeline is PREROLLING ...
Aiur: 3.0.8
Core: AVI_PARSER_03.05.07 build on Jul 3 2013 01:47:35
mime: video/x-msvideo
file: /usr/lib/imx-mm/parser/lib_avi_parser_arm11_elinux.so.3.1
Content Info:
URI:
file:///home/media/bbb_short_1080p.avi
Idx File:
/root/.aiur/.home.media.bbb_short_1080p.avi.aidx
Seekable : Yes
Size(byte): 32335220
Movie Info:
Seekable : Yes
Live : No
Duration : 0:00:30.752000000
ReadMode : File
Track : 2
Track 00 [video_000000] Enabled
Duration: 0:00:30.750000000
Language: und
Mime:
video/mpeg, mpegversion=(int)4, parsed=(boolean)true, width=(int)1920, height=(i
nt)1080, framerate=(fraction)24/1
Track 01 [audio_000000] Enabled
Duration: 0:00:30.752000000
Language: und
Mime:
audio/x-ac3, channels=(int)5, rate=(int)48000, bitrate=(int)448000, framed=(bool
ean)true
[INFO] bitstreamMode 1, chromaInterleave 1, mapType 0, tiled2LinearEnable 0
set v4l rotate sucessfully
>>V4L_SINK: Actually buffer status:
hardware buffer : 10
software buffer : 0
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
full screen size:1920x1080
[V4L Update Display]: left=0, top=0, width=1920, height=1080
set v4l display crop sucessfully
New clock: GstSystemClock
=====================================================================
Rotation of either 90 or 270 is not good
Console Dump
============
gst-launch filesrc location=/home/media/bbb_short_1080p.avi typefind=true ! ai
urdemux ! vpudec ! mfw_v4lsink rotate=90
MFW_GST_V4LSINK_PLUGIN 3.0.8 build on Dec 12 2013 07:15:06.
rotate = 90Setting pipeline to PAUSED ...
[INFO] Product Info: i.MX6Q/D/S
vpudec versions :smileyhappy:
plugin: 3.0.8
wrapper: 1.0.38(VPUWRAPPER_ARM_LINUX Build on Dec 12 2013 07:14:31)
vpulib: 5.4.15
firmware: 2.3.10.40778
Pipeline is PREROLLING ...
Aiur: 3.0.8
Core: AVI_PARSER_03.05.07 build on Jul 3 2013 01:47:35
mime: video/x-msvideo
file: /usr/lib/imx-mm/parser/lib_avi_parser_arm11_elinux.so.3.1
Content Info:
URI:
file:///home/media/bbb_short_1080p.avi
Idx File:
/root/.aiur/.home.media.bbb_short_1080p.avi.aidx
Seekable : Yes
Size(byte): 32335220
Movie Info:
Seekable : Yes
Live : No
Duration : 0:00:30.752000000
ReadMode : File
Track : 2
Track 00 [video_000000] Enabled
Duration: 0:00:30.750000000
Language: und
Mime:
video/mpeg, mpegversion=(int)4, parsed=(boolean)true, width=(int)1920, height=(i
nt)1080, framerate=(fraction)24/1
Track 01 [audio_000000] Enabled
Duration: 0:00:30.752000000
Language: und
Mime:
audio/x-ac3, channels=(int)5, rate=(int)48000, bitrate=(int)448000, framed=(bool
ean)true
[INFO] bitstreamMode 1, chromaInterleave 1, mapType 0, tiled2LinearEnable 0
set v4l rotate sucessfully
>>V4L_SINK: Actually buffer status:
hardware buffer : 10
software buffer : 0
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
full screen size:1920x1080
[V4L Update Display]: left=0, top=0, width=1920, height=1080
set v4l display crop sucessfully
New clock: GstSystemClock
=============================================================
P.S. There is no video shown on the screen.
Thanks,
Wilson
Hi Wilson
I'm facing the same issue on a i.MX6D board. It seems related to the IPU setting. No 90 or 270 rotation for a video play back. Audio is OK. No video shown but the Penguin logo still in place.
Using echo 1 > /sys/class/graphics/fb0/rotate is not working while echo 2 will rotate the whole display 180 degrees.
Also tried the latest FSL gst libs, results are the same.
Any workaround found?
Thanks, X Wang
Hi X Wing,
You can resize the width and height first and then rotate the video by 90 or 270.
But still I have problem showing the portrait video 720x1280.
For example,
> gplay abc.mp4
> z 0 0 720 1280
> t = 90 (rotate by 90)
However, with these settings, the video can't be shown in FULL SCREEN after rotation.
Thanks,
Wilson
Hi Wilson,
Which BSP are you using?
Best Regards
Dan
Hi Dan,
I am using Timesys BSP.
The kernel is 3.0.35-ts-armv7l.
Thanks,
Wilson
There is a property (rotate) on the mfw_v4lsink element, can you try it?