GES is not rotating a *.mov file which is tagged for rotation
Thibault Saunier
tsaunier at gnome.org
Wed Jun 5 22:38:20 UTC 2019
I actually just checked with your file and with 1.16 (which is the version
where that feature was introduced) and
ges-launch-1.0 +clip file:///home/thiblahute/Downloads/rotate-180.mov
works just fine and rotation is applied as required.
On Wed, Jun 5, 2019 at 6:35 PM Mathieu Duponchelle <mathieu at centricular.com>
wrote:
> Hah, nice !
>
> On 6/6/19 12:34 AM, Thibault Saunier wrote:
>
> GES should do it automatically since
> https://gitlab.freedesktop.org/gstreamer/gst-editing-services/commit/77dac21488f2217c9fc0cb7a7bfba1f5c0ef8789
> can check if that works:
>
> gst-launch-1.0 uridecodebin uri=file://your/file.move ! videoflip !
> video-direction=auto ! videoconvert ! autovideosink
>
> Regards,
>
> Thibault
>
> On Wed, Jun 5, 2019 at 6:30 PM Mathieu Duponchelle <
> mathieu at centricular.com> wrote:
>
>> GES itself will not do that, as a standard GES source only uses
>> uridecodebin. The way image-orientation
>> works is that the demuxer (qtdemux here) will parse the tag and forward
>> it downstream. Other elements
>> such as videoflip can then use it to actually perform the rotation. See
>> the difference in behaviour between
>> the following pipelines:
>>
>> gst-launch-1.0 uridecodebin uri=file:///home/meh/Downloads/rotate-180.mov
>> ! xvimagesink
>> gst-launch-1.0 uridecodebin uri=file:///home/meh/Downloads/rotate-180.mov
>> ! videoflip video-direction=auto ! xvimagesink
>>
>> It could be argued that GES should always add a videoflip element with
>> video-direction=auto, but for now
>> you can probably add videoflip as an effect :)
>>
>> On 6/5/19 11:24 PM, David Ing wrote:
>>
>> Also, here is the output of gst-discoverer-1.0 --verbose
>>
>> I highlighted the relevant section which is image orientation: rotate-180
>> .
>>
>> $ gst-discoverer-1.0 --verbose rotate-180.mov
>> Analyzing file:///C:/Users/ding/Desktop/rotate-180.mov
>> Done discovering file:///C:/Users/ding/Desktop/rotate-180.mov
>>
>> Topology:
>> container: video/quicktime
>> audio: audio/mpeg, mpegversion=(int)4, framed=(boolean)true,
>> stream-format=(string)raw, level=(string)2, base-profile=(string)lc,
>> profile=(string)lc, codec_data=(buffer)1208, rate=(int)44100,
>> channels=(int)1
>> Tags:
>> audio codec: MPEG-4 AAC audio
>> maximum bitrate: 64000
>> bitrate: 64000
>> datetime: 2016-03-14T08:26:08Z
>> QT atom: buffer of 34 bytes
>> container format: Quicktime
>>
>> Codec:
>> audio/mpeg, mpegversion=(int)4, framed=(boolean)true,
>> stream-format=(string)raw, level=(string)2, base-profile=(string)lc,
>> profile=(string)lc, codec_data=(buffer)1208, rate=(int)44100,
>> channels=(int)1
>> Additional info:
>> None
>> Stream ID:
>> a2bd37016805819d7874188ad12d70943361aa53b0c7253a2b9813b7f8ab3cb5/002
>> Language: <unknown>
>> Channels: 1 (unknown layout)
>> Sample rate: 44100
>> Depth: 32
>> Bitrate: 64000
>> Max bitrate: 64000
>> video: video/x-h264, stream-format=(string)avc, alignment=(string)au,
>> level=(string)4.1, profile=(string)high,
>> codec_data=(buffer)01640029ffe1001067640029ac5680780227e59a8080808101000528ee04f2c0,
>> width=(int)1920, height=(int)1080, framerate=(fraction)24/1,
>> pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709,
>> interlace-mode=(string)progressive, chroma-format=(string)4:2:0,
>> bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true
>> Tags:
>> image orientation: rotate-180
>> video codec: H.264 / AVC
>> bitrate: 17149794
>> datetime: 2016-03-14T08:26:08Z
>> QT atom: buffer of 34 bytes
>> container format: Quicktime
>>
>> Codec:
>> video/x-h264, stream-format=(string)avc, alignment=(string)au,
>> level=(string)4.1, profile=(string)high,
>> codec_data=(buffer)01640029ffe1001067640029ac5680780227e59a8080808101000528ee04f2c0,
>> width=(int)1920, height=(int)1080, framerate=(fraction)24/1,
>> pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709,
>> interlace-mode=(string)progressive, chroma-format=(string)4:2:0,
>> bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true
>> Additional info:
>> None
>> Stream ID:
>> a2bd37016805819d7874188ad12d70943361aa53b0c7253a2b9813b7f8ab3cb5/001
>> Width: 1920
>> Height: 1080
>> Depth: 24
>> Frame rate: 24/1
>> Pixel aspect ratio: 1/1
>> Interlaced: false
>> Bitrate: 17149794
>> Max bitrate: 0
>>
>> Properties:
>> Duration: 0:00:10.955000000
>> Seekable: yes
>> Live: no
>> Tags:
>> audio codec: MPEG-4 AAC audio
>> maximum bitrate: 64000
>> bitrate: 64000
>> datetime: 2016-03-14T08:26:08Z
>> QT atom: buffer of 34 bytes
>> container format: Quicktime
>> image orientation: rotate-180
>> video codec: H.264 / AVC
>>
>> WARNING: no real random source present!
>>
>> On Wed, Jun 5, 2019 at 12:51 PM David Ing <ding at panopto.com> wrote:
>>
>>> I have an old *.mov file ...
>>>
>>>
>>> https://drive.google.com/file/d/1qNm2ISC5qnI3VN0MwemCcb_QjweJAjYF/view?usp=sharing
>>>
>>> ... which is tagged in a way that indicates it should be rotated when it
>>> is displayed. Below (at end of this message) is an excerpt from an ffprobe
>>> command which demonstrates the how the file is tagged (I highlighted the
>>> relevant output).
>>>
>>> I am using the file as a GESUriClip inside of a GESTimeline, and the
>>> rotation is not being applied. It comes through upside-down.
>>>
>>> *My question is*: Is this a bug? Or am I expected to detect the tags
>>> manually and then modify the "video-direction" property of GESVideoSource
>>> myself?
>>>
>>> ---------------------------------
>>> $ *ffprobe -v quiet -show_streams rotate-180.mov*
>>> [STREAM]
>>> index=0
>>> codec_name=h264
>>> codec_long_name=H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
>>> profile=High
>>> codec_type=video
>>> codec_time_base=2191/105200
>>> codec_tag_string=avc1
>>> codec_tag=0x31637661
>>> width=1920
>>> height=1080
>>> coded_width=1920
>>> coded_height=1088
>>> has_b_frames=0
>>> sample_aspect_ratio=N/A
>>> display_aspect_ratio=N/A
>>> pix_fmt=yuv420p
>>> level=41
>>> color_range=tv
>>> color_space=bt709
>>> color_transfer=bt709
>>> color_primaries=bt709
>>> chroma_location=left
>>> field_order=unknown
>>> timecode=N/A
>>> refs=1
>>> is_avc=true
>>> nal_length_size=4
>>> id=N/A
>>> r_frame_rate=24/1
>>> avg_frame_rate=52600/2191
>>> time_base=1/600
>>> start_pts=0
>>> start_time=0.000000
>>> duration_ts=6573
>>> duration=10.955000
>>> bit_rate=17150952
>>> max_bit_rate=N/A
>>> bits_per_raw_sample=8
>>> nb_frames=263
>>> nb_read_frames=N/A
>>> nb_read_packets=N/A
>>> DISPOSITION:default=1
>>> DISPOSITION:dub=0
>>> DISPOSITION:original=0
>>> DISPOSITION:comment=0
>>> DISPOSITION:lyrics=0
>>> DISPOSITION:karaoke=0
>>> DISPOSITION:forced=0
>>> DISPOSITION:hearing_impaired=0
>>> DISPOSITION:visual_impaired=0
>>> DISPOSITION:clean_effects=0
>>> DISPOSITION:attached_pic=0
>>> DISPOSITION:timed_thumbnails=0
>>> TAG:rotate=180
>>> TAG:creation_time=2016-03-14T08:26:08.000000Z
>>> TAG:language=und
>>> TAG:handler_name=Core Media Video
>>> TAG:encoder=H.264
>>> [SIDE_DATA]
>>> side_data_type=Display Matrix
>>> displaymatrix=
>>> 00000000: -65536 0 0
>>> 00000001: 0 -65536 0
>>> 00000002: 125829120 70778880 1073741824
>>>
>>> rotation=-180
>>> [/SIDE_DATA]
>>> [/STREAM]
>>>
>>
>> _______________________________________________
>> gstreamer-devel mailing listgstreamer-devel at lists.freedesktop.orghttps://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>
>>
>> _______________________________________________
>> gstreamer-devel mailing list
>> gstreamer-devel at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
> _______________________________________________
> gstreamer-devel mailing listgstreamer-devel at lists.freedesktop.orghttps://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20190605/14e0cd8a/attachment-0001.html>
More information about the gstreamer-devel
mailing list