Video compressions kill metadata / Exiftool's “-tagsfromfile” does not help

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












This is a long standing practical problem (more than one year). I always want to finish it, but every time I tried I failed. I have consulted several threads for it.



I have a bunch of daily-life videos, and I am making more with my iphone. Before my macbook get filled up with the videos, I'd really want to compress and organize them in a clean and systematic way.



TL;DR



Object: I want to compress my videos without losing metadata, or at least keeping the minimum amount of metadata so my iPhone can present the videos with when and where they were taken.



Obstructions: Exiftool's "-tagsfromfile" does not copy and overwrite the metadata completely. I have even tried some variations: -all, -all:all, −overwrite_original ...




Background



I used ffmpeg to compress and exiftool to re-tag, following



How can I reduce a video's size with ffmpeg?




See this answer. Quoted below for convenience:



ffmpeg -i input.mp4 -vcodec libx264 -crf 20 output.mp4



However, compression by ffmpeg kills almost all metadata, so I turned to exiftool by



Can EXIF data be copied completely from one image to another?




I suggest using the excellent exiftool by Phil Harvey:



exiftool -TagsFromFile fromImage.jpg toImage.jpg




Problem



The main problem is while -TagsFromFile does copy/overwrite some metadata, it does not do it completely, at least for my videos. I have also tried



exiftool −overwrite_original -r -TagsFromFile from.MOV -all to.MOV


and some other varieties e.g. replacing -all to -all:all, but nothing works.



Perhaps the most I care are the tags -CreationDate and -GPS (see Appendix) because I want to keep track of when and where my photos and videos were taken, and because I want those data to at least be presented in my iPhone.



Here are the previews of the videos from.MOV (original) and to.MOV (compressed) in my iPhone.



from.MOV (location hidden):



enter image description here



to.MOV (no address/location showed!):



enter image description here



Apparently, something is missing, so after compression the location cannot be presented.




Questions



  1. What should I do to let my iPhone show where the compressed video's original file was taken?

  2. Is there a way to copy and overwrite all metadata? Is it possible to make the metadata identical?

  3. Side question: When I was playing around with exiftool's -TagsFromFile function, I used it to try to overwrite the metadata of an image to another (both taken by iPhone). However, this case was worse than the videos' case: not only the location was not overwritten, nor the time! Again, I have tried some varieties replacing -all to -all:all. So is there a way to fix this?


Appendix



In this appendix, I list the date/time and GPS related metadata of the original and compressed videos.




from.MOV (original):



File Size : 2.9 MB
File Modification Date/Time : 2018:05:16 05:50:36-05:00
File Access Date/Time : 2018:05:16 07:54:42-05:00
File Inode Change Date/Time : 2018:05:16 07:51:58-05:00
File Permissions : rw-r--r--
File Type : MOV
Create Date : 2018:05:16 10:50:36
Modify Date : 2018:05:16 10:50:38
Track Create Date : 2018:05:16 10:50:36
Track Modify Date : 2018:05:16 10:50:38
Creation Date : 2018:05:16 05:50:36-05:00
GPS Coordinates : xx deg yy' z.zz" N, aa deg bb' c.cc" W, 261.305 m Above Sea Level
GPS Altitude : 261.305 m
GPS Altitude Ref : Above Sea Level
GPS Latitude : xx deg yy' z.zz" N
GPS Longitude : aa deg bb' c.cc" W
GPS Position : xx deg yy' z,zz" N, aa deg bb' c.cc" W


to.MOV (compressed):



File Size : 194 kB
File Modification Date/Time : 2018:05:16 07:54:42-05:00
File Access Date/Time : 2018:05:16 07:54:57-05:00
File Inode Change Date/Time : 2018:05:16 07:54:42-05:00
File Permissions : rw-r--r--
File Type : MOV
Creation Date : 2018:05:16 05:50:36-05:00
Track Create Date : 2018:05:16 10:50:36
Track Modify Date : 2018:05:16 10:50:38
Media Create Date : 2018:05:16 10:50:36
Media Modify Date : 2018:05:16 10:50:38
Creation Date : 2018:05:16 05:50:36-05:00
Create Date : 2018:05:16 10:50:36
Modify Date : 2018:05:16 10:50:38
GPS Altitude Ref : Above Sea Level
GPS Latitude : xx deg yy' z.zz" N
GPS Longitude : aa deg bb' c.cc" W
GPS Altitude : 261.3 m Above Sea Level
GPS Latitude Ref : North
GPS Longitude Ref : West
GPS Position : xx deg yy' z.zz" N, aa deg bb' c.cc" W


