sbraz / pymediainfo

A Python wrapper around the MediaInfo library
https://pymediainfo.readthedocs.org/
Other
312 stars 57 forks source link

Difference Between output="" and GUI Text view? #98

Closed lostname420 closed 4 years ago

lostname420 commented 4 years ago

Is there a way to get a concise string output that matches the "Text" view in the GUI version of the program? There are repeated keys in the pymdeiainfo output along with additional empty lines.

GUI Text Output

General CompleteName : C:\Users\REMOVED\Python Apps\My Progs\test_folder\test.test-test.mp4 Format/String : MPEG-4 Format_Profile : Base Media / Version 2 CodecID/String : mp42 (mp42/mp41) FileSize/String : 83.1 MiB Duration/String : 1mn 13s OverallBitRate_Mode/String : VBR OverallBitRate/String : 9540 Kbps Encoded_Date : UTC 2020-03-11 18:48:56 Tagged_Date : UTC 2020-03-11 18:51:07 TIM : 00:00:00:00 TSC : 24000 TSZ : 1001

Video ID/String : 1 Format/String : AVC Format/Info : Advanced Video Codec Format_Profile : Main@L5.1 Format_Settings : CABAC / 2 Ref Frames Format_Settings_CABAC/String : Yes Format_Settings_RefFrames/String : 2 frame CodecID : avc1 CodecID/Info : Advanced Video Coding Duration/String : 1mn 13s BitRate_Mode/String : VBR BitRate/String : 9213 Kbps BitRate_Maximum/String : 768 Kbps Width/String : 3840 pixel Height/String : 2160 pixel DisplayAspectRatio/String : 16:9 FrameRate_Mode/String : CFR FrameRate/String : 23.976 (24000/1001) fps ColorSpace : YUV ChromaSubsampling/String : 4:2:0 BitDepth/String : 8 bit ScanType/String : Progressive Bits-(Pixel*Frame) : 0.046 StreamSize/String : 80.3 MiB (97%) Language/String : en Encoded_Date : UTC 2020-03-11 18:48:57 Tagged_Date : UTC 2020-03-11 18:48:57 colour_range : Limited colour_primaries : BT.709 transfer_characteristics : BT.709 matrix_coefficients : BT.709 CodecConfigurationBox : avcC

Audio ID/String : 2 Format/String : AAC LC Format/Info : Advanced Audio Codec Low Complexity CodecID : mp4a-40-2 Duration/String : 1mn 13s Source_Duration/String : 1mn 13s BitRate_Mode/String : CBR BitRate/String : 317 Kbps Channel(s)/String : 2 channel ChannelLayout : L R SamplingRate/String : 48.0 KHz FrameRate/String : 46.875 fps (1024 SPF) Compression_Mode/String : Lossy StreamSize/String : 2.77 MiB (3%) Source_StreamSize/String : 2.77 MiB (3%) Language/String : en Encoded_Date : UTC 2020-03-11 18:48:59 Tagged_Date : UTC 2020-03-11 18:48:59

pymediainfo output=""

General

Count : 334

Count of stream of this kind : 1

Kind of stream : General

Kind of stream : General

Stream identifier : 0

Count of video streams : 1

Count of audio streams : 1

Video_Format_List : AVC

Video_Format_WithHint_List : AVC

Codecs Video : AVC

Video_Language_List : English

Audio_Format_List : AAC LC

Audio_Format_WithHint_List : AAC LC

Audio codecs : AAC LC

Audio_Language_List : English

Complete name : C:\Users\REMOVED\Python Apps\My Progs\test_folder\test.test-test.mp4

Folder name : C:\Users\REMOVED\Python Apps\My Progs\test_folder

File name extension : test.test-test.mp4

File name : test.test-test

File extension : mp4

Format : MPEG-4

Format : MPEG-4

Format/Extensions usually used : braw mov mp4 m4v m4a m4b m4p m4r 3ga 3gpa 3gpp 3gp 3gpp2 3g2 k3g jpm jpx mqv ismv isma ismt f4a f4b f4v

Commercial name : MPEG-4

Format profile : Base Media / Version 2

Internet media type : video/mp4

Codec ID : mp42

Codec ID : mp42 (mp42/mp41)

Codec ID/Url : http://www.apple.com/quicktime/download/standalone.html

CodecID_Compatible : mp42/mp41

File size : 87185472

File size : 83.1 MiB

File size : 83 MiB

File size : 83 MiB

File size : 83.1 MiB

File size : 83.15 MiB

Duration : 73115

Duration : 1 min 13 s

Duration : 1 min 13 s 115 ms

Duration : 1 min 13 s

Duration : 00:01:13.115

Duration : 00:01:13;03

Duration : 00:01:13.115 (00:01:13;03)

Overall bit rate mode : VBR

Overall bit rate mode : Variable

Overall bit rate : 9539544

Overall bit rate : 9 540 kb/s

Frame rate : 23.976

Frame rate : 23.976 FPS

Frame count : 1753

Stream size : 81189

Stream size : 79.3 KiB (0%)

Stream size : 79 KiB

Stream size : 79 KiB

Stream size : 79.3 KiB

Stream size : 79.29 KiB

Stream size : 79.3 KiB (0%)

Proportion of this stream : 0.00093

HeaderSize : 79481

DataSize : 87105991

FooterSize : 0

IsStreamable : Yes

Encoded date : UTC 2020-03-11 18:48:56

Tagged date : UTC 2020-03-11 18:51:07

