So,long story short - trimmed my go pro video with VLC and when played on PC video is good.
When uploading to YT it ends up flipped.
I can only assume it has something to do with the camera being flipped when original was recorded, at the same time go pro has auto-rotate and
this does not affect video at all in the end.
Tried converting into different formats again, with VLC - to no avail.
I am not that deep into editing software but it would seem there is no way to edit meta data, I was able to identify the probable cause with this app MediaInfo, where I found the ROTATE line with 180 next to it as seen in my attachment.
edit: adding yt link for more clarity
Any help would be greatly appreciated
Cheers
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays!
+ Reply to Thread
Results 1 to 30 of 41
Thread
-
Last edited by twinax; 21st Sep 2024 at 00:31.
-
You can remux it into a mp4 container and then rotate it (metadata only, no recoding):
Code:FFmpeg.exe -display_rotation 180 -i "Your_hevc.mp4" -c copy "Your_hevc_rotated_180d.mp4"
-
Prowo's code is faster than this one with no recoding as he posted.
It does the same as this one but this one does recode (not a major recode):
Code:ffmpeg -i input.mp4 -vf "vflip" output.mp4
Code:ffmpeg -i input.mp4 -vf "hflip" output.mp4
Prowo's Clever can also do it but does recode also.
You can not just select Various & Rotation.
Choose Main\Video Stream\KeepSize\Various\Rotate\Flip Select the option you want.
Select the encode options you want.
Then Encode -
-
@Prowo,
I was testing with an .mp4 as I did not have a HEVC.
I should not need to remux this .mp4
I'm using v3.3.0 on a 32-bit Windows 7.
I just tested it again & no rotation.
This same .mp4 did rotate when I made the settings I posted in #3 -
What video codec?
It works with h264, hevc and mpeg2 in mp4 and mov container.Last edited by ProWo; 20th Sep 2024 at 15:51.
-
@Twinax, could you attach a short video for us to play with? I may have a GUI option.
-
All the flipped files are over 500MB and it would not let me up them, try to download the video off my link, I have updated it with a smaller size vid
Also thanks for all the replies, the codes you posted I have no idea how and where to execute, I assume console?
in the meantime I was able to find a way via VLC's convert feature to enable a vert flip filter and transform the files into
a result which was flipped when played on PC, but on YT it would upload great.
When I get the time I will do a test- I will record a new video with the camera flipped, trim with VLC and see if it does it again. Whenever that day comes - I am posting the result here, cause this was so peculiar that it must be documented. I did trawl through a lot of search results on Gogale and nothing even close to matching my case.
Have a good day, and a great weekend all! -
We'll need the original video. YT completely recodes video so the original metadata will be lost.
I was going to suggest AVIDemux, which can also be used create do a lossless snippet. My tute for snippets and rotating without recoding is here. Note that sometimes, the rotating doesn't work without a full recode. You may be lucky though and get a lossless recode, right way up.
You can keep your snippet to around 5 seconds. That's all that is needed. -
OK this video is avc1 Advanced Video Codec.
It is just a video I use for testing.
I can convert it to another format & test it.
If you want to upload the whole video you can upload it to Google Drive.
Just remember to select for everyone when the Sharing pop up comes up.
Then just Copy Link.
Or create the snippet as Alwyn suggested & post here. -
Note that a vertical flip is not the same as a 180 degree rotation -- you'll be left with a mirror image. A vertical flip plus a horizontal flip is the same as a 180 degree rotation.
It looks to me like your video's metadata is already flagged for a 180 degree rotation. The problem is that Youtube is ignoring the flag. If that's the case you need to rotate the video 180 degrees and re-encode. You can use a program like AviDemux to do that (the program does a lot more than the name implies). -
I don't feel I'm hijacking this topic because twinax is finished with it for a while.
@ProWo,
Your Clever topic might be a better place but I will post here.
Unless you want it in your Clever topic.
This is the test file as is "sweet_emotion.mp4".
The "sweet_emotion_muxed.mp4" is the file I test with muxed with these instructions.
The "sweet_emotion_muxed_rotate_.mp4"(I'm not posting this because it is the same in MediaInfo as "sweet_emotion_muxed.mp4".
The "sweet_emotion_0_0_x264 (avc)_muxed.mp4" is the result of encoding the file I test with using Encode\Video stream & Encoed\Audio stream then Multiplex.
The "sweet_emotion_0_0_x264 (avc)_muxed_rotate_1.mp4" has the x264 core but does not rotate. -
@cholla
have taken the file sweet_emotion_0_0_x264 (avc)_muxed.mp4.
Main, various, rotate, rotate 90°.
Result as aspected.
[Attachment 82398 - Click to enlarge]
[Attachment 82399 - Click to enlarge]
played with VLC, info from mediainfo. -
@ProWo,
I figured out what I was doing incorrectly.
I was clearing out the 90 with backspace & putting in the 180 by typing it.
I did not test the up/down arrows & thought they would be one number at a time. -
Can you give the ffmpeg command line that will do that (without re-encoding)? I tried with many variations and could not get ffmpeg to add the rotate flag to an mp4 file (it works fine when outputting a an mkv file). I tried "-c copy -map_metadata 0 -metadata:s:v rotate=180", "-c copy -metadata:s:v:0 rotate=180", both. Only by using a hex editor was I able to patch an mp4 with a successful rotation. About half way down this page:
https://superuser.com/questions/1307158/change-rotation-flag-in-mp4-video-without-losing-metadata -
ProWo posted the 180 rotation for an .mp4 in post #2 .
I'm on my laptop right now & not prepered to test an .mp4 .
I believ using 90 instead of 180 should work.
I will give it a test later. -
-
@ twinax,
Every video software I tried on the sample file said it is corrupt.
Then wanted to close or did just a 1kb file.
I do not know how you did the clip but something is wrong with it. -
There's nothing wrong with the clip. Maybe your software can't handle HEVC, or variable frame rate, or 4K.
-
+1
(MPC-HC, Windows Media Player & Windows Movie Maker all play the video) -
Well, there's obviously something wrong with it because YT won't process it properly.
It plays OK here in VLC but in these:
-VideoRedo, it displays right side up but crashes on Save,
-VDub 2, Magix NLE it's upside down.
-AVIDemux displays it upside down and crashes after a couple of seconds of export when I tried to rotate it.
-Running the "Rotate" FFMPEG code results in it playing right side up, which indicates to me that FFMPEG thinks the original is upside down.
@Twinax
If you're into FFMPEG, run your file through that script that ProWo gave in post #2
or try to open the original file in AVIDemux and use my procedure to rotate it.Last edited by Alwyn; 26th Sep 2024 at 01:10. Reason: Grammar
-
Did some uploads to YT:
[Attachment 82436 - Click to enlarge]
FFMPEG (no recoding) OK
Handbrake (recoding) OK
AVIDemux (no recoding) produced a possibly corrupted file that is still being processed by YT. -
I was able to use VLC Convert/Save but the saved file was much smaller & not HEVC but AVC.
Even when I selected "Keep original video track."
AviDemux using Copy almost identical results to VLC.
FFMPEG: I get this error.Error submitting video frame to the encoder"
MKVtoolnix-gui will copy the .mp4 almost as is but using the resulting .mkv does not work any better.
All other video conversion programs failed.
I do believe it is partially HEVC or h265 with Windows 7 & 32-bit being the cause. -
I have no idea how to do this, sorry.
Or attach an original file here (or on Google Drive). Max attachment here is 500mb. -
If you want HEVC you have to specify that in the settings. If you want a larger file you specify a higher bitrate or lower RF value.
"Copy" simply copies the stream from the input to the output. So you expect the file to be about the same size and exactly the same quality. It's like taking a cake out of one box and putting it in another. It's still the same cake. -
There is no HEVC setting in VLC.There is a H-265.The max bitrate for it is 32768kbt/s.No "lower RF" setting.
The input.mp4 the bitrate shows in MediaInfo as 108Mb/s so I can not match that in VLC.
The result of this conversion is a 53KB file that is audio only.The video is set to H-265 but no video is output.
I was close to uptodate with VLC but I installed the newest update today & the same results.
I understand this but other settings caused the programs to fail or crash.
I believe it is a Windows problem at least partially & Windows 7 does not do HEVC very well.
Similar Threads
-
Trim background from a video with moving camera
By Random1235 in forum Newbie / General discussionsReplies: 1Last Post: 5th Dec 2021, 08:50 -
Videos Being Flipped
By Archvirus in forum Authoring (DVD)Replies: 1Last Post: 29th Sep 2021, 17:16 -
Software that detects um/ah/err in video and auto-trim?
By savvyguy in forum Newbie / General discussionsReplies: 1Last Post: 15th Sep 2021, 20:47 -
How to trim video on Youtube Editor when video stream is shorter than audio
By miguelmorin in forum EditingReplies: 8Last Post: 15th Mar 2021, 07:23 -
Horizontally flipped video from phones ... WHY ?
By d4005 in forum Newbie / General discussionsReplies: 10Last Post: 29th Apr 2020, 01:35