Hello All,
I wanted to rotate the 4.3" LCD Display on i.MX23 Development kit by 90 degree to play the videos in portrait mode.
I have tried using “echo "1" > /sys/class/graphics/fb0/rotate” before playing the video with the “gplay” command. This command is not working and the display is not rotating.
Independent of the rotation setting with “echo”, the video is always playing in landscape mode.
I have also tried by rotating the video while playing with “qplay” command by pressing “t” and entering the required rotation, but it didn’t help. I am getting the error "GLib-GObject-WARNING **: IA__g_object_set_valist: object class `MFW_GST_V4LSINK_INFO_T' has no property named `rotate' " when i entered the above command.
Did anyone face this issue previously?
Suggestions are welcome.
Thanks in advance.
Regards,
Gopi
The current i.MX23 BSP release (and i.MX28 as well) does not support video rotation. The g-stream video sink element "mfw_v4lsink" does not allow its rotation property can be changed and thus video rotation is not supported.
I have enclosed an experimental patch to support video rotation on i.MX233. To test video playback with rotation, after applying the patches to gst-fsl-plugin and kernel, please use command:
gst-launch playbin2 uri=file:///video_file video-sink="mfw_v4lsink rotate=90"
The patch changes the rotation behavior of "mxs_pxp" such that when "PXP_ROTATE_VIDEO" is defined, the video will be rotated relative to the display framebuffer.
There is an element called videoflip which I believe do the same, but this is of course SW rotation.
Leo
Yes, the videoflip element do the same job. However, the video playback is not smooth because it is software rotation. This motivates me to use hardware PXP to rotate the video.
There is a software bug in the previous patch when supplying a video display offset to the playback. Here is the fix.
Hello,
I have tried this Patch and found that it doesn't work for AVI format files.
Regards,
Gopi
Hello Gopi,
The PXP rotation does not have any dependence with the video format. Actually, I only have AVI format video to test and I had validated that video rotation and display offset works. Since the patch does not do any cropping, you have to ensure that the rotated video with display offset still fit into your screen.
Thanks.
echo "1" > /sys/class/graphics/fbcon/rotate or echo "1" > /sys/class/graphics/fbcon/rotate_all generally works if you have framebuffer console enabled (which you likely have). Then the text on the console will be rotated, but that's about it.
Beware that the playback software might have it's own (likely different) idea of video output to the framebuffer. What the playback SW basically does is it prepares the buffer with the image that's to be displayed on the LCD and passes it to the kernel so the kernel can in turn direct the LCDIF controller to pick this data with it's FIFO and display them.
Thus you need to convince the playback software (gplay, qplay) to actually display the data rotated.
Why do you get V4L warning at all?
I have already tried rotating while the video is being played with the use of "gplay" Command.
But it didn't help !
Also, I am not sure why it is giving V4L warning.
Can you please help me resolving the same?
Thanks,
Gopi
What is the video source you're using? Regular file?
It is a regular video in MP4 format with 320x240 Resolution. It is stored in NAND flash.
Ok, the V4L stuff seems to be generated by PXP, nothing to worry about.
I figured the "gplay" is freescale's home-made thing, which in turn is based on gstreamer. Therefore, go, rip it open and try to insert
videoflip method=clockwise
somewhere into the gst-launch pipeline. That should help you do exactly what you need. Otherwise, you can also use gsl-launch directly, see here:
I have tried to use gst-launch for flipping the video.
The below are the commands which I have used.
"gst-launch filesrc location=MPEGSolution_stuart.avi ! mfw_avidemuxer name=demux demux. ! queue max-size-buffers=0 max-size-time=0 ! mfw_h264decoder ! videoflip method=clockwise ! mfw_v4lsink demux. ! queue max-size-buffers=0 max-size-time=0 ! mfw_mp3decoder ! audioconvert ! 'audio/x-raw-int,channels=1' ! alsasink"
It doesn't work, just stops with the below response.
"AVI_PARSER_02.04.06 build on Dec 24 2009 09:29:31.
MFW_GST_AVI_PARSER_PLUGIN 1.8.0 build on May 30 2010 00:25:38.
H264D_ARM9_02.06.01 build on Jul 22 2009 14:59:15.
MFW_GST_H264_DECODER_PLUGIN 1.8.0 build on May 30 2010 00:25:32.
MFW_GST_V4LSINK_PLUGIN 1.8.0 build on May 30 2010 00:25:51.
BLN_MAD-MMCODECS_MP3D_ARM_02.05.00_ARM9 build on Aug 27 2009 11:25:56.
MFW_GST_MP3_DECODER_PLUGIN 1.8.0 build on May 30 2010 00:25:11.
Setting pipeline to PAUSED ...
IRQ 4/MXS DAC/ADC HP SHORT: IRQF_DISABLED is not guaranteed on shared IRQs
File is seekable
find audio track: 1 to decode
find video track: 0 to decode
successfully seek audio the track 1
successfully seek video the track 0
Pipeline is PREROLLING ..."
Is there anything which I am missing?