(I have changed the location into xyzabc just for privacy :P)




As you can see, not only are the date/time slightly different, but there even are more redundant new tags. Probably the thing that concerns me the most is that the tag -GPS Coordinates is not copied from from.MOV to to.MOV. Though the essential information has been copied, I guess that might be the reason why my iphone does not show its location. Thus this leads to my second question (above).









share|improve this question























    up vote
    0
    down vote

    favorite












    This is a long standing practical problem (more than one year). I always want to finish it, but every time I tried I failed. I have consulted several threads for it.



    I have a bunch of daily-life videos, and I am making more with my iphone. Before my macbook get filled up with the videos, I'd really want to compress and organize them in a clean and systematic way.



    TL;DR



    Object: I want to compress my videos without losing metadata, or at least keeping the minimum amount of metadata so my iPhone can present the videos with when and where they were taken.



    Obstructions: Exiftool's "-tagsfromfile" does not copy and overwrite the metadata completely. I have even tried some variations: -all, -all:all, −overwrite_original ...




    Background



    I used ffmpeg to compress and exiftool to re-tag, following



    How can I reduce a video's size with ffmpeg?




    See this answer. Quoted below for convenience:



    ffmpeg -i input.mp4 -vcodec libx264 -crf 20 output.mp4



    However, compression by ffmpeg kills almost all metadata, so I turned to exiftool by



    Can EXIF data be copied completely from one image to another?




    I suggest using the excellent exiftool by Phil Harvey:



    exiftool -TagsFromFile fromImage.jpg toImage.jpg




    Problem



    The main problem is while -TagsFromFile does copy/overwrite some metadata, it does not do it completely, at least for my videos. I have also tried



    exiftool −overwrite_original -r -TagsFromFile from.MOV -all to.MOV


    and some other varieties e.g. replacing -all to -all:all, but nothing works.



    Perhaps the most I care are the tags -CreationDate and -GPS (see Appendix) because I want to keep track of when and where my photos and videos were taken, and because I want those data to at least be presented in my iPhone.



    Here are the previews of the videos from.MOV (original) and to.MOV (compressed) in my iPhone.



    from.MOV (location hidden):



    enter image description here



    to.MOV (no address/location showed!):



    enter image description here



    Apparently, something is missing, so after compression the location cannot be presented.




    Questions



    1. What should I do to let my iPhone show where the compressed video's original file was taken?

    2. Is there a way to copy and overwrite all metadata? Is it possible to make the metadata identical?

    3. Side question: When I was playing around with exiftool's -TagsFromFile function, I used it to try to overwrite the metadata of an image to another (both taken by iPhone). However, this case was worse than the videos' case: not only the location was not overwritten, nor the time! Again, I have tried some varieties replacing -all to -all:all. So is there a way to fix this?


    Appendix



    In this appendix, I list the date/time and GPS related metadata of the original and compressed videos.




    from.MOV (original):



    File Size : 2.9 MB
    File Modification Date/Time : 2018:05:16 05:50:36-05:00
    File Access Date/Time : 2018:05:16 07:54:42-05:00
    File Inode Change Date/Time : 2018:05:16 07:51:58-05:00
    File Permissions : rw-r--r--
    File Type : MOV
    Create Date : 2018:05:16 10:50:36
    Modify Date : 2018:05:16 10:50:38
    Track Create Date : 2018:05:16 10:50:36
    Track Modify Date : 2018:05:16 10:50:38
    Creation Date : 2018:05:16 05:50:36-05:00
    GPS Coordinates : xx deg yy' z.zz" N, aa deg bb' c.cc" W, 261.305 m Above Sea Level
    GPS Altitude : 261.305 m
    GPS Altitude Ref : Above Sea Level
    GPS Latitude : xx deg yy' z.zz" N
    GPS Longitude : aa deg bb' c.cc" W
    GPS Position : xx deg yy' z,zz" N, aa deg bb' c.cc" W


    to.MOV (compressed):



    File Size : 194 kB
    File Modification Date/Time : 2018:05:16 07:54:42-05:00
    File Access Date/Time : 2018:05:16 07:54:57-05:00
    File Inode Change Date/Time : 2018:05:16 07:54:42-05:00
    File Permissions : rw-r--r--
    File Type : MOV
    Creation Date : 2018:05:16 05:50:36-05:00
    Track Create Date : 2018:05:16 10:50:36
    Track Modify Date : 2018:05:16 10:50:38
    Media Create Date : 2018:05:16 10:50:36
    Media Modify Date : 2018:05:16 10:50:38
    Creation Date : 2018:05:16 05:50:36-05:00
    Create Date : 2018:05:16 10:50:36
    Modify Date : 2018:05:16 10:50:38
    GPS Altitude Ref : Above Sea Level
    GPS Latitude : xx deg yy' z.zz" N
    GPS Longitude : aa deg bb' c.cc" W
    GPS Altitude : 261.3 m Above Sea Level
    GPS Latitude Ref : North
    GPS Longitude Ref : West
    GPS Position : xx deg yy' z.zz" N, aa deg bb' c.cc" W


    (I have changed the location into xyzabc just for privacy :P)




    As you can see, not only are the date/time slightly different, but there even are more redundant new tags. Probably the thing that concerns me the most is that the tag -GPS Coordinates is not copied from from.MOV to to.MOV. Though the essential information has been copied, I guess that might be the reason why my iphone does not show its location. Thus this leads to my second question (above).









    share|improve this question





















      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      This is a long standing practical problem (more than one year). I always want to finish it, but every time I tried I failed. I have consulted several threads for it.



      I have a bunch of daily-life videos, and I am making more with my iphone. Before my macbook get filled up with the videos, I'd really want to compress and organize them in a clean and systematic way.



      TL;DR



      Object: I want to compress my videos without losing metadata, or at least keeping the minimum amount of metadata so my iPhone can present the videos with when and where they were taken.



      Obstructions: Exiftool's "-tagsfromfile" does not copy and overwrite the metadata completely. I have even tried some variations: -all, -all:all, −overwrite_original ...




      Background



      I used ffmpeg to compress and exiftool to re-tag, following



      How can I reduce a video's size with ffmpeg?




      See this answer. Quoted below for convenience:



      ffmpeg -i input.mp4 -vcodec libx264 -crf 20 output.mp4



      However, compression by ffmpeg kills almost all metadata, so I turned to exiftool by



      Can EXIF data be copied completely from one image to another?




      I suggest using the excellent exiftool by Phil Harvey:



      exiftool -TagsFromFile fromImage.jpg toImage.jpg




      Problem



      The main problem is while -TagsFromFile does copy/overwrite some metadata, it does not do it completely, at least for my videos. I have also tried



      exiftool −overwrite_original -r -TagsFromFile from.MOV -all to.MOV


      and some other varieties e.g. replacing -all to -all:all, but nothing works.



      Perhaps the most I care are the tags -CreationDate and -GPS (see Appendix) because I want to keep track of when and where my photos and videos were taken, and because I want those data to at least be presented in my iPhone.



      Here are the previews of the videos from.MOV (original) and to.MOV (compressed) in my iPhone.



      from.MOV (location hidden):



      enter image description here



      to.MOV (no address/location showed!):



      enter image description here



      Apparently, something is missing, so after compression the location cannot be presented.




      Questions



      1. What should I do to let my iPhone show where the compressed video's original file was taken?

      2. Is there a way to copy and overwrite all metadata? Is it possible to make the metadata identical?

      3. Side question: When I was playing around with exiftool's -TagsFromFile function, I used it to try to overwrite the metadata of an image to another (both taken by iPhone). However, this case was worse than the videos' case: not only the location was not overwritten, nor the time! Again, I have tried some varieties replacing -all to -all:all. So is there a way to fix this?


      Appendix



      In this appendix, I list the date/time and GPS related metadata of the original and compressed videos.




      from.MOV (original):



      File Size : 2.9 MB
      File Modification Date/Time : 2018:05:16 05:50:36-05:00
      File Access Date/Time : 2018:05:16 07:54:42-05:00
      File Inode Change Date/Time : 2018:05:16 07:51:58-05:00
      File Permissions : rw-r--r--
      File Type : MOV
      Create Date : 2018:05:16 10:50:36
      Modify Date : 2018:05:16 10:50:38
      Track Create Date : 2018:05:16 10:50:36
      Track Modify Date : 2018:05:16 10:50:38
      Creation Date : 2018:05:16 05:50:36-05:00
      GPS Coordinates : xx deg yy' z.zz" N, aa deg bb' c.cc" W, 261.305 m Above Sea Level
      GPS Altitude : 261.305 m
      GPS Altitude Ref : Above Sea Level
      GPS Latitude : xx deg yy' z.zz" N
      GPS Longitude : aa deg bb' c.cc" W
      GPS Position : xx deg yy' z,zz" N, aa deg bb' c.cc" W


      to.MOV (compressed):



      File Size : 194 kB
      File Modification Date/Time : 2018:05:16 07:54:42-05:00
      File Access Date/Time : 2018:05:16 07:54:57-05:00
      File Inode Change Date/Time : 2018:05:16 07:54:42-05:00
      File Permissions : rw-r--r--
      File Type : MOV
      Creation Date : 2018:05:16 05:50:36-05:00
      Track Create Date : 2018:05:16 10:50:36
      Track Modify Date : 2018:05:16 10:50:38
      Media Create Date : 2018:05:16 10:50:36
      Media Modify Date : 2018:05:16 10:50:38
      Creation Date : 2018:05:16 05:50:36-05:00
      Create Date : 2018:05:16 10:50:36
      Modify Date : 2018:05:16 10:50:38
      GPS Altitude Ref : Above Sea Level
      GPS Latitude : xx deg yy' z.zz" N
      GPS Longitude : aa deg bb' c.cc" W
      GPS Altitude : 261.3 m Above Sea Level
      GPS Latitude Ref : North
      GPS Longitude Ref : West
      GPS Position : xx deg yy' z.zz" N, aa deg bb' c.cc" W


      (I have changed the location into xyzabc just for privacy :P)




      As you can see, not only are the date/time slightly different, but there even are more redundant new tags. Probably the thing that concerns me the most is that the tag -GPS Coordinates is not copied from from.MOV to to.MOV. Though the essential information has been copied, I guess that might be the reason why my iphone does not show its location. Thus this leads to my second question (above).









      share|improve this question











      This is a long standing practical problem (more than one year). I always want to finish it, but every time I tried I failed. I have consulted several threads for it.



      I have a bunch of daily-life videos, and I am making more with my iphone. Before my macbook get filled up with the videos, I'd really want to compress and organize them in a clean and systematic way.



      TL;DR



      Object: I want to compress my videos without losing metadata, or at least keeping the minimum amount of metadata so my iPhone can present the videos with when and where they were taken.



      Obstructions: Exiftool's "-tagsfromfile" does not copy and overwrite the metadata completely. I have even tried some variations: -all, -all:all, −overwrite_original ...




      Background



      I used ffmpeg to compress and exiftool to re-tag, following



      How can I reduce a video's size with ffmpeg?




      See this answer. Quoted below for convenience:



      ffmpeg -i input.mp4 -vcodec libx264 -crf 20 output.mp4



      However, compression by ffmpeg kills almost all metadata, so I turned to exiftool by



      Can EXIF data be copied completely from one image to another?




      I suggest using the excellent exiftool by Phil Harvey:



      exiftool -TagsFromFile fromImage.jpg toImage.jpg




      Problem



      The main problem is while -TagsFromFile does copy/overwrite some metadata, it does not do it completely, at least for my videos. I have also tried



      exiftool −overwrite_original -r -TagsFromFile from.MOV -all to.MOV


      and some other varieties e.g. replacing -all to -all:all, but nothing works.



      Perhaps the most I care are the tags -CreationDate and -GPS (see Appendix) because I want to keep track of when and where my photos and videos were taken, and because I want those data to at least be presented in my iPhone.



      Here are the previews of the videos from.MOV (original) and to.MOV (compressed) in my iPhone.



      from.MOV (location hidden):



      enter image description here



      to.MOV (no address/location showed!):



      enter image description here



      Apparently, something is missing, so after compression the location cannot be presented.




      Questions



      1. What should I do to let my iPhone show where the compressed video's original file was taken?

      2. Is there a way to copy and overwrite all metadata? Is it possible to make the metadata identical?

      3. Side question: When I was playing around with exiftool's -TagsFromFile function, I used it to try to overwrite the metadata of an image to another (both taken by iPhone). However, this case was worse than the videos' case: not only the location was not overwritten, nor the time! Again, I have tried some varieties replacing -all to -all:all. So is there a way to fix this?


      Appendix



      In this appendix, I list the date/time and GPS related metadata of the original and compressed videos.




      from.MOV (original):



      File Size : 2.9 MB
      File Modification Date/Time : 2018:05:16 05:50:36-05:00
      File Access Date/Time : 2018:05:16 07:54:42-05:00
      File Inode Change Date/Time : 2018:05:16 07:51:58-05:00
      File Permissions : rw-r--r--
      File Type : MOV
      Create Date : 2018:05:16 10:50:36
      Modify Date : 2018:05:16 10:50:38
      Track Create Date : 2018:05:16 10:50:36
      Track Modify Date : 2018:05:16 10:50:38
      Creation Date : 2018:05:16 05:50:36-05:00
      GPS Coordinates : xx deg yy' z.zz" N, aa deg bb' c.cc" W, 261.305 m Above Sea Level
      GPS Altitude : 261.305 m
      GPS Altitude Ref : Above Sea Level
      GPS Latitude : xx deg yy' z.zz" N
      GPS Longitude : aa deg bb' c.cc" W
      GPS Position : xx deg yy' z,zz" N, aa deg bb' c.cc" W


      to.MOV (compressed):



      File Size : 194 kB
      File Modification Date/Time : 2018:05:16 07:54:42-05:00
      File Access Date/Time : 2018:05:16 07:54:57-05:00
      File Inode Change Date/Time : 2018:05:16 07:54:42-05:00
      File Permissions : rw-r--r--
      File Type : MOV
      Creation Date : 2018:05:16 05:50:36-05:00
      Track Create Date : 2018:05:16 10:50:36
      Track Modify Date : 2018:05:16 10:50:38
      Media Create Date : 2018:05:16 10:50:36
      Media Modify Date : 2018:05:16 10:50:38
      Creation Date : 2018:05:16 05:50:36-05:00
      Create Date : 2018:05:16 10:50:36
      Modify Date : 2018:05:16 10:50:38
      GPS Altitude Ref : Above Sea Level
      GPS Latitude : xx deg yy' z.zz" N
      GPS Longitude : aa deg bb' c.cc" W
      GPS Altitude : 261.3 m Above Sea Level
      GPS Latitude Ref : North
      GPS Longitude Ref : West
      GPS Position : xx deg yy' z.zz" N, aa deg bb' c.cc" W


      (I have changed the location into xyzabc just for privacy :P)




      As you can see, not only are the date/time slightly different, but there even are more redundant new tags. Probably the thing that concerns me the most is that the tag -GPS Coordinates is not copied from from.MOV to to.MOV. Though the essential information has been copied, I guess that might be the reason why my iphone does not show its location. Thus this leads to my second question (above).











      share|improve this question










      share|improve this question




      share|improve this question









      asked May 16 at 17:51









      Student

      1012




      1012

























          active

          oldest

          votes











          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );








           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f444215%2fvideo-compressions-kill-metadata-exiftools-tagsfromfile-does-not-help%23new-answer', 'question_page');

          );

          Post as a guest



































          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes










           

          draft saved


          draft discarded


























           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f444215%2fvideo-compressions-kill-metadata-exiftools-tagsfromfile-does-not-help%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Bahrain

          Postfix configuration issue with fips on centos 7; mailgun relay