Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Encoded and rotated IOS video not played in web browser player and amazon player


ffmpeg -i vertical.mov -vf "rotate=PI/2" -r 30 -sameq -acodec copy test_mp4.mp4"

This is the encode i used, rotated video played in desktop media player but not in web browser. Please help. Thanks.

17 Community Answers

MisterNeutron

User  
0 rated :

Please give us a link to your page, so that we can examine the video.

Ethan Feldman

JW Player Support Agent  
0 rated :

Please provide a link.

fspprabu

User  
0 rated :

HI This is the link

http://184.106.215.225/homes/uservideo

fspprabu

User  
0 rated :

The video was MOV and it was encoded to mp4 and rotated using FFMPEG

MisterNeutron

User  
0 rated :

The encoding is wrong - it won't play at all in Firefox, for example.

Run the original MOV video through Handbrake with the default options, plus check "Web optimized." http://handbrake.fr/

If you still have rotation problems, see my post here: http://stackoverflow.com/questions/23951944/mediaelement-js-and-jw-player-iphone-portrait-video-showing-sideways/23955621#23955621

Todd

JW Player Support Agent  
0 rated :

Were you able to re-encode your video?

fspprabu

User  
0 rated :

I encoded with handbrake software and the MOV video was converted and rotated to 90 degree also working fine then I got the command from encode log then tested it with linux terminal, it played but not rotated. Also changed the rotate value from 1 to 10 but no changes it only flippped to 180 degree only.

Encoded command from encode log:
HandBrakeCLI -i "vertical.mov" -t 1 --angle 1 -c 1 -o "rot_wt_hb.mp4" -f mp4 -O -w 480 --loose-anamorphic --modulus 2 -e x264 -q 20 --vfr -a 1 -E faac -6 dpl2 -R Auto -B 160 -D 0 --gain 0 --audio-fallback ffac3 --x264-preset=veryfast --x264-profile=main -x , --rotate=4 --verbose=1

Rotated video with handnrake link: http://184.106.215.225/homes/uservideo2

fspprabu

User  
0 rated :

The output file name is rotate_with_handbrake4.

This following is the command:

HandBrakeCLI -i "vertical.mov" -t 1 --angle 1 -c 1 -o "rotate_with_handbrake4.mp4" -f mp4 -O -w 480 --loose-anamorphic --modulus 2 -e x264 -q 20 --vfr -a 1 -E faac -6 dpl2 -R Auto -B 160 -D 0 --gain 0 --audio-fallback ffac3 --x264-preset=veryfast --x264-profile=main -x , --rotate=4 --verbose=1

Todd

JW Player Support Agent  
0 rated :

Sorry for the delayed response. I tried your command and it properly rotated the video. I noticed the video at http://184.106.215.225/homes/uservideo2 is an MKV file but you will have to add an additional line to your jwplayer().setup():

type: ‘mp4’

You can see the test I made at http://qa.jwplayer.com/~todd/test-fspprabu.html

Hope this helps,
Todd

fspprabu

User  
0 rated :

Hi Todd,
Thanks for your reply .

I tested with mkv format now i put mp4 format video( encoded using HandBrake video "rotate_with_handbrake4.mp4").

I followed the link :
http://stackoverflow.com/questions/23951944/mediaelement-js-and-jw-player-iphone-portrait-video-showing-sideways/23955621#23955621

From this link,
Installed handbrake software in local system and encoded the video, the video was converted and rotated to 90 degree. Also working fine in JWplayer.
Then I got the command from encode log then tested it with Server terminal, it played but not rotated. Based on research I changed the rotate value from 1 to 10 but no changes video flipped to 180 degree only.

Note:
The handBrake sofware convert the video in windows OS but not in Linux OS.Also the converting format and options are also changed in Linux.


Thanks.

Todd

JW Player Support Agent  
0 rated :

I’m not familiar with the limitations of Handbrake on Windows or Linux, but the command line you included previous properly rotated the video for me:

HandBrakeCLI -i “vertical.mov” -t 1 —angle 1 -c 1 -o “rotate_with_handbrake4.mp4” -f mp4 -O -w 480 —loose-anamorphic —modulus 2 -e x264 -q 20 —vfr -a 1 -E faac -6 dpl2 -R Auto -B 160 -D 0 —gain 0 —audio-fallback ffac3 —x264-preset=veryfast —x264-profile=main -x , —rotate=4 —verbose=1

fspprabu

User  
0 rated :

Could you please explain the method how you convert the video using this command?
using this command in shell command or anything?
It will help me for reference.

Thanks :)

Todd

JW Player Support Agent  
0 rated :

I am not sure what you are asking. I used the command line code you provided and I was able to encode a video as an MP4 and rotate it.

fspprabu

User  
0 rated :

Where did you put the command to rotate the video?
what tools you used to execute this command?
Thanks :)

Todd

JW Player Support Agent  
0 rated :

I had to download the HandbrakeCLI tools from http://handbrake.fr/downloads2.php
I have a Mac, so I used Terminal.app to run the command you provided from the command line.
Note that I changed the name of the source video path to point to my test video. I also changed the name of the output video.

Hope this helps,
Todd

fspprabu

User  
0 rated :

Yes Todd, Thanks.

Could you please try in LINUX?

Because we are using linux terminal to encode the video.

Thanks :)

Todd

JW Player Support Agent  
0 rated :

Here’s the ffmpeg command we used in Linux to properly rotate your video:

ffmpeg -i rot_wt_hb_rotated.mp4 -strict experimental -vf “transpose=1” test.mp4

Hope this helps,
Todd

This question has received the maximum number of answers.