Skip to content

Instantly share code, notes, and snippets.

@stain
Created August 12, 2019 11:50
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stain/0663ffbf55392d989652a914b66dac49 to your computer and use it in GitHub Desktop.
Save stain/0663ffbf55392d989652a914b66dac49 to your computer and use it in GitHub Desktop.
(base) stain@biggie:~/Pictures/whatsapp$ mediainfo VID-20171005-WA0000.mp4
General
Complete name : VID-20171005-WA0000.mp4
Format : MPEG-4
Format profile : Base Media / Version 2
Codec ID : mp42 (mp41/mp42/isom)
File size : 3.27 MiB
Duration : 3 min 22 s
Overall bit rate : 135 kb/s
Encoded date : UTC 2017-08-13 16:03:30
Tagged date : UTC 2017-08-13 16:03:31
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : Baseline@L1.3
Format settings : 1 Ref Frames
Format settings, CABAC : No
Format settings, ReFrames : 1 frame
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 3 min 22 s
Source duration : 3 min 22 s
Bit rate : 36.9 kb/s
Width : 320 pixels
Height : 240 pixels
Display aspect ratio : 4:3
Frame rate mode : Constant
Frame rate : 24.000 FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.020
Stream size : 911 KiB (27%)
Source stream size : 911 KiB (27%)
Title : Core Media Video
Writing library : x264 core 129
Encoding settings : cabac=0 / ref=1 / deblock=1:0:0 / analyse=0x1:0x1 / me=dia / subme=1 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=0 / 8x8dct=0 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=0 / threads=1 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=0 / weightp=0 / keyint=250 / keyint_min=24 / scenecut=40 / intra_refresh=0 / rc=crf / mbtree=0 / crf=29.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Encoded date : UTC 2017-08-13 16:03:30
Tagged date : UTC 2017-08-13 16:03:31
Audio
ID : 2
Format : AAC
Format/Info : Advanced Audio Codec
Format profile : LC
Codec ID : mp4a-40-2
Duration : 3 min 22 s
Source duration : 3 min 22 s
Bit rate mode : Constant
Bit rate : 96.0 kb/s
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 44.1 kHz
Frame rate : 43.066 FPS (1024 SPF)
Compression mode : Lossy
Stream size : 2.32 MiB (71%)
Source stream size : 2.32 MiB (71%)
Title : Core Media Audio
Encoded date : UTC 2017-08-13 16:03:30
Tagged date : UTC 2017-08-13 16:03:31
@stain
Copy link
Author

stain commented Aug 12, 2019

MEDIAINFO(1) User Commands MEDIAINFO(1)

NAME
MediaInfo - command line utility to display information about audio/video files

   MediaInfo-Gui - graphical utility to display information about audio/video files

SYNOPSIS
mediainfo [-Options...] FileName1 [Filename2...]
mediainfo --Inform=FMT FileName
mediainfo-gui [-Options...] FileName1 [Filename2...]
mediainfo-gui --Inform=FMT FileName

DESCRIPTION
MediaInfo supplies technical and tag information about a video or audio file

   What information can I get from MediaInfo?

   - General: title, author, director, album, track number, date, duration...
   - Video: codec, aspect, fps, bitrate...
   - Audio: codec, sample rate, channels, language, bitrate...
   - Text: language of subtitle
   - Chapters: number of chapters, list of chapters

   What format does MediaInfo support?

   - Video: MKV, OGM, AVI, DivX, WMV, QuickTime, Real, MPEG-1, MPEG-2, MPEG-4, DVD (VOB)...
   - Video Codecs: DivX, XviD, MSMPEG4, ASP, H.264, AVC...
   - Audio: OGG, MP3, WAV, RA, AC3, DTS, AAC, M4A, AU, AIFF...
   - Subtitles: SRT, SSA, ASS, SAMI...

   What can I do with it?

   - Read many video and audio file formats
   - View information in different formats (text, sheet, tree, HTML...)
   - Customise these viewing formats
   - Export information as text, CSV, HTML...
   - Graphical Interface, Command Line, or library versions available

(..)

@stain
Copy link
Author

stain commented Aug 12, 2019