File creation date : UTC 2020-09-09 23:22:09.709

File creation date (local) : 2020-09-09 16:22:09.709

File last modification date : UTC 2020-05-28 18:38:47.333

File last modification date (local) : 2020-05-28 11:38:47.333

TIM : 00:00:00:00

TSC : 24000

TSZ : 1001

Video

Count : 378

Count of stream of this kind : 1

Kind of stream : Video

Kind of stream : Video

Stream identifier : 0

StreamOrder : 0

ID : 1

ID : 1

Format : AVC

Format : AVC

Format/Info : Advanced Video Codec

Format/Url : http://developers.videolan.org/x264.html

Commercial name : AVC

Format profile : Main@L5.1

Format settings : CABAC / 2 Ref Frames

Format settings, CABAC : Yes

Format settings, CABAC : Yes

Format settings, Reference frames : 2

Format settings, Reference frames : 2 frames

Internet media type : video/H264

Codec ID : avc1

Codec ID/Info : Advanced Video Coding

Duration : 73115

Duration : 1 min 13 s

Duration : 1 min 13 s 115 ms

Duration : 1 min 13 s

Duration : 00:01:13.115

Duration : 00:01:13;03

Duration : 00:01:13.115 (00:01:13;03)

Bit rate mode : VBR

Bit rate mode : Variable

Bit rate : 9213338

Bit rate : 9 213 kb/s

Maximum bit rate : 768000

Maximum bit rate : 768 kb/s

Width : 3840

Width : 3 840 pixels

Height : 2160

Height : 2 160 pixels

Sampled_Width : 3840

Sampled_Height : 2160

Pixel aspect ratio : 1.000

Display aspect ratio : 1.778

Display aspect ratio : 16:9

Rotation : 0.000

Frame rate mode : CFR

Frame rate mode : Constant

Frame rate : 23.976

Frame rate : 23.976 (24000/1001) FPS

FrameRate_Num : 24000

FrameRate_Den : 1001

Frame count : 1753

Color space : YUV

Chroma subsampling : 4:2:0

Chroma subsampling : 4:2:0

Bit depth : 8

Bit depth : 8 bits

Scan type : Progressive

Scan type : Progressive

Bits/(Pixel*Frame) : 0.046

Stream size : 84203898

Stream size : 80.3 MiB (97%)

Stream size : 80 MiB

Stream size : 80 MiB

Stream size : 80.3 MiB

Stream size : 80.30 MiB

Stream size : 80.3 MiB (97%)

Proportion of this stream : 0.96580

Language : en

Language : English

Language : English

Language : en

Language : eng

Language : en

Encoded date : UTC 2020-03-11 18:48:57

Tagged date : UTC 2020-03-11 18:48:57

Buffer size : 768000

colour_description_present : Yes

colour_description_present_Source : Stream

Color range : Limited

colour_range_Source : Stream

Color primaries : BT.709

colour_primaries_Source : Stream

Transfer characteristics : BT.709

transfer_characteristics_Source : Stream

Matrix coefficients : BT.709

matrix_coefficients_Source : Stream

Codec configuration box : avcC

Audio

Count : 280

Count of stream of this kind : 1

Kind of stream : Audio

Kind of stream : Audio

Stream identifier : 0

StreamOrder : 1

ID : 2

ID : 2

Format : AAC

Format : AAC LC

Format/Info : Advanced Audio Codec Low Complexity

Commercial name : AAC

Format_AdditionalFeatures : LC

Codec ID : mp4a-40-2

Duration : 73115

Duration : 1 min 13 s

Duration : 1 min 13 s 115 ms

Duration : 1 min 13 s

Duration : 00:01:13.115

Duration : 00:01:12:43

Duration : 00:01:13.115 (00:01:12:43)

Source duration : 73152

Source duration : 1 min 13 s

Source duration : 1 min 13 s 152 ms

Source duration : 1 min 13 s

Source duration : 00:01:13.152

Bit rate mode : CBR

Bit rate mode : Constant

Bit rate : 317375

Bit rate : 317 kb/s

Channel(s) : 2

Channel(s) : 2 channels

Channel positions : Front: L R

Channel positions : 2/0/0

Channel layout : L R

Samples per frame : 1024

Sampling rate : 48000

Sampling rate : 48.0 kHz

Samples count : 3509520

Frame rate : 46.875

Frame rate : 46.875 FPS (1024 SPF)

Frame count : 3427

Source frame count : 3429

Compression mode : Lossy

Compression mode : Lossy

Stream size : 2900385

Stream size : 2.77 MiB (3%)

Stream size : 3 MiB

Stream size : 2.8 MiB

Stream size : 2.77 MiB

Stream size : 2.766 MiB

Stream size : 2.77 MiB (3%)

Proportion of this stream : 0.03327

Source stream size : 2902077

Source stream size : 2.77 MiB (3%)

Source stream size : 3 MiB

Source stream size : 2.8 MiB

Source stream size : 2.77 MiB

Source stream size : 2.768 MiB

Source stream size : 2.77 MiB (3%)

Source_StreamSize_Proportion : 0.03329

Language : en

Language : English

Language : English

Language : en

Language : eng

Language : en

Encoded date : UTC 2020-03-11 18:48:59

Tagged date : UTC 2020-03-11 18:48:59

sbraz commented 4 years ago

Hi, you need to pass full=False, otherwise you will get output matching that of mediainfo -f.

lostname420 commented 4 years ago

Perfect. Thank you!