Hi, I have a video which is flaged rotated by 90 °, which is wrong. How can I delete this flag, preferably directly in the existing file? Here is the data: $ ffplay 20200205_161649.mp4 ffplay version 3.4.6-0ubuntu0.18.04.1 Copyright (c) 2003-2019 the FFmpeg developers built with gcc 7 (Ubuntu 7.3.0-16ubuntu3) configuration: --prefix=/usr --extra-version=0ubuntu0.18.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared libavutil 55. 78.100 / 55. 78.100 libavcodec 57.107.100 / 57.107.100 libavformat 57. 83.100 / 57. 83.100 libavdevice 57. 10.100 / 57. 10.100 libavfilter 6.107.100 / 6.107.100 libavresample 3. 7. 0 / 3. 7. 0 libswscale 4. 8.100 / 4. 8.100 libswresample 2. 9.100 / 2. 9.100 libpostproc 54. 7.100 / 54. 7.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '20200205_161649.mp4':0/0 Metadata: major_brand : mp42 minor_version : 0 compatible_brands: isommp42 creation_time : 2020-02-05T19:22:17.000000Z com.android.version: 8.0.0 Duration: 00:04:08.84, start: 0.000000, bitrate: 17264 kb/s Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080, 17003 kb/s, SAR 1:1 DAR 16:9, 30 fps, 30 tbr, 90k tbn, 180k tbc (default) Metadata: rotate : 90 creation_time : 2020-02-05T19:22:17.000000Z handler_name : VideoHandle Side data: displaymatrix: rotation of -90.00 degrees Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 256 kb/s (default) Metadata: creation_time : 2020-02-05T19:22:17.000000Z handler_name : SoundHandle 5.16 A-V: -0.036 fd= 6 aq= 59KB vq= 2146KB sq= 0B f=0/0 Thanks for a short advice, -Ulf -- Von meinem Seibert gesendet
Have you tried this? https://stackoverflow.com/questions/15335073/can-i-set-rotation-field-for-a-... Em seg., 24 de fev. de 2020 às 18:41, Ulf Zibis <Ulf.Zibis@gmx.de> escreveu:
Hi,
I have a video which is flaged rotated by 90 °, which is wrong. How can I delete this flag, preferably directly in the existing file?
Here is the data: $ ffplay 20200205_161649.mp4 ffplay version 3.4.6-0ubuntu0.18.04.1 Copyright (c) 2003-2019 the FFmpeg developers built with gcc 7 (Ubuntu 7.3.0-16ubuntu3) configuration: --prefix=/usr --extra-version=0ubuntu0.18.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared libavutil 55. 78.100 / 55. 78.100 libavcodec 57.107.100 / 57.107.100 libavformat 57. 83.100 / 57. 83.100 libavdevice 57. 10.100 / 57. 10.100 libavfilter 6.107.100 / 6.107.100 libavresample 3. 7. 0 / 3. 7. 0 libswscale 4. 8.100 / 4. 8.100 libswresample 2. 9.100 / 2. 9.100 libpostproc 54. 7.100 / 54. 7.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '20200205_161649.mp4':0/0 Metadata: major_brand : mp42 minor_version : 0 compatible_brands: isommp42 creation_time : 2020-02-05T19:22:17.000000Z com.android.version: 8.0.0 Duration: 00:04:08.84, start: 0.000000, bitrate: 17264 kb/s Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080, 17003 kb/s, SAR 1:1 DAR 16:9, 30 fps, 30 tbr, 90k tbn, 180k tbc (default) Metadata: rotate : 90 creation_time : 2020-02-05T19:22:17.000000Z handler_name : VideoHandle Side data: displaymatrix: rotation of -90.00 degrees Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 256 kb/s (default) Metadata: creation_time : 2020-02-05T19:22:17.000000Z handler_name : SoundHandle 5.16 A-V: -0.036 fd= 6 aq= 59KB vq= 2146KB sq= 0B f=0/0
Thanks for a short advice, -Ulf
-- Von meinem Seibert gesendet
_______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user
To unsubscribe, visit link above, or email ffmpeg-user-request@ffmpeg.org with subject "unsubscribe".
-- _______________________________________________________ Christian David Moura de Freitas NOC - Viva Telecom (AS264564) Técnico em tecnologia na informação (Desenvolvimento Web e Redes de computadores) Graduando Ciência da Computação pela UERN
Thanks, this helped. -Ulf Am 24.02.20 um 23:01 schrieb Christian David:
Have you tried this?
https://stackoverflow.com/questions/15335073/can-i-set-rotation-field-for-a-...
Em seg., 24 de fev. de 2020 às 18:41, Ulf Zibis <Ulf.Zibis@gmx.de> escreveu:
Hi all, unfortunately I now see, that there is a problem with that. Some other tags were completely removed, e.g. creation time, geo tags, etc What must I do to preserve all tags? -Ulf Am 25.02.20 um 01:55 schrieb Ulf Zibis:
Thanks, this helped.
-Ulf
Am 24.02.20 um 23:01 schrieb Christian David:
Have you tried this?
https://stackoverflow.com/questions/15335073/can-i-set-rotation-field-for-a-...
Em seg., 24 de fev. de 2020 às 18:41, Ulf Zibis <Ulf.Zibis@gmx.de> escreveu:
_______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user
To unsubscribe, visit link above, or email ffmpeg-user-request@ffmpeg.org with subject "unsubscribe".
On 2020-02-27T13:23:02+0100, Ulf Zibis <Ulf.Zibis@gmx.de> wrote:
unfortunately I now see, that there is a problem with that. Some other tags were completely removed, e.g. creation time, geo tags, etc
What must I do to preserve all tags? I believe the -map_metadata option is what you're looking for.
ffmpeg -i <input> -map_metadata 0 -metadata:s:v rotate=0 -c copy <output> -- Reino P.s. top-posting here is considered rude, so please stop it.
Am 01.03.20 um 14:55 schrieb Reino Wijnsma:
On 2020-02-27T13:23:02+0100, Ulf Zibis <Ulf.Zibis@gmx.de> wrote:
unfortunately I now see, that there is a problem with that. Some other tags were completely removed, e.g. creation time, geo tags, etc
What must I do to preserve all tags? I believe the -map_metadata option is what you're looking for.
ffmpeg -i <input> -map_metadata 0 -metadata:s:v rotate=0 -c copy <output>
It still "eats" few tags (e.g. mdhd_Duration), but creation time is preserved. :-) At the first view I missed the geo tag. In the original, mediainfo shows: Encoded date : UTC 2020-02-05 19:55:01 Tagged date : UTC 2020-02-05 19:55:01 xyz : -00.7655-047.1715/ But after transcoding with ffmpeg it only shows: Encoded date : UTC 2020-02-05 19:55:01 Tagged date : UTC 2020-02-05 19:55:01 ffprobe from the original shows: creation_time : 2020-02-05T19:55:01.000000Z location : -00.7655-047.1715/ location-eng : -00.7655-047.1715/ And after transcoding with ffmpeg it shows: creation_time : 2020-02-05T19:55:01.000000Z location-eng : -00.7655-047.1715/ location : -00.7655-047.1715/ So it seems, that -map_metadata maps "xyz" to "location" and "location_eng" and mediainfo is not able to detect the latter. And ffprobe does not list one of "Encoded date" or "Tagged date". Much thanks for your hint!
P.s. top-posting here is considered rude, so please stop it.
In case of 1-liners I sometimes forget this, sorry. -Ulf
participants (3)
-
Christian David -
Reino Wijnsma -
Ulf Zibis