Retrieving and Saving media metadata using FFmpeg












53















I want to read the metadata in media files and then save that metadata in a text/xml file, so that I can later insert that data in my database. I would prefer to use ffmpeg.



Also is the same thing possible with MediaInfo?? I know I can get the metadata for individual tracks using MediaInfo, but I would want to automate it; as in whenever a new media file is found, read its metadata and then store it in a txt/xml file.



Or, is there any other tool/utility/API that I can use for this?










share|improve this question




















  • 1





    And how to get Program Guide (EPG) via ffmpeg?!

    – Dr.jacky
    Aug 1 '15 at 6:57











  • It seems nobody knows or it is not currently possible to export the EPG information from a .ts file (which is a text file with extension .eit) and put it as metadata in a MP4. Really i have searched some hours on Internet and i found nothing. i think that that whould be the obvious and the best step to have a short description for a chapter in a serie. Technically seems easy but no tools support that.

    – Joniale
    Apr 2 '18 at 8:19











  • By they way there is a software called metaX (danhinsley.com) that can retrieve metadata from Internet and set the metadata for a .mp4 .mkv and etc. You only need to know the name of the serie/movie/show and you it will look for the data. Unfortunately, It doesn´t work with EPG information or .ts files and the software doesn´t work well for chapters in a serie. Something that can be solved if you can export the EPG data.

    – Joniale
    Apr 2 '18 at 9:14


















53















I want to read the metadata in media files and then save that metadata in a text/xml file, so that I can later insert that data in my database. I would prefer to use ffmpeg.



Also is the same thing possible with MediaInfo?? I know I can get the metadata for individual tracks using MediaInfo, but I would want to automate it; as in whenever a new media file is found, read its metadata and then store it in a txt/xml file.



Or, is there any other tool/utility/API that I can use for this?










share|improve this question




















  • 1





    And how to get Program Guide (EPG) via ffmpeg?!

    – Dr.jacky
    Aug 1 '15 at 6:57











  • It seems nobody knows or it is not currently possible to export the EPG information from a .ts file (which is a text file with extension .eit) and put it as metadata in a MP4. Really i have searched some hours on Internet and i found nothing. i think that that whould be the obvious and the best step to have a short description for a chapter in a serie. Technically seems easy but no tools support that.

    – Joniale
    Apr 2 '18 at 8:19











  • By they way there is a software called metaX (danhinsley.com) that can retrieve metadata from Internet and set the metadata for a .mp4 .mkv and etc. You only need to know the name of the serie/movie/show and you it will look for the data. Unfortunately, It doesn´t work with EPG information or .ts files and the software doesn´t work well for chapters in a serie. Something that can be solved if you can export the EPG data.

    – Joniale
    Apr 2 '18 at 9:14
















53












53








53


19






I want to read the metadata in media files and then save that metadata in a text/xml file, so that I can later insert that data in my database. I would prefer to use ffmpeg.



Also is the same thing possible with MediaInfo?? I know I can get the metadata for individual tracks using MediaInfo, but I would want to automate it; as in whenever a new media file is found, read its metadata and then store it in a txt/xml file.



Or, is there any other tool/utility/API that I can use for this?










share|improve this question
















I want to read the metadata in media files and then save that metadata in a text/xml file, so that I can later insert that data in my database. I would prefer to use ffmpeg.



Also is the same thing possible with MediaInfo?? I know I can get the metadata for individual tracks using MediaInfo, but I would want to automate it; as in whenever a new media file is found, read its metadata and then store it in a txt/xml file.



Or, is there any other tool/utility/API that I can use for this?







ffmpeg metadata media






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jun 10 '15 at 4:30









Yu Hao

98.1k22168221




98.1k22168221










asked Feb 27 '12 at 11:55









Rahul PatwaRahul Patwa

6993915




6993915








  • 1





    And how to get Program Guide (EPG) via ffmpeg?!

    – Dr.jacky
    Aug 1 '15 at 6:57











  • It seems nobody knows or it is not currently possible to export the EPG information from a .ts file (which is a text file with extension .eit) and put it as metadata in a MP4. Really i have searched some hours on Internet and i found nothing. i think that that whould be the obvious and the best step to have a short description for a chapter in a serie. Technically seems easy but no tools support that.

    – Joniale
    Apr 2 '18 at 8:19











  • By they way there is a software called metaX (danhinsley.com) that can retrieve metadata from Internet and set the metadata for a .mp4 .mkv and etc. You only need to know the name of the serie/movie/show and you it will look for the data. Unfortunately, It doesn´t work with EPG information or .ts files and the software doesn´t work well for chapters in a serie. Something that can be solved if you can export the EPG data.

    – Joniale
    Apr 2 '18 at 9:14
















  • 1





    And how to get Program Guide (EPG) via ffmpeg?!

    – Dr.jacky
    Aug 1 '15 at 6:57











  • It seems nobody knows or it is not currently possible to export the EPG information from a .ts file (which is a text file with extension .eit) and put it as metadata in a MP4. Really i have searched some hours on Internet and i found nothing. i think that that whould be the obvious and the best step to have a short description for a chapter in a serie. Technically seems easy but no tools support that.

    – Joniale
    Apr 2 '18 at 8:19











  • By they way there is a software called metaX (danhinsley.com) that can retrieve metadata from Internet and set the metadata for a .mp4 .mkv and etc. You only need to know the name of the serie/movie/show and you it will look for the data. Unfortunately, It doesn´t work with EPG information or .ts files and the software doesn´t work well for chapters in a serie. Something that can be solved if you can export the EPG data.

    – Joniale
    Apr 2 '18 at 9:14










1




1





And how to get Program Guide (EPG) via ffmpeg?!

– Dr.jacky
Aug 1 '15 at 6:57





And how to get Program Guide (EPG) via ffmpeg?!

– Dr.jacky
Aug 1 '15 at 6:57













It seems nobody knows or it is not currently possible to export the EPG information from a .ts file (which is a text file with extension .eit) and put it as metadata in a MP4. Really i have searched some hours on Internet and i found nothing. i think that that whould be the obvious and the best step to have a short description for a chapter in a serie. Technically seems easy but no tools support that.

– Joniale
Apr 2 '18 at 8:19





It seems nobody knows or it is not currently possible to export the EPG information from a .ts file (which is a text file with extension .eit) and put it as metadata in a MP4. Really i have searched some hours on Internet and i found nothing. i think that that whould be the obvious and the best step to have a short description for a chapter in a serie. Technically seems easy but no tools support that.

– Joniale
Apr 2 '18 at 8:19













By they way there is a software called metaX (danhinsley.com) that can retrieve metadata from Internet and set the metadata for a .mp4 .mkv and etc. You only need to know the name of the serie/movie/show and you it will look for the data. Unfortunately, It doesn´t work with EPG information or .ts files and the software doesn´t work well for chapters in a serie. Something that can be solved if you can export the EPG data.

– Joniale
Apr 2 '18 at 9:14







By they way there is a software called metaX (danhinsley.com) that can retrieve metadata from Internet and set the metadata for a .mp4 .mkv and etc. You only need to know the name of the serie/movie/show and you it will look for the data. Unfortunately, It doesn´t work with EPG information or .ts files and the software doesn´t work well for chapters in a serie. Something that can be solved if you can export the EPG data.

– Joniale
Apr 2 '18 at 9:14














5 Answers
5






active

oldest

votes


















69














You can save the global metadata to a text file using the -f ffmetadata option as follows:



ffmpeg -i in.mp4 -f ffmetadata in.txt