(base) stain@biggie:~/Pictures/whatsapp$ mediainfo --Info-Parameters | grep -i Date
Status : bit field (0=IsAccepted, 1=IsFilled, 2=IsUpdated, 3=IsFinished)
Released_Date : The date/year that the item was released.
Original/Released_Date : The date/year that the item was originaly released.
Recorded_Date : The time/date/year that the recording began.
Encoded_Date : The time/date/year that the encoding of this item was completed began.
Tagged_Date : The time/date/year that the tags were done for this item.
Written_Date : The time/date/year that the composition of the music/script began.
Mastered_Date : The time/date/year that the item was tranfered to a digitalmedium.
File_Created_Date : The time that the file was created on the file system
File_Created_Date_Local : The time that the file was created on the file system (Warning: this field depends of local configuration, do not use it in an international database)
File_Modified_Date : The time that the file was modified on the file system
File_Modified_Date_Local : The time that the file was modified on the file system (Warning: this field depends of local configuration, do not use it in an international database)
Encoded_Application/Strin : Name of the software package used to create the file, such as Microsoft WaveEdit, trying to have the format 'CompanyName ProductName (OperatingSystem) Version (Date)'
Encoded_Library/String : Software used to create the file, trying to have the format 'CompanyName ProductName (OperatingSystem) Version (Date)'
Encoded_Library_Date : Release date of software
Added_Date : Date/year the item was added to the owners collection
Played_First_Date : The date, the owner first played an item
Played_Last_Date : The date, the owner last played an item
Status : bit field (0=IsAccepted, 1=IsFilled, 2=IsUpdated, 3=IsFinished)
Encoded_Application/Strin : Name of the software package used to create the file, such as Microsoft WaveEdit, trying to have the format 'CompanyName ProductName (OperatingSystem) Version (Date)'
Encoded_Library/String : Software used to create the file, trying to have the format 'CompanyName ProductName (OperatingSystem) Version (Date)'
Encoded_Library_Date : Release date of software
Encoded_Date : UTC time that the encoding of this item was completed began.
Tagged_Date : UTC time that the tags were done for this item.
Status : bit field (0=IsAccepted, 1=IsFilled, 2=IsUpdated, 3=IsFinished)
Encoded_Application/Strin : Name of the software package used to create the file, such as Microsoft WaveEdit, trying to have the format 'CompanyName ProductName (OperatingSystem) Version (Date)'
Encoded_Library/String : Software used to create the file, trying to have the format 'CompanyName ProductName (OperatingSystem) Version (Date)'
Encoded_Library_Date : Release date of software
Encoded_Date : UTC time that the encoding of this item was completed began.
Tagged_Date : UTC time that the tags were done for this item.
Status : bit field (0=IsAccepted, 1=IsFilled, 2=IsUpdated, 3=IsFinished)
Encoded_Application/Strin : Name of the software package used to create the file, such as Microsoft WaveEdit, trying to have the format 'CompanyName ProductName (OperatingSystem) Version (Date)'
Encoded_Library/String : Software used to create the file, trying to have the format 'CompanyName ProductName (OperatingSystem) Version (Date)'
Encoded_Library_Date : Release date of software
Encoded_Date : The time that the encoding of this item was completed began.
Tagged_Date : The time that the tags were done for this item.
Status : bit field (0=IsAccepted, 1=IsFilled, 2=IsUpdated, 3=IsFinished)
Status : bit field (0=IsAccepted, 1=IsFilled, 2=IsUpdated, 3=IsFinished)
Encoded_Library_Date : Release date of software
Encoded_Date : The time that the encoding of this item was completed began.
Tagged_Date : The time that the tags were done for this item.
Status : bit field (0=IsAccepted, 1=IsFilled, 2=IsUpdated, 3=IsFinished)

@stain
Copy link
Author

stain commented Aug 12, 2019

Here is how well Tagged_Date worked on random collection of Whatsapp videoes:

