IPhone-Video got rotated 90 degrees

0

Hello,

we are using MediaConvert to convert videos into a streamable HLS format and it works great. Today we had a video which was rotated by 90 degrees in the conversion. Our input selector for the video has "No rotation" selected (confirmed by looking at the job) and the metadata of the video does not seem to have any rotation metadata which could indicate why it was rotated.

Here is the metadata

{
"streams": [
{
"index": 0,
"codec_name": "aac",
"codec_long_name": "AAC (Advanced Audio Coding)",
"profile": "LC",
"codec_type": "audio",
"codec_tag_string": "mp4a",
"codec_tag": "0x6134706d",
"sample_fmt": "fltp",
"sample_rate": "44100",
"channels": 1,
"channel_layout": "mono",
"bits_per_sample": 0,
"r_frame_rate": "0/0",
"avg_frame_rate": "0/0",
"time_base": "1/44100",
"start_pts": 0,
"start_time": "0.000000",
"duration_ts": 17687408,
"duration": "401.075011",
"bit_rate": "63153",
"nb_frames": "17274",
"disposition": {
"default": 1,
"dub": 0,
"original": 0,
"comment": 0,
"lyrics": 0,
"karaoke": 0,
"forced": 0,
"hearing_impaired": 0,
"visual_impaired": 0,
"clean_effects": 0,
"attached_pic": 0,
"timed_thumbnails": 0,
"captions": 0,
"descriptions": 0,
"metadata": 0,
"dependent": 0,
"still_image": 0
},
"tags": {
"creation_time": "2021-05-03T18:45:16.000000Z",
"language": "und",
"handler_name": "Core Media Audio",
"vendor_id": "[0][0][0][0]"
}
},
{
"index": 1,
"codec_name": "h264",
"codec_long_name": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",
"profile": "High",
"codec_type": "video",
"codec_tag_string": "avc1",
"codec_tag": "0x31637661",
"width": 1920,
"height": 1080,
"coded_width": 1920,
"coded_height": 1080,
"closed_captions": 0,
"has_b_frames": 1,
"sample_aspect_ratio": "1:1",
"display_aspect_ratio": "16:9",
"pix_fmt": "yuv420p",
"level": 42,
"color_range": "tv",
"color_space": "bt709",
"color_transfer": "bt709",
"color_primaries": "bt709",
"chroma_location": "left",
"refs": 1,
"is_avc": "true",
"nal_length_size": "4",
"r_frame_rate": "60000/1001",
"avg_frame_rate": "14430000/240647",
"time_base": "1/600",
"start_pts": 0,
"start_time": "0.000000",
"duration_ts": 240647,
"duration": "401.078333",
"bit_rate": "15763017",
"bits_per_raw_sample": "8",
"nb_frames": "24050",
"disposition": {
"default": 1,
"dub": 0,
"original": 0,
"comment": 0,
"lyrics": 0,
"karaoke": 0,
"forced": 0,
"hearing_impaired": 0,
"visual_impaired": 0,
"clean_effects": 0,
"attached_pic": 0,
"timed_thumbnails": 0,
"captions": 0,
"descriptions": 0,
"metadata": 0,
"dependent": 0,
"still_image": 0
},
"tags": {
"creation_time": "2021-05-03T18:45:16.000000Z",
"language": "und",
"handler_name": "Core Media Video",
"vendor_id": "[0][0][0][0]",
"encoder": "H.264"
}
}
]
}

Can you think of any reason why this happened?

Edited by: puelo on May 6, 2021 6:43 AM

puelo
posta 3 anni fa530 visualizzazioni
6 Risposte
0

Hello,

MediaConvert will not rotate the video if Rotation is not defined. Are you seeing Rotate = Degree 0 in the JSON file?

    },  
    "VideoSelector": {  
      "ColorSpace": "FOLLOW",  
      "Rotate": "DEGREE_0",  
      "AlphaBehavior": "DISCARD"  
    },  

What would happen if you run the job again when setting Rotation to "No rotation" and "Auto"? Will both output got rotated?

-Sam

AWS
con risposta 3 anni fa
0

Hello,

we don't define any rotation in our job and to my understanding this will default to "No Rotation", right?

Best Regards,
puelo

puelo
con risposta 3 anni fa
0

Hi Puelo,

By default the rotation is disabled, you should see "No Rotation" in the JSON. If you could DM me your account ID, region and job id, I can confirm your setting submitted.

-Sam

AWS
con risposta 3 anni fa
0

Hello,

the JSON does not specify any rotation, but i can see "No Rotation" in the UI display of the details.
Anyways, i've sent you the requested information.

Thanks!

puelo
con risposta 3 anni fa
0

Hi,

Thanks, I confirmed that the job has no Rotation set. And in our MediaConvert log, it shows that the resolution is 1080 x 1920. However, the metadata provided shows the resolution is 1920 x 1080. How did you get the source metadata? Can you use mediainfo [1] to confirm the metadata?

When you said video go rotated, was the JPEG and the HLS segment got rotated or only the JPEG was rotated?

I did a quick test here by capturing a vertical video with iPhone and parse the capture with mediainfo.
The result shows that that the resolution is 1920x1080 with a 90° rotation tag.

Width                                    : 1 920 pixels  
Height                                   : 1 080 pixels  
Display aspect ratio                     : 16:9  
Rotation                                 : 90°  

When I ingested this source into MediaConvert, the log shows the resolution is 1920 x 1080. I cannot reproduce the 1080 x 1920 resolution in the log. I suspect that there might be something wrong with the metadata. Can you raise a support along with the source in order to further troubleshoot on this issue?

[1] https://mediaarea.net/en/MediaInfo

Edited by: samuelAWS on May 11, 2021 7:49 PM

AWS
con risposta 3 anni fa
0

Video sent by the customer was not the original input file and contained different metadata. The video uploaded indeed had a rotation defined in the metadata

puelo
con risposta 3 anni fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande