Hello all,
I'm looking for a way to rotate some of my videos without re-encoding. I know there are a few threads here on this subject but none has answered my needs.
I'm looking to change one of the metadata which might work with DaVinci Resolve.
Exiftool does work - but it creates a copy by design so it's slow when dealing with files of many GB each. Yes, I can ask exiftool to overwrite the original file but it would still need to create a temp file.
ffmpeg doesn't seem to be working.
I was hoping for something which would easily change the rotation "flag" without re-encoding and without copying the file.
Any ideas? Someone was telling me there were able to do that via the "preview" app of a macOS.
Thanks!
+ Reply to Thread
Results 1 to 14 of 14
-
-
Last edited by Sharc; 2nd Jan 2025 at 04:38.
-
Why would you want to change the flag? Is it wrong?
My footage is all rotated because of how my Sony camera is set. I cannot change that unfortunately.
In Resolve I can easily batch rotate everything of course.
HOWEVER, when I generate proxies, Resolve does NOT take the rotation flag into account. So when I rotate assets, the asset shows correctly but the Proxy keeps the original rotation - making proxies unusable.
I contacted Black Magic Design and as usual they told me it's "by design" which is their standard answer when they acknowledge something but they are not allowed to say it.
So I am hoping that maybe rotating the clips beforehand might be taken into account by the proxy generator as well.
PS: This affects the standalone proxy generator - the internal generator DOES take the flag into account but does not run in the background. Also, if you rotate a clip AFTER the proxy was made, Resolve does not take that into account so a new proxy needs to be generated.
Thanks all, I'll test all the suggestions and report back!
update
Avidemux doesn't seem to like the sound track - it's PCM
LosslessCut does work - with Resolve as well! (though it's also complaining about the sound track) But LosslessCut uses ffmpeg, so there must be a way to use ffmpeg directly as well!
I'll explore LosslessCut though, thanks for now!Last edited by tony359; 2nd Jan 2025 at 06:06.
-
Right, I have tested Lossless cut and I think I've hit a stop.
Unfortunately, if I understand right, the software cannot batch export "by design". I can batch load but not batch export.
If I load a single video file and change the rotation, it works 100%.
Now, Losslesscut is using ffmpeg so I selected "last ffmpeg commands" from the menu and discovered that the full ffmpeg command used was like this:
Code:ffmpeg -hide_banner -i "G:\Losslesscut test delete\Videos\2024-09-11 18-01-58 EFFV 3840X2160 29.97fps E10.MP4" -map 0:0 -c:0 copy -map 0:1 -c:1 copy -map_metadata 0 -movflags +faststart -default_mode infer_no_subs -ignore_unknown -metadata:s:v:0 rotate=180 -f mov -y "G:\Losslesscut test delete\Videos\2024-09-11 18-01-58 EFFV 3840X2160 29.97fps E10.mov"
Code:G:\Losslesscut test delete\Videos>ffmpeg -hide_banner -i "G:\Losslesscut test delete\Videos\2024-09-11 18-01-58 EFFV 3840X2160 29.97fps E10.MP4" -map 0:0 -c:0 copy -map 0:1 -c:1 copy -map_metadata 0 -movflags +faststart -default_mode infer_no_subs -ignore_unknown -metadata:s:v:0 rotate=180 -f mov -y "G:\Losslesscut test delete\Videos\2024-09-11 18-01-58 EFFV 3840X2160 29.97fps E10.mov" [mov,mp4,m4a,3gp,3g2,mj2 @ 000002842ecb7e80] st: 0 edit list: 1 Missing key frame while searching for timestamp: 1001 [mov,mp4,m4a,3gp,3g2,mj2 @ 000002842ecb7e80] st: 0 edit list 1 Cannot find an index entry before timestamp: 1001. [aist#0:1/pcm_s16be @ 000002842f69ecc0] Guessed Channel Layout: stereo Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'G:\Losslesscut test delete\Videos\2024-09-11 18-01-58 EFFV 3840X2160 29.97fps E10.MP4': Metadata: major_brand : XAVC minor_version : 16785407 compatible_brands: XAVCmp42iso2 creation_time : 2024-09-11T18:01:58.000000Z Duration: 00:08:30.51, start: 0.000000, bitrate: 59091 kb/s Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709/bt709/iec61966-2-4, progressive), 3840x2160 [SAR 1:1 DAR 16:9], 56297 kb/s, 29.97 fps, 29.97 tbr, 30k tbn (default) Metadata: creation_time : 2024-09-11T18:01:58.000000Z handler_name : Video Media Handler vendor_id : [0][0][0][0] encoder : AVC Coding Stream #0:1[0x2](und): Audio: pcm_s16be (twos / 0x736F7774), 48000 Hz, stereo, s16, 1536 kb/s (default) Metadata: creation_time : 2024-09-11T18:01:58.000000Z handler_name : Sound Media Handler vendor_id : [0][0][0][0] Stream #0:2[0x3](und): Data: none (rtmd / 0x646D7472), 1227 kb/s (default) Metadata: creation_time : 2024-09-11T18:01:58.000000Z handler_name : Timed Metadata Media Handler timecode : 14:31:48:28 Stream mapping: Stream #0:0 -> #0:0 (copy) Stream #0:1 -> #0:1 (copy) Output #0, mov, to 'G:\Losslesscut test delete\Videos\2024-09-11 18-01-58 EFFV 3840X2160 29.97fps E10.mov': Metadata: major_brand : XAVC minor_version : 16785407 compatible_brands: XAVCmp42iso2 creation_time : 2024-09-11T18:01:58.000000Z encoder : Lavf61.7.100 Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709/bt709/iec61966-2-4, progressive), 3840x2160 [SAR 1:1 DAR 16:9], q=2-31, 56297 kb/s, 29.97 fps, 29.97 tbr, 30k tbn (default) Metadata: creation_time : 2024-09-11T18:01:58.000000Z handler_name : Video Media Handler vendor_id : [0][0][0][0] encoder : AVC Coding rotate : 180 Stream #0:1(und): Audio: pcm_s16be (twos / 0x736F7774), 48000 Hz, stereo, s16, 1536 kb/s (default) Metadata: creation_time : 2024-09-11T18:01:58.000000Z handler_name : Sound Media Handler vendor_id : [0][0][0][0] Press [q] to stop, [?] for help [mov @ 000002842f477380] Starting second pass: moving the moov atom to the beginning of the file [out#0/mov @ 000002842f477280] video:3508364KiB audio:95721KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: 0.011651% frame=15300 fps=960 q=-1.0 Lsize= 3604504KiB time=00:08:30.47 bitrate=57844.2kbits/s speed= 32x G:\Losslesscut test delete\Videos>
What am I missing here? I tested the rotated file in Resolve and it works - so I am getting close! But I need a batch process unfortunately. I'd be happy to create my own command prompt batch file but first I need to find out what the command is!
Ah, ffmpeg still seems to not like the sound track of my Sony E10 files - I have to export in MOV for that reason?
Thanks! -
You can use clever FFmpeg-GUI.
Load your video, click main page, click various, click rotate.
Set the degrees, click rotate. Done.
(The file is copied, there is no way around it).
Works with mp4 and mov.
It changes the metadata only, so it's fast and there is no quality loss.
Be aware, not all player can handle this. -
Thanks! Unfortunately Resolve is one of those "players" - the file does not appear rotated using Clever ffmpeg-GUI.
There is something Losslesscut does which works for me. But I cannot find what. -
have you tried contacting the developer of Losslesscut:
losslesscut issues
-
”Exiftool does work - but it creates a copy by design so it's slow when dealing with files of many GB each.“
I have used it to rotate some videos. If you use a fast ssd maybe still way to go. -
the SSD is fast but I'm rotating videos for my youtube channel - hence I keep making clips and they tend to be big. I was hoping to find a faster way. After all this is to allow Resolve to generate Proxies but I can work without them.
If I don't find an alternative, by all means I'll consider exiftool.
Similar Threads
-
how do I rotate video with mkvmerge?
By codemaster in forum Video ConversionReplies: 3Last Post: 7th Jun 2024, 06:25 -
MPC-BE Rotate - but how to make the change stick?
By vhwul62 in forum Newbie / General discussionsReplies: 3Last Post: 5th Apr 2024, 22:56 -
Looking for a video converter that keeps original metadata
By adrian44 in forum Video ConversionReplies: 2Last Post: 24th Jan 2024, 15:28 -
How to rotate VR 360 video with GPU
By SoftwareConductor in forum Video ConversionReplies: 8Last Post: 13th Jan 2023, 11:56 -
Still frames to video : What happens to metadata?
By gmontag451 in forum Video ConversionReplies: 0Last Post: 10th Jan 2022, 16:35