(base) stain@biggie:~/Pictures/whatsapp$ for a in *mp4 ; do echo $a `mediainfo --Inform="General;%Tagged_Date%" $a`
> done
VID-20160416-WA0007.mp4
VID-20160426-WA0000.mp4 UTC 2016-03-30 20:44:17
VID-20160507-WA0000.mp4
VID-20160508-WA0001.mp4 UTC 2016-05-08 12:51:30
VID-20160604-WA0000.mp4
VID-20160619-WA0001.mp4
VID-20160619-WA0002.mp4
VID-20160621-WA0000.mp4
VID-20160625-WA0000.mp4
VID-20160713-WA0001.mp4 UTC 2016-07-13 02:22:42
VID-20160715-WA0017.mp4 UTC 2016-07-15 21:32:19
VID-20160731-WA0000.mp4
VID-20160731-WA0001.mp4
VID-20160827-WA0003.mp4
VID-20160930-WA0001.mp4 UTC 2016-09-25 03:44:04
VID-20161015-WA0003.mp4 UTC 2016-08-15 18:02:35
VID-20161024-WA0000.mp4 UTC 2016-07-02 20:49:52
VID-20161028-WA0020.mp4 UTC 2016-10-28 20:24:35
VID-20161028-WA0022.mp4 UTC 2016-10-28 20:26:18
VID-20161101-WA0000.mp4 UTC 2016-10-28 11:46:34
VID-20161104-WA0001.mp4 UTC 2016-11-04 03:36:50
VID-20161105-WA0000.mp4
VID-20161106-WA0000.mp4
VID-20161107-WA0005.mp4 UTC 2016-11-07 20:33:49
VID-20161110-WA0001.mp4
VID-20161113-WA0000.mp4
VID-20161113-WA0001.mp4
VID-20161113-WA0003.mp4
VID-20161113-WA0004.mp4
VID-20161113-WA0007.mp4 UTC 2015-12-29 23:19:42
VID-20161114-WA0001.mp4
VID-20161207-WA0000.mp4
VID-20161208-WA0008.mp4 UTC 2016-12-08 21:44:58
VID-20161209-WA0000.mp4 UTC 2016-12-08 02:07:26
VID-20161213-WA0001.mp4 UTC 2014-12-26 17:25:56
VID-20161217-WA0000.mp4
VID-20161217-WA0001.mp4
VID-20161218-WA0000.mp4 UTC 2015-07-28 21:24:49
VID-20161219-WA0000.mp4 UTC 2014-12-06 15:32:30
VID-20161219-WA0001.mp4 UTC 2015-12-15 16:45:33
VID-20161220-WA0001.mp4
VID-20161224-WA0004.mp4
VID-20161224-WA0021.mp4 UTC 2015-12-21 16:10:49
VID-20161225-WA0006.mp4
VID-20161225-WA0007.mp4
VID-20161225-WA0012.mp4
VID-20161225-WA0013.mp4
VID-20161231-WA0001.mp4 UTC 2016-12-31 12:26:44
VID-20161231-WA0003.mp4 UTC 2015-12-31 14:58:05
VID-20161231-WA0004.mp4 UTC 2016-12-06 02:45:53
VID-20161231-WA0006.mp4 UTC 2016-12-29 19:49:42
VID-20161231-WA0011.mp4 UTC 2016-12-26 02:06:22
VID-20161231-WA0012.mp4
VID-20170101-WA0001.mp4
VID-20170107-WA0000.mp4

The empty ones don't seem to have any metadata beyond format:

(base) stain@biggie:~/Pictures/whatsapp$ mediainfo VID-20180302-WA0003.mp4
General
Complete name                            : VID-20180302-WA0003.mp4
Format                                   : MPEG-4
Format profile                           : Base Media / Version 2
Codec ID                                 : mp42 (mp42/isom)
File size                                : 10.4 MiB
Duration                                 : 1 min 19 s
Overall bit rate                         : 1 099 kb/s

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 1 min 19 s
Bit rate                                 : 941 kb/s
Width                                    : 640 pixels
Height                                   : 352 pixels
Display aspect ratio                     : 16:9
Rotation                                 : 90°
Frame rate mode                          : Constant
Frame rate                               : 26.028 FPS
Bits/(Pixel*Frame)                       : 0.160
Stream size                              : 8.89 MiB (86%)

Audio
ID                                       : 2
Format                                   : AAC
Format/Info                              : Advanced Audio Codec
Format profile                           : LC
Codec ID                                 : mp4a-40-2
Duration                                 : 1 min 19 s
Duration_FirstFrame                      : 7 ms
Bit rate mode                            : Constant
Bit rate                                 : 156 kb/s
Channel(s)                               : 2 channels
Channel positions                        : Front: L R
Sampling rate                            : 48.0 kHz
Frame rate                               : 46.875 FPS (1024 SPF)
Compression mode                         : Lossy
Stream size                              : 1.48 MiB (14%)


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment