VideoHelp Forum
+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 41
Thread
  1. 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
    Image Attached Thumbnails Click image for larger version

Name:	flipped.png
Views:	21
Size:	81.2 KB
ID:	82357  

    Last edited by twinax; 21st Sep 2024 at 00:31.
    Quote Quote  
  2. 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"
    Quote Quote  
  3. 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
    Or this one does a horizontal flip instead:
    Code:
    ffmpeg -i  input.mp4 -vf "hflip" output.mp4
    I guess even both could be done if needed.

    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
    Quote Quote  
  4. Originally Posted by cholla View Post
    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
    With clever FFmpeg-GUI you can also mux first to mp4, then load the new mp4, main, various, rotate, rotate 180.
    This does the command posted above.
    Quote Quote  
  5. @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
    Quote Quote  
  6. 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.
    Quote Quote  
  7. Member
    Join Date
    May 2005
    Location
    Australia-PAL Land
    Search Comp PM
    @Twinax, could you attach a short video for us to play with? I may have a GUI option.
    Quote Quote  
  8. Originally Posted by Alwyn View Post
    @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!
    Quote Quote  
  9. Member
    Join Date
    May 2005
    Location
    Australia-PAL Land
    Search Comp PM
    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.
    Quote Quote  
  10. Originally Posted by ProWo View Post
    What video codec?
    It works with h264, hevc and mpeg2 in mp4 and mov container.
    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.
    Quote Quote  
  11. Originally Posted by twinax View Post
    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.
    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).
    Quote Quote  
  12. Originally Posted by twinax View Post
    Whenever that day comes - I am posting the result here
    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".

    Originally Posted by ProWo View Post
    With clever FFmpeg-GUI you can also mux first to mp4, then load the new mp4, main, various, rotate, rotate 180.
    This does the command posted above.
    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".

    Originally Posted by ProWo View Post
    It works with h264, hevc and mpeg2 in mp4 and mov container.
    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.
    Image Attached Files
    Quote Quote  
  13. @cholla

    have taken the file sweet_emotion_0_0_x264 (avc)_muxed.mp4.
    Main, various, rotate, rotate 90°.

    Result as aspected.
    Image
    [Attachment 82398 - Click to enlarge]

    Image
    [Attachment 82399 - Click to enlarge]


    played with VLC, info from mediainfo.
    Quote Quote  
  14. @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.
    Quote Quote  
  15. Originally Posted by ProWo View Post
    have taken the file sweet_emotion_0_0_x264 (avc)_muxed.mp4.
    Main, various, rotate, rotate 90°.

    Result as aspected.
    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
    Quote Quote  
  16. Member
    Join Date
    Apr 2007
    Location
    Australia
    Search Comp PM
    ffmpeg.exe -display_rotation 180 -i "input.mp4" -c copy "output.mp4"
    Quote Quote  
  17. 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.
    Quote Quote  
  18. Originally Posted by pcspeak View Post
    ffmpeg.exe -display_rotation 180 -i "input.mp4" -c copy "output.mp4"
    Thanks. I just verified that it works. I swear I tried it earlier but maybe I had the rotation option after loading the input.
    Quote Quote  
  19. Originally Posted by Alwyn View Post
    @Twinax, could you attach a short video for us to play with? I may have a GUI option.
    All right, attaching one small file to play with.
    Quote Quote  
  20. @ 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.
    Quote Quote  
  21. There's nothing wrong with the clip. Maybe your software can't handle HEVC, or variable frame rate, or 4K.
    Quote Quote  
  22. Member
    Join Date
    Apr 2007
    Location
    Australia
    Search Comp PM
    Originally Posted by jagabo View Post
    There's nothing wrong with the clip.
    +1
    (MPC-HC, Windows Media Player & Windows Movie Maker all play the video)
    Quote Quote  
  23. Member
    Join Date
    May 2005
    Location
    Australia-PAL Land
    Search Comp PM
    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
    Quote Quote  
  24. Member
    Join Date
    May 2005
    Location
    Australia-PAL Land
    Search Comp PM
    Did some uploads to YT:

    Image
    [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.
    Quote Quote  
  25. Member
    Join Date
    May 2005
    Location
    Australia-PAL Land
    Search Comp PM
    Of course, you could try trimming in AVIDemux or other "proper" editor; VLC is primarily just a player.
    Quote Quote  
  26. 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"
    Handbrake: Crashes

    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.
    Quote Quote  
  27. Originally Posted by Alwyn View Post
    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 the 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.
    I have no idea how to do this, sorry.
    Quote Quote  
  28. Member
    Join Date
    May 2005
    Location
    Australia-PAL Land
    Search Comp PM
    I have no idea how to do this, sorry.
    OK, try the last line of my quote above, using AVIDemux. My guide will tell you exactly what to do (pretty straightforward). Make sure you use an original file, not one that has been put through VLC.

    Or attach an original file here (or on Google Drive). Max attachment here is 500mb.
    Quote Quote  
  29. Originally Posted by cholla View Post
    I was able to use VLC Convert/Save but the saved file was much smaller & not HEVC but AVC.
    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.

    Originally Posted by cholla View Post
    Even when I selected "Keep original video track."

    AviDemux using Copy almost identical results to VLC.
    "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.
    Quote Quote  
  30. Originally Posted by jagabo View Post
    Originally Posted by cholla View Post
    I was able to use VLC Convert/Save but the saved file was much smaller & not HEVC but AVC.
    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.
    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.

    Originally Posted by jagabo View Post
    Originally Posted by cholla View Post
    Even when I selected "Keep original video track."

    AviDemux using Copy almost identical results to VLC.
    "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.
    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.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!