If you also need metadata from the video and audio streams (for example if the global metadata does not contain the creation time) use:



ffmpeg -i in.mp4 -c copy -map_metadata 0 -map_metadata:s:v 0:s:v -map_metadata:s:a 0:s:a -f ffmetadata in.txt


For details, see Metadata section in ffmpeg documentation.



For restoring metadata from a file see https://stackoverflow.com/a/50580239/2235831.






share|improve this answer





















  • 2





    Wow, thank you very much Dmitry! That is what i needed to know. - Best Regards

    – Rahul Patwa
    Feb 28 '12 at 5:57








  • 7





    I've found that avprobe prints more info (it comes along with ffmpeg). Something like "avprobe -show_format input_video -v 0" might be helpful.

    – matiasg
    Apr 18 '13 at 20:24






  • 1





    I think this page is a little more informative that the one linked: ffmpeg.org/ffmpeg-formats.html#Metadata

    – davidkomer
    Jan 31 '14 at 11:30











  • @davidkomer - thank you for providing updated link.

    – Dmitry Shkuropatsky
    Feb 5 '14 at 4:39






  • 3





    If you don't have avprobe on your system, it might exist as ffprobe.

    – Micah Elliott
    Nov 20 '14 at 21:30



















27














I prefer using exiftool which offers me more outputs than ffmpeg. take a example (a file from iphone):



exiftool IMG_0014.MOV >a.txt


the output is





ExifTool Version Number         : 8.60
File Name : IMG_0014.MOV
Directory : .
File Size : 19 MB
File Modification Date/Time : 2013:07:19 12:03:22-10:00
File Permissions : rw-r--r--
File Type : MOV
MIME Type : video/quicktime
Major Brand : Apple QuickTime (.MOV/QT)
Minor Version : 0.0.0
Compatible Brands : qt
Movie Data Size : 19979709
Movie Header Version : 0
Modify Date : 2013:07:19 22:03:21
Time Scale : 600
Duration : 7.27 s
Preferred Rate : 1
Preferred Volume : 100.00%
Preview Time : 0 s
Preview Duration : 0 s
Poster Time : 0 s
Selection Time : 0 s
Selection Duration : 0 s
Current Time : 0 s
Next Track ID : 3
Track Header Version : 0
Track Create Date : 2013:07:19 22:03:13
Track Modify Date : 2013:07:19 22:03:21
Track ID : 1
Track Duration : 7.27 s
Track Layer : 0
Track Volume : 0.00%
Image Width : 1920
Image Height : 1080
Graphics Mode : ditherCopy
Op Color : 32768 32768 32768
Compressor ID : avc1
Source Image Width : 1920
Source Image Height : 1080
X Resolution : 72
Y Resolution : 72
Compressor Name : H.264
Bit Depth : 24
Video Frame Rate : 27.011
Camera Identifier : Back
Frame Readout Time : 28512 microseconds
Matrix Structure : 1 0 0 0 1 0 0 0 1
Media Header Version : 0
Media Create Date : 2013:07:19 22:03:13
Media Modify Date : 2013:07:19 22:03:21
Media Time Scale : 44100
Media Duration : 7.31 s
Media Language Code : und
Balance : 0
Handler Class : Data Handler
Handler Vendor ID : Apple
Handler Description : Core Media Data Handler
Audio Channels : 1
Audio Bits Per Sample : 16
Audio Sample Rate : 44100
Audio Format : chan
Model : iPhone 4S
Software Version : 6.1.3
Create Date : 2013:07:20 08:03:13+10:00
Make : Apple
Handler Type : Metadata Tags
Make (und-AU) : Apple
Creation Date (und-AU) : 2013:07:20 08:03:13+10:00
Software (und-AU) : 6.1.3
Model (und-AU) : iPhone 4S
Avg Bitrate : 22 Mbps
Image Size : 1920x1080
Rotation : 90




while if i use ffmpeg



 ffmpeg -i IMG_0014.MOV -f ffmetadata metadata.txt


the output is



;FFMETADATA1
major_brand=qt
minor_version=0
compatible_brands=qt
date-eng=2013-07-20T08:03:13+1000
encoder=6.1.3
encoder-eng=6.1.3
date=2013-07-20T08:03:13+1000








share|improve this answer





















  • 3





    Unfortunately, exiftool doesn't allow to save metadata back to video files.

    – Filipe Correia
    Sep 29 '13 at 14:26






  • 1





    And how to get Program Guide (EPG) via ffmpeg?!

    – Dr.jacky
    Aug 1 '15 at 6:56











  • is there any Android version of exiftool , have searched on the website of exiftool but could not find.

    – darth_coder
    May 7 '18 at 11:18



















9














You can use ffprobe (which comes with ffmpeg) for gathering information about multimedia files. For information about overall content of a multimedia file use



ffprobe -show_streams -show_format DV06xx.avi 


and for information about each single frame in a video file use



ffprobe -show_frames DV06xx.avi 


However, ffprobedoes not retrieve as much information as my favorite tool, Mediainfo, does, e.g., 'ffprobe' does not display the time code of first frame of the video (although the man page claims otherwise) or the recording date.



If you run mediainfo on the command line, you can even request output in XML format:



mediainfo --OUTPUT=XML DV06xx.avi 


In my example the output is:



<?xml version="1.0" encoding="UTF-8"?>
<Mediainfo version="0.7.63">
<File>
<track type="General">
<Complete_name>DV06xx.avi</Complete_name>
<Format>AVI</Format>
<Format_Info>Audio Video Interleave</Format_Info>
<Commercial_name>DVCPRO</Commercial_name>
<Format_profile>OpenDML</Format_profile>
<File_size>13.3 GiB</File_size>
<Duration>1h 2mn</Duration>
<Overall_bit_rate_mode>Constant</Overall_bit_rate_mode>
<Overall_bit_rate>30.5 Mbps</Overall_bit_rate>
<Recorded_date>2004-03-28 15:42:35.000</Recorded_date>
</track>

<track type="Video">
<ID>0</ID>
<Format>DV</Format>
<Commercial_name>DVCPRO</Commercial_name>
<Codec_ID>dvsd</Codec_ID>
<Codec_ID_Hint>Sony</Codec_ID_Hint>
<Duration>1h 2mn</Duration>
<Bit_rate_mode>Constant</Bit_rate_mode>
<Bit_rate>24.4 Mbps</Bit_rate>
<Encoded_bit_rate>28.8 Mbps</Encoded_bit_rate>
<Width>720 pixels</Width>
<Height>576 pixels</Height>
<Display_aspect_ratio>4:3</Display_aspect_ratio>
<Frame_rate_mode>Constant</Frame_rate_mode>
<Frame_rate>25.000 fps</Frame_rate>
<Standard>PAL</Standard>
<Color_space>YUV</Color_space>
<Chroma_subsampling>4:2:0</Chroma_subsampling>
<Bit_depth>8 bits</Bit_depth>
<Scan_type>Interlaced</Scan_type>
<Scan_order>Bottom Field First</Scan_order>
<Compression_mode>Lossy</Compression_mode>
<Bits__Pixel_Frame_>2.357</Bits__Pixel_Frame_>
<Time_code_of_first_frame>00:00:01:10</Time_code_of_first_frame>
<Time_code_source>Subcode time code</Time_code_source>
<Stream_size>12.6 GiB (94%)</Stream_size>
<Encoding_settings>ae mode=full automatic / wb mode=automatic / white balance= / fcm=manual focus</Encoding_settings>
</track>

