0

I am developing a website that will display videos recorded on an iPhone/iPad but am having issues with the playback of the video if is it recorded anything other than landscape (home button on the right), in that the video plays rotated 90/180/270 degrees depending on how the phone was held when the video was recorded.

I found the below question which identifies how to tell what orientation the video was recorded in using the transformation matrix properties, and it alluded to the fact that the videos could be re-encoded on the webserver to play in the correct orientation but did not explain how this could be done.

How to detect (iPhone SDK) if a video file was recorded in portrait orientation, or landscape.

Any help with this would be greatly appreciated, my webserver is linux and website is PHP.

Community
  • 1
  • 1
guytz72
  • 419
  • 2
  • 14

1 Answers1

0

Check out FFmpeg.

That's the de facto industry standard for video encoding, and fortunately is open source. You'll most likely need to have the x264 codec also to encode h264 mp4 files. Have a look around StackOverflow and you'll see many questions related to using FFmpeg, including from PHP.

Community
  • 1
  • 1
Stu Thompson
  • 38,370
  • 19
  • 110
  • 156