{"action":"created","issue":{"url":"https://api.github.com/repos/kaltura/nginx-vod-module/issues/486","repository_url":"https://api.github.com/repos/kaltura/nginx-vod-module","labels_url":"https://api.github.com/repos/kaltura/nginx-vod-module/issues/486/labels{/name}","comments_url":"https://api.github.com/repos/kaltura/nginx-vod-module/issues/486/comments","events_url":"https://api.github.com/repos/kaltura/nginx-vod-module/issues/486/events","html_url":"https://github.com/kaltura/nginx-vod-module/issues/486","id":193851349,"number":486,"title":"Sideways orientation of videos recorded with iPhone in portrait mode","user":{"login":"quest2nest","id":24417446,"avatar_url":"https://avatars.githubusercontent.com/u/24417446?v=3","gravatar_id":"","url":"https://api.github.com/users/quest2nest","html_url":"https://github.com/quest2nest","followers_url":"https://api.github.com/users/quest2nest/followers","following_url":"https://api.github.com/users/quest2nest/following{/other_user}","gists_url":"https://api.github.com/users/quest2nest/gists{/gist_id}","starred_url":"https://api.github.com/users/quest2nest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quest2nest/subscriptions","organizations_url":"https://api.github.com/users/quest2nest/orgs","repos_url":"https://api.github.com/users/quest2nest/repos","events_url":"https://api.github.com/users/quest2nest/events{/privacy}","received_events_url":"https://api.github.com/users/quest2nest/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-12-06T18:41:06Z","updated_at":"2016-12-06T22:56:11Z","closed_at":null,"body":"If I stream (using nginx-vod-module) a video recorded with iPhone in portrait mode, the resulting HLS stream displays sideways. The .MOV (Quicktime) video was uploaded to the server as is, without conversion of any kind.\r\n\r\nWhat would be the best way to handle such videos so that the resulting HLS stream is in the correct orientation? It looks to me the options are:\r\n\r\n- preprocessing on iPhone before uploading to the server\r\n- processing on the server (using ffmpeg) before streaming\r\n- providing a configuration option to nginx-vod-module that rotates the video (not sure such an option exists)\r\n- hacking nginx-vod-module's ffmpeg code and recompiling\r\n\r\nAlso wanted to thank the authors of this module; you guys are awesome!"},"comment":{"url":"https://api.github.com/repos/kaltura/nginx-vod-module/issues/comments/265300114","html_url":"https://github.com/kaltura/nginx-vod-module/issues/486#issuecomment-265300114","issue_url":"https://api.github.com/repos/kaltura/nginx-vod-module/issues/486","id":265300114,"user":{"login":"joaoserra","id":265852,"avatar_url":"https://avatars.githubusercontent.com/u/265852?v=3","gravatar_id":"","url":"https://api.github.com/users/joaoserra","html_url":"https://github.com/joaoserra","followers_url":"https://api.github.com/users/joaoserra/followers","following_url":"https://api.github.com/users/joaoserra/following{/other_user}","gists_url":"https://api.github.com/users/joaoserra/gists{/gist_id}","starred_url":"https://api.github.com/users/joaoserra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joaoserra/subscriptions","organizations_url":"https://api.github.com/users/joaoserra/orgs","repos_url":"https://api.github.com/users/joaoserra/repos","events_url":"https://api.github.com/users/joaoserra/events{/privacy}","received_events_url":"https://api.github.com/users/joaoserra/received_events","type":"User","site_admin":false},"created_at":"2016-12-06T22:56:11Z","updated_at":"2016-12-06T22:56:11Z","body":"iPhones don't rotate the video in portrait mode. They record at wide resolution and insert an 90' rotation matrix in the the tkhd MP4/MOV atom.\r\n\r\nSince HLS is MPEG-TS based, and as far as know TS doesn't support rotation matrices, that information is simply lost during the transmux.\r\n\r\nOne possible workaround is to insert a NAL containing a Display Orientation SEI (SEI Type 47) in the beginning of the h.264 bitstream. But since the Display Orientation SEI was only introduced in the 2013 revision of the h.264 standard, the support can be limited. (But, at least in a browser environment with MSE support, it should be possible to read the flag and act accordingly with a little of effort) "}}
{"actor":{"display_login":"joaoserra"}}