Log in

View Full Version : Flip mp4


dukey
21st May 2014, 00:18
Recorded some (mp4) videos with my phone, unfortunately when copied to the pc they are upside down. Anyway to flip these vertically without re-encoding. Maybe negative height in the container or something ?

HWK
21st May 2014, 03:52
Recorded some (mp4) videos with my phone, unfortunately when copied to the pc they are upside down. Anyway to flip these vertically without re-encoding. Maybe negative height in the container or something ?

Which player you used to playback. Download media info program and post detailed report of file in question.

dukey
21st May 2014, 09:26
General
Complete name : WP_20140520_009.mp4
Format : MPEG-4
Format profile : Base Media / Version 2
Codec ID : mp42
File size : 30.1 MiB
Duration : 23s 840ms
Overall bit rate : 10.6 Mbps

Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : Main@L3.1
Format settings, CABAC : Yes
Format settings, ReFrames : 1 frame
Format settings, GOP : M=1, N=30
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 23s 840ms
Source duration : 23s 846ms
Bit rate mode : Variable
Bit rate : 10.5 Mbps
Width : 1 280 pixels
Height : 720 pixels
Display aspect ratio : 16:9
Rotation : 180°
Frame rate mode : Variable
Frame rate : 29.970 fps
Minimum frame rate : 19.569 fps
Maximum frame rate : 30.303 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.380
Stream size : 29.8 MiB (99%)
Source stream size : 29.8 MiB (99%)
mdhd_Duration : 23843

sef
21st May 2014, 18:01
..copied to the pc they are upside down..
You use iPhone..? I'll repeat question.. Which player you used to playback..
..without re-encoding..
Rotate video without re-encoding - No..
P.S. Try to use intrernet searching..

Asmodian
21st May 2014, 18:50
It should be possible, depending on your video player.

I know there is a rotation tag for MP4 but I understand most players do not read or respect it. I also have no idea how to set it, it is probably possible with MP4Box but I have never found good documentation or guides for how to do it. I think this feature is suffering from a chicken and egg problem, no one wants to implement in muxing because no players support it and no players want to support it because no one can create files using it.

sef
21st May 2014, 19:33
@dukey
Try three way:
1. If You use iPhone: use QuickTime player (must rotate frame automaticly)..
2. As variant, try to this link: http://dev.mpc-next.ru/index.php?action=dlattach;topic=884.0;attach=2726 (must rotate frame automaticly)..
Or..
3. .."Here are the actual commands you can use. If you want to keep the actual video bitstream and remove the rotation flag, you only need to remove the metadata for the first video stream v:0, and copy the video and audio bitstreams (-c copy):
ffmpeg -i input.mp4 -c copy -metadata:s:v:0 rotate=0 output.mp4".. (superuser.com)..

dukey
21st May 2014, 23:34
2. As variant, try to this link: http://dev.mpc-next.ru/index.php?action=dlattach;topic=884.0;attach=2726 (must rotate frame automaticly)..
This works well, video appears the right way up, although they seem to be flipped horizontally (ie mirrored). I was using an version of mpc-hc before, and they all appear upside down in that.

I'll give 3 a go later

sef
22nd May 2014, 21:13
..video appears the right way up, although they seem to be flipped horizontally (ie mirrored)..
Try to update the player, from the http://dev.mpc-next.ru, maybe, this issue was solved..
BTW.. http://forum.doom9.org/showthread.php?t=165890 (you may ask there)..