<track type="Audio">
<ID>1</ID>
<Format>PCM</Format>
<Format_settings__Endianness>Little</Format_settings__Endianness>
<Format_settings__Sign>Signed</Format_settings__Sign>
<Codec_ID>1</Codec_ID>
<Duration>1h 2mn</Duration>
<Bit_rate_mode>Constant</Bit_rate_mode>
<Bit_rate>1 536 Kbps</Bit_rate>
<Channel_s_>2 channels</Channel_s_>
<Sampling_rate>48.0 KHz</Sampling_rate>
<Bit_depth>16 bits</Bit_depth>
<Stream_size>688 MiB (5%)</Stream_size>
<Alignment>Aligned on interleaves</Alignment>
<Interleave__duration>40 ms (1.00 video frame)</Interleave__duration>
<Interleave__preload_duration>40 ms</Interleave__preload_duration>
</track>

</File>
</Mediainfo>


Adding the optional parameter -f will produce even more detailed information.






share|improve this answer





















  • 1





    And how to get Program Guide (EPG) via ffmpeg?!

    – Dr.jacky
    Aug 1 '15 at 6:56











  • what mediainfo exports are not necessarily the "metadata" which ffmpeg shows, like title, artist, track, etc.

    – Meow
    Aug 7 '15 at 3:39



















0














There's also atomicparsley for MPEG-4 files.






share|improve this answer































    0














    You can set the metadata on video, below mention set album_artist



    ffmpeg -i source.mp4 -metadata album_artist='stack developer' -y -r 1 -acodec copy -vcodec copy destination.mp4


    And retreive the meta tag as:



    ffmpeg -i destination.mp4


    Use this on command line .






    share|improve this answer























      Your Answer






      StackExchange.ifUsing("editor", function () {
      StackExchange.using("externalEditor", function () {
      StackExchange.using("snippets", function () {
      StackExchange.snippets.init();
      });
      });
      }, "code-snippets");

      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "1"
      };
      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',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f9464617%2fretrieving-and-saving-media-metadata-using-ffmpeg%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      5 Answers
      5






      active

      oldest

      votes








      5 Answers
      5






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      69














      You can save the global metadata to a text file using the -f ffmetadata option as follows:



      ffmpeg -i in.mp4 -f ffmetadata in.txt


      If you also need metadata from the video and audio streams (for example if the global metadata does not contain the creation time) use:



      ffmpeg -i in.mp4 -c copy -map_metadata 0 -map_metadata:s:v 0:s:v -map_metadata:s:a 0:s:a -f ffmetadata in.txt


      For details, see Metadata section in ffmpeg documentation.



      For restoring metadata from a file see https://stackoverflow.com/a/50580239/2235831.






      share|improve this answer





















      • 2





        Wow, thank you very much Dmitry! That is what i needed to know. - Best Regards

        – Rahul Patwa
        Feb 28 '12 at 5:57








      • 7





        I've found that avprobe prints more info (it comes along with ffmpeg). Something like "avprobe -show_format input_video -v 0" might be helpful.

        – matiasg
        Apr 18 '13 at 20:24






      • 1





        I think this page is a little more informative that the one linked: ffmpeg.org/ffmpeg-formats.html#Metadata

        – davidkomer
        Jan 31 '14 at 11:30











      • @davidkomer - thank you for providing updated link.

        – Dmitry Shkuropatsky
        Feb 5 '14 at 4:39






      • 3





        If you don't have avprobe on your system, it might exist as ffprobe.

        – Micah Elliott
        Nov 20 '14 at 21:30
















      69














      You can save the global metadata to a text file using the -f ffmetadata option as follows:



      ffmpeg -i in.mp4 -f ffmetadata in.txt


      If you also need metadata from the video and audio streams (for example if the global metadata does not contain the creation time) use:



      ffmpeg -i in.mp4 -c copy -map_metadata 0 -map_metadata:s:v 0:s:v -map_metadata:s:a 0:s:a -f ffmetadata in.txt


      For details, see Metadata section in ffmpeg documentation.



      For restoring metadata from a file see https://stackoverflow.com/a/50580239/2235831.






      share|improve this answer





















      • 2





        Wow, thank you very much Dmitry! That is what i needed to know. - Best Regards

        – Rahul Patwa
        Feb 28 '12 at 5:57








      • 7





        I've found that avprobe prints more info (it comes along with ffmpeg). Something like "avprobe -show_format input_video -v 0" might be helpful.

        – matiasg
        Apr 18 '13 at 20:24






      • 1





        I think this page is a little more informative that the one linked: ffmpeg.org/ffmpeg-formats.html#Metadata

        – davidkomer
        Jan 31 '14 at 11:30











      • @davidkomer - thank you for providing updated link.

        – Dmitry Shkuropatsky
        Feb 5 '14 at 4:39






      • 3





        If you don't have avprobe on your system, it might exist as ffprobe.

        – Micah Elliott
        Nov 20 '14 at 21:30














      69












      69








      69







      You can save the global metadata to a text file using the -f ffmetadata option as follows:



      ffmpeg -i in.mp4 -f ffmetadata in.txt


      If you also need metadata from the video and audio streams (for example if the global metadata does not contain the creation time) use:



      ffmpeg -i in.mp4 -c copy -map_metadata 0 -map_metadata:s:v 0:s:v -map_metadata:s:a 0:s:a -f ffmetadata in.txt


      For details, see Metadata section in ffmpeg documentation.



      For restoring metadata from a file see https://stackoverflow.com/a/50580239/2235831.






      share|improve this answer















      You can save the global metadata to a text file using the -f ffmetadata option as follows:



      ffmpeg -i in.mp4 -f ffmetadata in.txt


      If you also need metadata from the video and audio streams (for example if the global metadata does not contain the creation time) use:



      ffmpeg -i in.mp4 -c copy -map_metadata 0 -map_metadata:s:v 0:s:v -map_metadata:s:a 0:s:a -f ffmetadata in.txt


      For details, see Metadata section in ffmpeg documentation.



      For restoring metadata from a file see https://stackoverflow.com/a/50580239/2235831.







      share|improve this answer














      share|improve this answer



      share|improve this answer








      edited Nov 15 '18 at 5:32









      Eric Platon

      6,33153041




      6,33153041










      answered Feb 27 '12 at 22:18









      Dmitry ShkuropatskyDmitry Shkuropatsky

      2,92311713




      2,92311713








      • 2





        Wow, thank you very much Dmitry! That is what i needed to know. - Best Regards

        – Rahul Patwa
        Feb 28 '12 at 5:57








      • 7





        I've found that avprobe prints more info (it comes along with ffmpeg). Something like "avprobe -show_format input_video -v 0" might be helpful.

        – matiasg
        Apr 18 '13 at 20:24






      • 1





        I think this page is a little more informative that the one linked: ffmpeg.org/ffmpeg-formats.html#Metadata

        – davidkomer
        Jan 31 '14 at 11:30











      • @davidkomer - thank you for providing updated link.

        – Dmitry Shkuropatsky
        Feb 5 '14 at 4:39






      • 3





        If you don't have avprobe on your system, it might exist as ffprobe.

        – Micah Elliott
        Nov 20 '14 at 21:30














      • 2





        Wow, thank you very much Dmitry! That is what i needed to know. - Best Regards

        – Rahul Patwa
        Feb 28 '12 at 5:57








      • 7





        I've found that avprobe prints more info (it comes along with ffmpeg). Something like "avprobe -show_format input_video -v 0" might be helpful.

        – matiasg
        Apr 18 '13 at 20:24






      • 1





        I think this page is a little more informative that the one linked: ffmpeg.org/ffmpeg-formats.html#Metadata

        – davidkomer
        Jan 31 '14 at 11:30











      • @davidkomer - thank you for providing updated link.

        – Dmitry Shkuropatsky
        Feb 5 '14 at 4:39






      • 3





        If you don't have avprobe on your system, it might exist as ffprobe.

        – Micah Elliott
        Nov 20 '14 at 21:30








      2




      2





      Wow, thank you very much Dmitry! That is what i needed to know. - Best Regards

      – Rahul Patwa
      Feb 28 '12 at 5:57







      Wow, thank you very much Dmitry! That is what i needed to know. - Best Regards

      – Rahul Patwa
      Feb 28 '12 at 5:57






      7




      7





      I've found that avprobe prints more info (it comes along with ffmpeg). Something like "avprobe -show_format input_video -v 0" might be helpful.

      – matiasg
      Apr 18 '13 at 20:24





      I've found that avprobe prints more info (it comes along with ffmpeg). Something like "avprobe -show_format input_video -v 0" might be helpful.

      – matiasg
      Apr 18 '13 at 20:24




      1




      1





      I think this page is a little more informative that the one linked: ffmpeg.org/ffmpeg-formats.html#Metadata

      – davidkomer
      Jan 31 '14 at 11:30





      I think this page is a little more informative that the one linked: ffmpeg.org/ffmpeg-formats.html#Metadata

      – davidkomer
      Jan 31 '14 at 11:30













      @davidkomer - thank you for providing updated link.

      – Dmitry Shkuropatsky
      Feb 5 '14 at 4:39





      @davidkomer - thank you for providing updated link.

      – Dmitry Shkuropatsky
      Feb 5 '14 at 4:39




      3




      3





      If you don't have avprobe on your system, it might exist as ffprobe.

      – Micah Elliott
      Nov 20 '14 at 21:30





      If you don't have avprobe on your system, it might exist as ffprobe.

      – Micah Elliott
      Nov 20 '14 at 21:30













      27














      I prefer using exiftool which offers me more outputs than ffmpeg. take a example (a file from iphone):



      exiftool IMG_0014.MOV >a.txt


      the output is





      ExifTool Version Number         : 8.60
      File Name : IMG_0014.MOV
      Directory : .
      File Size : 19 MB
      File Modification Date/Time : 2013:07:19 12:03:22-10:00
      File Permissions : rw-r--r--
      File Type : MOV
      MIME Type : video/quicktime
      Major Brand : Apple QuickTime (.MOV/QT)
      Minor Version : 0.0.0
      Compatible Brands : qt
      Movie Data Size : 19979709
      Movie Header Version : 0
      Modify Date : 2013:07:19 22:03:21
      Time Scale : 600
      Duration : 7.27 s
      Preferred Rate : 1
      Preferred Volume : 100.00%
      Preview Time : 0 s
      Preview Duration : 0 s
      Poster Time : 0 s
      Selection Time : 0 s
      Selection Duration : 0 s
      Current Time : 0 s
      Next Track ID : 3
      Track Header Version : 0
      Track Create Date : 2013:07:19 22:03:13
      Track Modify Date : 2013:07:19 22:03:21
      Track ID : 1
      Track Duration : 7.27 s
      Track Layer : 0
      Track Volume : 0.00%
      Image Width : 1920
      Image Height : 1080
      Graphics Mode : ditherCopy
      Op Color : 32768 32768 32768
      Compressor ID : avc1
      Source Image Width : 1920
      Source Image Height : 1080
      X Resolution : 72
      Y Resolution : 72
      Compressor Name : H.264
      Bit Depth : 24
      Video Frame Rate : 27.011
      Camera Identifier : Back
      Frame Readout Time : 28512 microseconds
      Matrix Structure : 1 0 0 0 1 0 0 0 1
      Media Header Version : 0
      Media Create Date : 2013:07:19 22:03:13
      Media Modify Date : 2013:07:19 22:03:21
      Media Time Scale : 44100
      Media Duration : 7.31 s
      Media Language Code : und
      Balance : 0
      Handler Class : Data Handler
      Handler Vendor ID : Apple
      Handler Description : Core Media Data Handler
      Audio Channels : 1
      Audio Bits Per Sample : 16
      Audio Sample Rate : 44100
      Audio Format : chan
      Model : iPhone 4S
      Software Version : 6.1.3
      Create Date : 2013:07:20 08:03:13+10:00
      Make : Apple
      Handler Type : Metadata Tags
      Make (und-AU) : Apple
      Creation Date (und-AU) : 2013:07:20 08:03:13+10:00
      Software (und-AU) : 6.1.3
      Model (und-AU) : iPhone 4S
      Avg Bitrate : 22 Mbps
      Image Size : 1920x1080
      Rotation : 90




      while if i use ffmpeg



       ffmpeg -i IMG_0014.MOV -f ffmetadata metadata.txt


      the output is



      ;FFMETADATA1
      major_brand=qt
      minor_version=0
      compatible_brands=qt
      date-eng=2013-07-20T08:03:13+1000
      encoder=6.1.3
      encoder-eng=6.1.3
      date=2013-07-20T08:03:13+1000








      share|improve this answer





















      • 3





        Unfortunately, exiftool doesn't allow to save metadata back to video files.

        – Filipe Correia
        Sep 29 '13 at 14:26






      • 1





        And how to get Program Guide (EPG) via ffmpeg?!

        – Dr.jacky
        Aug 1 '15 at 6:56











      • is there any Android version of exiftool , have searched on the website of exiftool but could not find.

        – darth_coder
        May 7 '18 at 11:18
















      27














      I prefer using exiftool which offers me more outputs than ffmpeg. take a example (a file from iphone):



      exiftool IMG_0014.MOV >a.txt


      the output is





      ExifTool Version Number         : 8.60
      File Name : IMG_0014.MOV
      Directory : .
      File Size : 19 MB
      File Modification Date/Time : 2013:07:19 12:03:22-10:00
      File Permissions : rw-r--r--
      File Type : MOV
      MIME Type : video/quicktime
      Major Brand : Apple QuickTime (.MOV/QT)
      Minor Version : 0.0.0
      Compatible Brands : qt
      Movie Data Size : 19979709
      Movie Header Version : 0
      Modify Date : 2013:07:19 22:03:21
      Time Scale : 600
      Duration : 7.27 s
      Preferred Rate : 1
      Preferred Volume : 100.00%
      Preview Time : 0 s
      Preview Duration : 0 s
      Poster Time : 0 s
      Selection Time : 0 s
      Selection Duration : 0 s
      Current Time : 0 s
      Next Track ID : 3
      Track Header Version : 0
      Track Create Date : 2013:07:19 22:03:13
      Track Modify Date : 2013:07:19 22:03:21
      Track ID : 1
      Track Duration : 7.27 s
      Track Layer : 0
      Track Volume : 0.00%
      Image Width : 1920
      Image Height : 1080
      Graphics Mode : ditherCopy
      Op Color : 32768 32768 32768
      Compressor ID : avc1
      Source Image Width : 1920
      Source Image Height : 1080
      X Resolution : 72
      Y Resolution : 72
      Compressor Name : H.264
      Bit Depth : 24
      Video Frame Rate : 27.011
      Camera Identifier : Back
      Frame Readout Time : 28512 microseconds
      Matrix Structure : 1 0 0 0 1 0 0 0 1
      Media Header Version : 0
      Media Create Date : 2013:07:19 22:03:13
      Media Modify Date : 2013:07:19 22:03:21
      Media Time Scale : 44100
      Media Duration : 7.31 s
      Media Language Code : und
      Balance : 0
      Handler Class : Data Handler
      Handler Vendor ID : Apple
      Handler Description : Core Media Data Handler
      Audio Channels : 1
      Audio Bits Per Sample : 16
      Audio Sample Rate : 44100
      Audio Format : chan
      Model : iPhone 4S
      Software Version : 6.1.3
      Create Date : 2013:07:20 08:03:13+10:00
      Make : Apple
      Handler Type : Metadata Tags
      Make (und-AU) : Apple
      Creation Date (und-AU) : 2013:07:20 08:03:13+10:00
      Software (und-AU) : 6.1.3
      Model (und-AU) : iPhone 4S
      Avg Bitrate : 22 Mbps
      Image Size : 1920x1080
      Rotation : 90




      while if i use ffmpeg



       ffmpeg -i IMG_0014.MOV -f ffmetadata metadata.txt


      the output is



      ;FFMETADATA1
      major_brand=qt
      minor_version=0
      compatible_brands=qt
      date-eng=2013-07-20T08:03:13+1000
      encoder=6.1.3
      encoder-eng=6.1.3
      date=2013-07-20T08:03:13+1000








      share|improve this answer





















      • 3





        Unfortunately, exiftool doesn't allow to save metadata back to video files.

        – Filipe Correia
        Sep 29 '13 at 14:26






      • 1





        And how to get Program Guide (EPG) via ffmpeg?!

        – Dr.jacky
        Aug 1 '15 at 6:56











      • is there any Android version of exiftool , have searched on the website of exiftool but could not find.

        – darth_coder
        May 7 '18 at 11:18














      27












      27








      27







      I prefer using exiftool which offers me more outputs than ffmpeg. take a example (a file from iphone):



      exiftool IMG_0014.MOV >a.txt


      the output is





      ExifTool Version Number         : 8.60
      File Name : IMG_0014.MOV
      Directory : .
      File Size : 19 MB
      File Modification Date/Time : 2013:07:19 12:03:22-10:00
      File Permissions : rw-r--r--
      File Type : MOV
      MIME Type : video/quicktime
      Major Brand : Apple QuickTime (.MOV/QT)
      Minor Version : 0.0.0
      Compatible Brands : qt
      Movie Data Size : 19979709
      Movie Header Version : 0
      Modify Date : 2013:07:19 22:03:21
      Time Scale : 600
      Duration : 7.27 s
      Preferred Rate : 1
      Preferred Volume : 100.00%
      Preview Time : 0 s
      Preview Duration : 0 s
      Poster Time : 0 s
      Selection Time : 0 s
      Selection Duration : 0 s
      Current Time : 0 s
      Next Track ID : 3
      Track Header Version : 0
      Track Create Date : 2013:07:19 22:03:13
      Track Modify Date : 2013:07:19 22:03:21
      Track ID : 1
      Track Duration : 7.27 s
      Track Layer : 0
      Track Volume : 0.00%
      Image Width : 1920
      Image Height : 1080
      Graphics Mode : ditherCopy
      Op Color : 32768 32768 32768
      Compressor ID : avc1
      Source Image Width : 1920
      Source Image Height : 1080
      X Resolution : 72
      Y Resolution : 72
      Compressor Name : H.264
      Bit Depth : 24
      Video Frame Rate : 27.011
      Camera Identifier : Back
      Frame Readout Time : 28512 microseconds
      Matrix Structure : 1 0 0 0 1 0 0 0 1
      Media Header Version : 0
      Media Create Date : 2013:07:19 22:03:13
      Media Modify Date : 2013:07:19 22:03:21
      Media Time Scale : 44100
      Media Duration : 7.31 s
      Media Language Code : und
      Balance : 0
      Handler Class : Data Handler
      Handler Vendor ID : Apple
      Handler Description : Core Media Data Handler
      Audio Channels : 1
      Audio Bits Per Sample : 16
      Audio Sample Rate : 44100
      Audio Format : chan
      Model : iPhone 4S
      Software Version : 6.1.3
      Create Date : 2013:07:20 08:03:13+10:00
      Make : Apple
      Handler Type : Metadata Tags
      Make (und-AU) : Apple
      Creation Date (und-AU) : 2013:07:20 08:03:13+10:00
      Software (und-AU) : 6.1.3
      Model (und-AU) : iPhone 4S
      Avg Bitrate : 22 Mbps
      Image Size : 1920x1080
      Rotation : 90




      while if i use ffmpeg



       ffmpeg -i IMG_0014.MOV -f ffmetadata metadata.txt


      the output is



      ;FFMETADATA1
      major_brand=qt
      minor_version=0
      compatible_brands=qt
      date-eng=2013-07-20T08:03:13+1000
      encoder=6.1.3
      encoder-eng=6.1.3
      date=2013-07-20T08:03:13+1000








      share|improve this answer















      I prefer using exiftool which offers me more outputs than ffmpeg. take a example (a file from iphone):



      exiftool IMG_0014.MOV >a.txt


      the output is





      ExifTool Version Number         : 8.60
      File Name : IMG_0014.MOV
      Directory : .
      File Size : 19 MB
      File Modification Date/Time : 2013:07:19 12:03:22-10:00
      File Permissions : rw-r--r--
      File Type : MOV
      MIME Type : video/quicktime
      Major Brand : Apple QuickTime (.MOV/QT)
      Minor Version : 0.0.0
      Compatible Brands : qt
      Movie Data Size : 19979709
      Movie Header Version : 0
      Modify Date : 2013:07:19 22:03:21
      Time Scale : 600
      Duration : 7.27 s
      Preferred Rate : 1
      Preferred Volume : 100.00%
      Preview Time : 0 s
      Preview Duration : 0 s
      Poster Time : 0 s
      Selection Time : 0 s
      Selection Duration : 0 s
      Current Time : 0 s
      Next Track ID : 3
      Track Header Version : 0
      Track Create Date : 2013:07:19 22:03:13
      Track Modify Date : 2013:07:19 22:03:21
      Track ID : 1
      Track Duration : 7.27 s
      Track Layer : 0
      Track Volume : 0.00%
      Image Width : 1920
      Image Height : 1080
      Graphics Mode : ditherCopy
      Op Color : 32768 32768 32768
      Compressor ID : avc1
      Source Image Width : 1920
      Source Image Height : 1080
      X Resolution : 72
      Y Resolution : 72
      Compressor Name : H.264
      Bit Depth : 24
      Video Frame Rate : 27.011
      Camera Identifier : Back
      Frame Readout Time : 28512 microseconds
      Matrix Structure : 1 0 0 0 1 0 0 0 1
      Media Header Version : 0
      Media Create Date : 2013:07:19 22:03:13
      Media Modify Date : 2013:07:19 22:03:21
      Media Time Scale : 44100
      Media Duration : 7.31 s
      Media Language Code : und
      Balance : 0
      Handler Class : Data Handler
      Handler Vendor ID : Apple
      Handler Description : Core Media Data Handler
      Audio Channels : 1
      Audio Bits Per Sample : 16
      Audio Sample Rate : 44100
      Audio Format : chan
      Model : iPhone 4S
      Software Version : 6.1.3
      Create Date : 2013:07:20 08:03:13+10:00
      Make : Apple
      Handler Type : Metadata Tags
      Make (und-AU) : Apple
      Creation Date (und-AU) : 2013:07:20 08:03:13+10:00
      Software (und-AU) : 6.1.3
      Model (und-AU) : iPhone 4S
      Avg Bitrate : 22 Mbps
      Image Size : 1920x1080
      Rotation : 90




      while if i use ffmpeg



       ffmpeg -i IMG_0014.MOV -f ffmetadata metadata.txt


      the output is



      ;FFMETADATA1
      major_brand=qt
      minor_version=0
      compatible_brands=qt
      date-eng=2013-07-20T08:03:13+1000
      encoder=6.1.3
      encoder-eng=6.1.3
      date=2013-07-20T08:03:13+1000









      share|improve this answer














      share|improve this answer



      share|improve this answer








      edited Feb 4 '14 at 16:33









      SSteve

      7,75533357




      7,75533357










      answered Sep 6 '13 at 12:46









      Chenming ZhangChenming Zhang

      1,22721828




      1,22721828








      • 3





        Unfortunately, exiftool doesn't allow to save metadata back to video files.

        – Filipe Correia
        Sep 29 '13 at 14:26






      • 1





        And how to get Program Guide (EPG) via ffmpeg?!

        – Dr.jacky
        Aug 1 '15 at 6:56











      • is there any Android version of exiftool , have searched on the website of exiftool but could not find.

        – darth_coder
        May 7 '18 at 11:18














      • 3





        Unfortunately, exiftool doesn't allow to save metadata back to video files.

        – Filipe Correia
        Sep 29 '13 at 14:26






      • 1





        And how to get Program Guide (EPG) via ffmpeg?!

        – Dr.jacky
        Aug 1 '15 at 6:56











      • is there any Android version of exiftool , have searched on the website of exiftool but could not find.

        – darth_coder
        May 7 '18 at 11:18








      3




      3





      Unfortunately, exiftool doesn't allow to save metadata back to video files.

      – Filipe Correia
      Sep 29 '13 at 14:26





      Unfortunately, exiftool doesn't allow to save metadata back to video files.

      – Filipe Correia
      Sep 29 '13 at 14:26




      1




      1





      And how to get Program Guide (EPG) via ffmpeg?!

      – Dr.jacky
      Aug 1 '15 at 6:56





      And how to get Program Guide (EPG) via ffmpeg?!

      – Dr.jacky
      Aug 1 '15 at 6:56













      is there any Android version of exiftool , have searched on the website of exiftool but could not find.

      – darth_coder
      May 7 '18 at 11:18





      is there any Android version of exiftool , have searched on the website of exiftool but could not find.

      – darth_coder
      May 7 '18 at 11:18











      9














      You can use ffprobe (which comes with ffmpeg) for gathering information about multimedia files. For information about overall content of a multimedia file use



      ffprobe -show_streams -show_format DV06xx.avi 


      and for information about each single frame in a video file use



      ffprobe -show_frames DV06xx.avi 


      However, ffprobedoes not retrieve as much information as my favorite tool, Mediainfo, does, e.g., 'ffprobe' does not display the time code of first frame of the video (although the man page claims otherwise) or the recording date.



      If you run mediainfo on the command line, you can even request output in XML format:



      mediainfo --OUTPUT=XML DV06xx.avi 


      In my example the output is:



      <?xml version="1.0" encoding="UTF-8"?>
      <Mediainfo version="0.7.63">
      <File>
      <track type="General">
      <Complete_name>DV06xx.avi</Complete_name>
      <Format>AVI</Format>
      <Format_Info>Audio Video Interleave</Format_Info>
      <Commercial_name>DVCPRO</Commercial_name>
      <Format_profile>OpenDML</Format_profile>
      <File_size>13.3 GiB</File_size>
      <Duration>1h 2mn</Duration>
      <Overall_bit_rate_mode>Constant</Overall_bit_rate_mode>
      <Overall_bit_rate>30.5 Mbps</Overall_bit_rate>
      <Recorded_date>2004-03-28 15:42:35.000</Recorded_date>
      </track>

      <track type="Video">
      <ID>0</ID>
      <Format>DV</Format>
      <Commercial_name>DVCPRO</Commercial_name>
      <Codec_ID>dvsd</Codec_ID>
      <Codec_ID_Hint>Sony</Codec_ID_Hint>
      <Duration>1h 2mn</Duration>
      <Bit_rate_mode>Constant</Bit_rate_mode>
      <Bit_rate>24.4 Mbps</Bit_rate>
      <Encoded_bit_rate>28.8 Mbps</Encoded_bit_rate>
      <Width>720 pixels</Width>
      <Height>576 pixels</Height>
      <Display_aspect_ratio>4:3</Display_aspect_ratio>
      <Frame_rate_mode>Constant</Frame_rate_mode>
      <Frame_rate>25.000 fps</Frame_rate>
      <Standard>PAL</Standard>
      <Color_space>YUV</Color_space>
      <Chroma_subsampling>4:2:0</Chroma_subsampling>
      <Bit_depth>8 bits</Bit_depth>
      <Scan_type>Interlaced</Scan_type>
      <Scan_order>Bottom Field First</Scan_order>
      <Compression_mode>Lossy</Compression_mode>
      <Bits__Pixel_Frame_>2.357</Bits__Pixel_Frame_>
      <Time_code_of_first_frame>00:00:01:10</Time_code_of_first_frame>
      <Time_code_source>Subcode time code</Time_code_source>
      <Stream_size>12.6 GiB (94%)</Stream_size>
      <Encoding_settings>ae mode=full automatic / wb mode=automatic / white balance= / fcm=manual focus</Encoding_settings>
      </track>

      <track type="Audio">
      <ID>1</ID>
      <Format>PCM</Format>
      <Format_settings__Endianness>Little</Format_settings__Endianness>
      <Format_settings__Sign>Signed</Format_settings__Sign>
      <Codec_ID>1</Codec_ID>
      <Duration>1h 2mn</Duration>
      <Bit_rate_mode>Constant</Bit_rate_mode>
      <Bit_rate>1 536 Kbps</Bit_rate>
      <Channel_s_>2 channels</Channel_s_>
      <Sampling_rate>48.0 KHz</Sampling_rate>
      <Bit_depth>16 bits</Bit_depth>
      <Stream_size>688 MiB (5%)</Stream_size>
      <Alignment>Aligned on interleaves</Alignment>
      <Interleave__duration>40 ms (1.00 video frame)</Interleave__duration>
      <Interleave__preload_duration>40 ms</Interleave__preload_duration>
      </track>

      </File>
      </Mediainfo>


      Adding the optional parameter -f will produce even more detailed information.






      share|improve this answer





















      • 1





        And how to get Program Guide (EPG) via ffmpeg?!

        – Dr.jacky
        Aug 1 '15 at 6:56











      • what mediainfo exports are not necessarily the "metadata" which ffmpeg shows, like title, artist, track, etc.

        – Meow
        Aug 7 '15 at 3:39
















      9














      You can use ffprobe (which comes with ffmpeg) for gathering information about multimedia files. For information about overall content of a multimedia file use



      ffprobe -show_streams -show_format DV06xx.avi 


      and for information about each single frame in a video file use



      ffprobe -show_frames DV06xx.avi 


      However, ffprobedoes not retrieve as much information as my favorite tool, Mediainfo, does, e.g., 'ffprobe' does not display the time code of first frame of the video (although the man page claims otherwise) or the recording date.



      If you run mediainfo on the command line, you can even request output in XML format:



      mediainfo --OUTPUT=XML DV06xx.avi 


      In my example the output is:



      <?xml version="1.0" encoding="UTF-8"?>
      <Mediainfo version="0.7.63">
      <File>
      <track type="General">
      <Complete_name>DV06xx.avi</Complete_name>
      <Format>AVI</Format>
      <Format_Info>Audio Video Interleave</Format_Info>
      <Commercial_name>DVCPRO</Commercial_name>
      <Format_profile>OpenDML</Format_profile>
      <File_size>13.3 GiB</File_size>
      <Duration>1h 2mn</Duration>
      <Overall_bit_rate_mode>Constant</Overall_bit_rate_mode>
      <Overall_bit_rate>30.5 Mbps</Overall_bit_rate>
      <Recorded_date>2004-03-28 15:42:35.000</Recorded_date>
      </track>

      <track type="Video">
      <ID>0</ID>
      <Format>DV</Format>
      <Commercial_name>DVCPRO</Commercial_name>
      <Codec_ID>dvsd</Codec_ID>
      <Codec_ID_Hint>Sony</Codec_ID_Hint>
      <Duration>1h 2mn</Duration>
      <Bit_rate_mode>Constant</Bit_rate_mode>
      <Bit_rate>24.4 Mbps</Bit_rate>
      <Encoded_bit_rate>28.8 Mbps</Encoded_bit_rate>
      <Width>720 pixels</Width>
      <Height>576 pixels</Height>
      <Display_aspect_ratio>4:3</Display_aspect_ratio>
      <Frame_rate_mode>Constant</Frame_rate_mode>
      <Frame_rate>25.000 fps</Frame_rate>
      <Standard>PAL</Standard>
      <Color_space>YUV</Color_space>
      <Chroma_subsampling>4:2:0</Chroma_subsampling>
      <Bit_depth>8 bits</Bit_depth>
      <Scan_type>Interlaced</Scan_type>
      <Scan_order>Bottom Field First</Scan_order>
      <Compression_mode>Lossy</Compression_mode>
      <Bits__Pixel_Frame_>2.357</Bits__Pixel_Frame_>
      <Time_code_of_first_frame>00:00:01:10</Time_code_of_first_frame>
      <Time_code_source>Subcode time code</Time_code_source>
      <Stream_size>12.6 GiB (94%)</Stream_size>
      <Encoding_settings>ae mode=full automatic / wb mode=automatic / white balance= / fcm=manual focus</Encoding_settings>
      </track>

      <track type="Audio">
      <ID>1</ID>
      <Format>PCM</Format>
      <Format_settings__Endianness>Little</Format_settings__Endianness>
      <Format_settings__Sign>Signed</Format_settings__Sign>
      <Codec_ID>1</Codec_ID>
      <Duration>1h 2mn</Duration>
      <Bit_rate_mode>Constant</Bit_rate_mode>
      <Bit_rate>1 536 Kbps</Bit_rate>
      <Channel_s_>2 channels</Channel_s_>
      <Sampling_rate>48.0 KHz</Sampling_rate>
      <Bit_depth>16 bits</Bit_depth>
      <Stream_size>688 MiB (5%)</Stream_size>
      <Alignment>Aligned on interleaves</Alignment>
      <Interleave__duration>40 ms (1.00 video frame)</Interleave__duration>
      <Interleave__preload_duration>40 ms</Interleave__preload_duration>
      </track>

      </File>
      </Mediainfo>


      Adding the optional parameter -f will produce even more detailed information.






      share|improve this answer





















      • 1





        And how to get Program Guide (EPG) via ffmpeg?!

        – Dr.jacky
        Aug 1 '15 at 6:56











      • what mediainfo exports are not necessarily the "metadata" which ffmpeg shows, like title, artist, track, etc.

        – Meow
        Aug 7 '15 at 3:39














      9












      9








      9







      You can use ffprobe (which comes with ffmpeg) for gathering information about multimedia files. For information about overall content of a multimedia file use



      ffprobe -show_streams -show_format DV06xx.avi 


      and for information about each single frame in a video file use



      ffprobe -show_frames DV06xx.avi 


      However, ffprobedoes not retrieve as much information as my favorite tool, Mediainfo, does, e.g., 'ffprobe' does not display the time code of first frame of the video (although the man page claims otherwise) or the recording date.



      If you run mediainfo on the command line, you can even request output in XML format:



      mediainfo --OUTPUT=XML DV06xx.avi 


      In my example the output is:



      <?xml version="1.0" encoding="UTF-8"?>
      <Mediainfo version="0.7.63">
      <File>
      <track type="General">
      <Complete_name>DV06xx.avi</Complete_name>
      <Format>AVI</Format>
      <Format_Info>Audio Video Interleave</Format_Info>
      <Commercial_name>DVCPRO</Commercial_name>
      <Format_profile>OpenDML</Format_profile>
      <File_size>13.3 GiB</File_size>
      <Duration>1h 2mn</Duration>
      <Overall_bit_rate_mode>Constant</Overall_bit_rate_mode>
      <Overall_bit_rate>30.5 Mbps</Overall_bit_rate>
      <Recorded_date>2004-03-28 15:42:35.000</Recorded_date>
      </track>

      <track type="Video">
      <ID>0</ID>
      <Format>DV</Format>
      <Commercial_name>DVCPRO</Commercial_name>
      <Codec_ID>dvsd</Codec_ID>
      <Codec_ID_Hint>Sony</Codec_ID_Hint>
      <Duration>1h 2mn</Duration>
      <Bit_rate_mode>Constant</Bit_rate_mode>
      <Bit_rate>24.4 Mbps</Bit_rate>
      <Encoded_bit_rate>28.8 Mbps</Encoded_bit_rate>
      <Width>720 pixels</Width>
      <Height>576 pixels</Height>
      <Display_aspect_ratio>4:3</Display_aspect_ratio>
      <Frame_rate_mode>Constant</Frame_rate_mode>
      <Frame_rate>25.000 fps</Frame_rate>
      <Standard>PAL</Standard>
      <Color_space>YUV</Color_space>
      <Chroma_subsampling>4:2:0</Chroma_subsampling>
      <Bit_depth>8 bits</Bit_depth>
      <Scan_type>Interlaced</Scan_type>
      <Scan_order>Bottom Field First</Scan_order>
      <Compression_mode>Lossy</Compression_mode>
      <Bits__Pixel_Frame_>2.357</Bits__Pixel_Frame_>
      <Time_code_of_first_frame>00:00:01:10</Time_code_of_first_frame>
      <Time_code_source>Subcode time code</Time_code_source>
      <Stream_size>12.6 GiB (94%)</Stream_size>
      <Encoding_settings>ae mode=full automatic / wb mode=automatic / white balance= / fcm=manual focus</Encoding_settings>
      </track>

      <track type="Audio">
      <ID>1</ID>
      <Format>PCM</Format>
      <Format_settings__Endianness>Little</Format_settings__Endianness>
      <Format_settings__Sign>Signed</Format_settings__Sign>
      <Codec_ID>1</Codec_ID>
      <Duration>1h 2mn</Duration>
      <Bit_rate_mode>Constant</Bit_rate_mode>
      <Bit_rate>1 536 Kbps</Bit_rate>
      <Channel_s_>2 channels</Channel_s_>
      <Sampling_rate>48.0 KHz</Sampling_rate>
      <Bit_depth>16 bits</Bit_depth>
      <Stream_size>688 MiB (5%)</Stream_size>
      <Alignment>Aligned on interleaves</Alignment>
      <Interleave__duration>40 ms (1.00 video frame)</Interleave__duration>
      <Interleave__preload_duration>40 ms</Interleave__preload_duration>
      </track>

      </File>
      </Mediainfo>


      Adding the optional parameter -f will produce even more detailed information.






      share|improve this answer















      You can use ffprobe (which comes with ffmpeg) for gathering information about multimedia files. For information about overall content of a multimedia file use



      ffprobe -show_streams -show_format DV06xx.avi 


      and for information about each single frame in a video file use



      ffprobe -show_frames DV06xx.avi 


      However, ffprobedoes not retrieve as much information as my favorite tool, Mediainfo, does, e.g., 'ffprobe' does not display the time code of first frame of the video (although the man page claims otherwise) or the recording date.



      If you run mediainfo on the command line, you can even request output in XML format:



      mediainfo --OUTPUT=XML DV06xx.avi 


      In my example the output is:



      <?xml version="1.0" encoding="UTF-8"?>
      <Mediainfo version="0.7.63">
      <File>
      <track type="General">
      <Complete_name>DV06xx.avi</Complete_name>
      <Format>AVI</Format>
      <Format_Info>Audio Video Interleave</Format_Info>
      <Commercial_name>DVCPRO</Commercial_name>
      <Format_profile>OpenDML</Format_profile>
      <File_size>13.3 GiB</File_size>
      <Duration>1h 2mn</Duration>
      <Overall_bit_rate_mode>Constant</Overall_bit_rate_mode>
      <Overall_bit_rate>30.5 Mbps</Overall_bit_rate>
      <Recorded_date>2004-03-28 15:42:35.000</Recorded_date>
      </track>

      <track type="Video">
      <ID>0</ID>
      <Format>DV</Format>
      <Commercial_name>DVCPRO</Commercial_name>
      <Codec_ID>dvsd</Codec_ID>
      <Codec_ID_Hint>Sony</Codec_ID_Hint>
      <Duration>1h 2mn</Duration>
      <Bit_rate_mode>Constant</Bit_rate_mode>
      <Bit_rate>24.4 Mbps</Bit_rate>
      <Encoded_bit_rate>28.8 Mbps</Encoded_bit_rate>
      <Width>720 pixels</Width>
      <Height>576 pixels</Height>
      <Display_aspect_ratio>4:3</Display_aspect_ratio>
      <Frame_rate_mode>Constant</Frame_rate_mode>
      <Frame_rate>25.000 fps</Frame_rate>
      <Standard>PAL</Standard>
      <Color_space>YUV</Color_space>
      <Chroma_subsampling>4:2:0</Chroma_subsampling>
      <Bit_depth>8 bits</Bit_depth>
      <Scan_type>Interlaced</Scan_type>
      <Scan_order>Bottom Field First</Scan_order>
      <Compression_mode>Lossy</Compression_mode>
      <Bits__Pixel_Frame_>2.357</Bits__Pixel_Frame_>
      <Time_code_of_first_frame>00:00:01:10</Time_code_of_first_frame>
      <Time_code_source>Subcode time code</Time_code_source>
      <Stream_size>12.6 GiB (94%)</Stream_size>
      <Encoding_settings>ae mode=full automatic / wb mode=automatic / white balance= / fcm=manual focus</Encoding_settings>
      </track>

      <track type="Audio">
      <ID>1</ID>
      <Format>PCM</Format>
      <Format_settings__Endianness>Little</Format_settings__Endianness>
      <Format_settings__Sign>Signed</Format_settings__Sign>
      <Codec_ID>1</Codec_ID>
      <Duration>1h 2mn</Duration>
      <Bit_rate_mode>Constant</Bit_rate_mode>
      <Bit_rate>1 536 Kbps</Bit_rate>
      <Channel_s_>2 channels</Channel_s_>
      <Sampling_rate>48.0 KHz</Sampling_rate>
      <Bit_depth>16 bits</Bit_depth>
      <Stream_size>688 MiB (5%)</Stream_size>
      <Alignment>Aligned on interleaves</Alignment>
      <Interleave__duration>40 ms (1.00 video frame)</Interleave__duration>
      <Interleave__preload_duration>40 ms</Interleave__preload_duration>
      </track>

      </File>
      </Mediainfo>


      Adding the optional parameter -f will produce even more detailed information.







      share|improve this answer














      share|improve this answer



      share|improve this answer








      edited Mar 3 '15 at 21:48

























      answered Mar 3 '15 at 20:56









      Daniel K.Daniel K.

      400310




      400310








      • 1





        And how to get Program Guide (EPG) via ffmpeg?!

        – Dr.jacky
        Aug 1 '15 at 6:56











      • what mediainfo exports are not necessarily the "metadata" which ffmpeg shows, like title, artist, track, etc.

        – Meow
        Aug 7 '15 at 3:39














      • 1





        And how to get Program Guide (EPG) via ffmpeg?!

        – Dr.jacky
        Aug 1 '15 at 6:56











      • what mediainfo exports are not necessarily the "metadata" which ffmpeg shows, like title, artist, track, etc.

        – Meow
        Aug 7 '15 at 3:39








      1




      1





      And how to get Program Guide (EPG) via ffmpeg?!

      – Dr.jacky
      Aug 1 '15 at 6:56





      And how to get Program Guide (EPG) via ffmpeg?!

      – Dr.jacky
      Aug 1 '15 at 6:56













      what mediainfo exports are not necessarily the "metadata" which ffmpeg shows, like title, artist, track, etc.

      – Meow
      Aug 7 '15 at 3:39





      what mediainfo exports are not necessarily the "metadata" which ffmpeg shows, like title, artist, track, etc.

      – Meow
      Aug 7 '15 at 3:39











      0














      There's also atomicparsley for MPEG-4 files.






      share|improve this answer




























        0














        There's also atomicparsley for MPEG-4 files.






        share|improve this answer


























          0












          0








          0







          There's also atomicparsley for MPEG-4 files.






          share|improve this answer













          There's also atomicparsley for MPEG-4 files.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Feb 20 '14 at 6:40









          MemmingMemming

          1,3391025




          1,3391025























              0














              You can set the metadata on video, below mention set album_artist



              ffmpeg -i source.mp4 -metadata album_artist='stack developer' -y -r 1 -acodec copy -vcodec copy destination.mp4


              And retreive the meta tag as:



              ffmpeg -i destination.mp4


              Use this on command line .






              share|improve this answer




























                0














                You can set the metadata on video, below mention set album_artist



                ffmpeg -i source.mp4 -metadata album_artist='stack developer' -y -r 1 -acodec copy -vcodec copy destination.mp4


                And retreive the meta tag as:



                ffmpeg -i destination.mp4


                Use this on command line .






                share|improve this answer


























                  0












                  0








                  0







                  You can set the metadata on video, below mention set album_artist



                  ffmpeg -i source.mp4 -metadata album_artist='stack developer' -y -r 1 -acodec copy -vcodec copy destination.mp4


                  And retreive the meta tag as:



                  ffmpeg -i destination.mp4


                  Use this on command line .






                  share|improve this answer













                  You can set the metadata on video, below mention set album_artist



                  ffmpeg -i source.mp4 -metadata album_artist='stack developer' -y -r 1 -acodec copy -vcodec copy destination.mp4


                  And retreive the meta tag as:



                  ffmpeg -i destination.mp4


                  Use this on command line .







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Sep 6 '18 at 7:12









                  Pankaj ChauhanPankaj Chauhan

                  49548




                  49548






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Stack Overflow!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f9464617%2fretrieving-and-saving-media-metadata-using-ffmpeg%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Florida Star v. B. J. F.

                      Danny Elfman

                      Retrieve a Users Dashboard in Tumblr with R and TumblR. Oauth Issues