Skip to content

Add allparams demo program - #5

Open
codesoap wants to merge 1 commit into
jkl1337:masterfrom
codesoap:allparams
Open

Add allparams demo program#5
codesoap wants to merge 1 commit into
jkl1337:masterfrom
codesoap:allparams

Conversation

@codesoap

@codesoap codesoap commented Dec 30, 2025

Copy link
Copy Markdown

The program added here can be used to look at all values for all parameters of all streams of a media file. I think it will be useful for identifying interesting parameters. For example: I found it almost impossible to discover in which parameter the camera model of a picture was stored without a tool like this; the official mediainfo program seems unsuited for the task, since it changes the name of some parameters for printing and does not even include all parameters.

Parsing the output of mi.Option("Info_Parameters") seems cumbersome, but I couldn't find another way to get all parameters. Not even the documentation at https://mediaarea.net/en/MediaInfo/Support/Fields lists all available parameters.

Here is the program in action with the Big Buck Bunny short film:

$ allparams /tmp/BigBuckBunny_640x360.m4v
[General #1]
	AudioCount                  : 1
	Audio_Channels_Total        : 2
	Audio_Codec_List : Deprecated: AAC LC
	Audio_Format_List           : AAC LC
	Audio_Format_WithHint_List  : AAC LC
	Audio_Language_List         : English
	CodecID                     : M4V 
	CodecID/String              : M4V  (M4V /M4A /mp42/isom)
	CodecID_Compatible          : M4V /M4A /mp42/isom
	CompleteName                : /tmp/BigBuckBunny_640x360.m4v
	Composer                    : Sacha Goedegebure / Ton Roosendaal
	Copyright                   : © 2008 Blender Foundation | www.bigbuckbunny.org
	Count                       : 359
	DataSize                    : 121022176
	Duration                    : 596462
	Duration/String             : 9 min 56 s
	Duration/String1            : 9 min 56 s 462 ms
	Duration/String2            : 9 min 56 s
	Duration/String3            : 00:09:56.462
	Duration/String4            : 00:09:56:11
	Duration/String5            : 00:09:56.462 (00:09:56:11)
	Encoded_Date                : 2008-06-03 05:23:28 UTC
	FileExtension               : m4v
	FileName                    : BigBuckBunny_640x360
	FileNameExtension           : BigBuckBunny_640x360.m4v
	FileSize                    : 121283919
	FileSize/String             : 116 MiB
	FileSize/String1            : 116 MiB
	FileSize/String2            : 116 MiB
	FileSize/String3            : 116 MiB
	FileSize/String4            : 115.7 MiB
	File_Modified_Date          : 2008-06-07 14:50:00 UTC
	File_Modified_Date_Local    : 2008-06-07 16:50:00
	FolderName                  : /tmp
	FooterSize                  : 2
	Format                      : MPEG-4
	Format/Extensions           : braw mov mp4 m4v m4a m4b m4p m4r 3ga 3gpa 3gpp 3gp 3gpp2 3g2 k3g jpm jpx mqv ismv isma ismt f4a f4b f4v
	Format/String               : MPEG-4
	Format_Commercial           : MPEG-4
	FrameCount                  : 14315
	FrameRate                   : 24.000
	FrameRate/String            : 24.000 FPS
	HeaderSize                  : 261741
	Inform                      :
		Complete name               : /tmp/BigBuckBunny_640x360.m4v
		Format                      : MPEG-4
		Codec ID                    : M4V  (M4V /M4A /mp42/isom)
		File size                   : 116 MiB
		Duration                    : 9 min 56 s
		Overall bit rate mode       : Variable
		Overall bit rate            : 1 627 kb/s
		Frame rate                  : 24.000 FPS
		Title                       : Big Buck Bunny
		Performer                   : Peach Open Movie Team
		Composer                    : Sacha Goedegebure / Ton Roosendaal
		Recorded date               : 2008
		Encoded date                : 2008-06-03 05:23:28 UTC
		Tagged date                 : 2008-06-03 00:44:50 UTC
		Copyright                   : © 2008 Blender Foundation | www.bigbuckbunny.org
	InternetMediaType           : video/mp4
	IsStreamable                : Yes
	Movie                       : Big Buck Bunny
	OverallBitRate              : 1626711
	OverallBitRate/String       : 1 627 kb/s
	OverallBitRate_Mode         : VBR
	OverallBitRate_Mode/String  : Variable
	Performer                   : Peach Open Movie Team
	Recorded_Date               : 2008
	StreamCount                 : 1
	StreamKind                  : General
	StreamKind/String           : General
	StreamKindID                : 0
	StreamSize                  : 261767
	StreamSize/String           : 256 KiB (0%)
	StreamSize/String1          : 256 KiB
	StreamSize/String2          : 256 KiB
	StreamSize/String3          : 256 KiB
	StreamSize/String4          : 255.6 KiB
	StreamSize/String5          : 256 KiB (0%)
	StreamSize_Proportion       : 0.00216
	Tagged_Date                 : 2008-06-03 00:44:50 UTC
	Title                       : Big Buck Bunny
	VideoCount                  : 1
	Video_Codec_List : Deprecated: AVC
	Video_Format_List           : AVC
	Video_Format_WithHint_List  : AVC
	Video_Language_List         : English
[Video #1]
	BitDepth                    : 8
	BitDepth/String             : 8 bits
	BitRate                     : 1495672
	BitRate/String              : 1 496 kb/s
	BitRate_Maximum             : 4005888
	BitRate_Maximum/String      : 4 006 kb/s
	BitRate_Mode                : VBR
	BitRate_Mode/String         : Variable
	Bits-(Pixel*Frame)          : 0.271
	BufferSize                  : 4014080
	ChromaSubsampling           : 4:2:0
	ChromaSubsampling/String    : 4:2:0 (Type 2)
	ChromaSubsampling_Position  : Type 2
	CodecID                     : avc1
	CodecID/Info                : Advanced Video Coding
	ColorSpace                  : YUV
	Count                       : 391
	DisplayAspectRatio          : 1.783
	DisplayAspectRatio/String   : 16:9
	Duration                    : 596462
	Duration/String             : 9 min 56 s
	Duration/String1            : 9 min 56 s 462 ms
	Duration/String2            : 9 min 56 s
	Duration/String3            : 00:09:56.462
	Duration/String4            : 00:09:56:11
	Duration/String5            : 00:09:56.462 (00:09:56:11)
	Encoded_Date                : 2008-06-03 05:09:30 UTC
	Format                      : AVC
	Format/Info                 : Advanced Video Codec
	Format/String               : AVC
	Format/Url                  : http://developers.videolan.org/x264.html
	Format_Commercial           : AVC
	Format_Profile              : Constrained Baseline@L3
	Format_Settings             : 1 Ref Frames
	Format_Settings_CABAC       : No
	Format_Settings_CABAC/String: No
	Format_Settings_RefFrames   : 1
	Format_Settings_RefFrames/String: 1 frame
	Format_Settings_SliceCount  : 2
	Format_Settings_SliceCount/String: 2 slices per frame
	FrameCount                  : 14315
	FrameRate                   : 24.000
	FrameRate/String            : 24.000 FPS
	FrameRate_Den               : 1
	FrameRate_Mode              : CFR
	FrameRate_Mode/String       : Constant
	FrameRate_Num               : 24
	Height                      : 359
	Height/String               : 359 pixels
	Height_Original             : 360
	Height_Original/String      : 360 pixels
	ID                          : 2
	ID/String                   : 2
	Inform                      :
		ID                          : 2
		Format                      : AVC
		Format/Info                 : Advanced Video Codec
		Format profile              : Constrained Baseline@L3
		Format settings             : 1 Ref Frames
		Format settings, CABAC      : No
		Format settings, Reference frames: 1 frame
		Format settings, Slice count: 2 slices per frame
		Codec ID                    : avc1
		Codec ID/Info               : Advanced Video Coding
		Duration                    : 9 min 56 s
		Source duration             : 9 min 56 s
		Source_Duration_LastFrame   : -8 ms
		Bit rate mode               : Variable
		Bit rate                    : 1 496 kb/s
		Maximum bit rate            : 4 006 kb/s
		Width                       : 640 pixels
		Height                      : 359 pixels
		Original height             : 360 pixels
		Display aspect ratio        : 16:9
		Frame rate mode             : Constant
		Frame rate                  : 24.000 FPS
		Color space                 : YUV
		Chroma subsampling          : 4:2:0 (Type 2)
		Bit depth                   : 8 bits
		Scan type                   : Progressive
		Bits/(Pixel*Frame)          : 0.271
		Stream size                 : 106 MiB (92%)
		Source stream size          : 106 MiB (92%)
		Language                    : English
		Encoded date                : 2008-06-03 05:09:30 UTC
		Tagged date                 : 2008-06-03 05:23:31 UTC
		Color range                 : Limited
		Color primaries             : BT.601 NTSC
		Transfer characteristics    : BT.709
		Matrix coefficients         : BT.601
		Codec configuration box     : avcC
	InternetMediaType           : video/H264
	Language                    : en
	Language/String             : English
	Language/String1            : English
	Language/String2            : en
	Language/String3            : eng
	Language/String4            : en
	PixelAspectRatio            : 1.000
	Rotation                    : 0.000
	Sampled_Height              : 360
	Sampled_Width               : 640
	ScanType                    : Progressive
	ScanType/String             : Progressive
	Source_Duration             : 596492
	Source_Duration/String      : 9 min 56 s
	Source_Duration/String1     : 9 min 56 s 492 ms
	Source_Duration/String2     : 9 min 56 s
	Source_Duration/String3     : 00:09:56.492
	Source_Duration/String4     : 00:09:56:12
	Source_Duration/String5     : 00:09:56.492 (00:09:56:12)
	Source_Duration_LastFrame   : -8
	Source_Duration_LastFrame/String: -8 ms
	Source_Duration_LastFrame/String1: -8 ms
	Source_Duration_LastFrame/String2: -8 ms
	Source_Duration_LastFrame/String3: -00:00:00.008
	Source_Duration_LastFrame/String4: 00:00:00:00
	Source_Duration_LastFrame/String5: -00:00:00.008 (00:00:00:00)
	Source_FrameCount           : 14316
	Source_StreamSize           : 111513310
	Source_StreamSize/String    : 106 MiB (92%)
	Source_StreamSize/String1   : 106 MiB
	Source_StreamSize/String2   : 106 MiB
	Source_StreamSize/String3   : 106 MiB
	Source_StreamSize/String4   : 106.3 MiB
	Source_StreamSize/String5   : 106 MiB (92%)
	Source_StreamSize_Proportion: 0.91944
	Stored_Height               : 368
	StreamCount                 : 1
	StreamKind                  : Video
	StreamKind/String           : Video
	StreamKindID                : 0
	StreamOrder                 : 1
	StreamSize                  : 111513259
	StreamSize/String           : 106 MiB (92%)
	StreamSize/String1          : 106 MiB
	StreamSize/String2          : 106 MiB
	StreamSize/String3          : 106 MiB
	StreamSize/String4          : 106.3 MiB
	StreamSize/String5          : 106 MiB (92%)
	StreamSize_Proportion       : 0.91944
	Tagged_Date                 : 2008-06-03 05:23:31 UTC
	Width                       : 640
	Width/String                : 640 pixels
	colour_description_present  : Yes
	colour_description_present_Source: Stream
	colour_primaries            : BT.601 NTSC
	colour_primaries_Source     : Stream
	colour_range                : Limited
	colour_range_Source         : Stream
	matrix_coefficients         : BT.601
	matrix_coefficients_Source  : Stream
	transfer_characteristics    : BT.709
	transfer_characteristics_Source: Stream
[Audio #1]
	BitRate                     : 128000
	BitRate/String              : 128 kb/s
	BitRate_Mode                : CBR
	BitRate_Mode/String         : Constant
	Channel(s)                  : 2
	Channel(s)/String           : 2 channels
	ChannelLayout               : L R
	ChannelPositions            : Front: L R
	ChannelPositions/String2    : 2/0/0
	CodecID                     : mp4a-40-2
	Compression_Mode            : Lossy
	Compression_Mode/String     : Lossy
	Count                       : 285
	Duration                    : 596462
	Duration/String             : 9 min 56 s
	Duration/String1            : 9 min 56 s 462 ms
	Duration/String2            : 9 min 56 s
	Duration/String3            : 00:09:56.462
	Duration/String5            : 00:09:56.462
	Encoded_Date                : 2008-06-03 05:09:30 UTC
	Format                      : AAC
	Format/Info                 : Advanced Audio Codec Low Complexity
	Format/String               : AAC LC
	Format_AdditionalFeatures   : LC
	Format_Commercial           : AAC
	FrameCount                  : 25687
	FrameRate                   : 43.066
	FrameRate/String            : 43.066 FPS (1024 SPF)
	ID                          : 1
	ID/String                   : 1
	Inform                      :
		ID                          : 1
		Format                      : AAC LC
		Format/Info                 : Advanced Audio Codec Low Complexity
		Codec ID                    : mp4a-40-2
		Duration                    : 9 min 56 s
		Source duration             : 9 min 56 s
		Bit rate mode               : Constant
		Bit rate                    : 128 kb/s
		Channel(s)                  : 2 channels
		Channel layout              : L R
		Sampling rate               : 44.1 kHz
		Frame rate                  : 43.066 FPS (1024 SPF)
		Compression mode            : Lossy
		Stream size                 : 9.07 MiB (8%)
		Source stream size          : 9.07 MiB (8%)
		Language                    : English
		Encoded date                : 2008-06-03 05:09:30 UTC
		Tagged date                 : 2008-06-03 00:44:50 UTC
	Language                    : en
	Language/String             : English
	Language/String1            : English
	Language/String2            : en
	Language/String3            : eng
	Language/String4            : en
	SamplesPerFrame             : 1024
	SamplingCount               : 26303974
	SamplingRate                : 44100
	SamplingRate/String         : 44.1 kHz
	Source_Duration             : 596474
	Source_Duration/String      : 9 min 56 s
	Source_Duration/String1     : 9 min 56 s 474 ms
	Source_Duration/String2     : 9 min 56 s
	Source_Duration/String3     : 00:09:56.474
	Source_Duration/String5     : 00:09:56.474
	Source_FrameCount           : 25688
	Source_StreamSize           : 9508842
	Source_StreamSize/String    : 9.07 MiB (8%)
	Source_StreamSize/String1   : 9 MiB
	Source_StreamSize/String2   : 9.1 MiB
	Source_StreamSize/String3   : 9.07 MiB
	Source_StreamSize/String4   : 9.068 MiB
	Source_StreamSize/String5   : 9.07 MiB (8%)
	Source_StreamSize_Proportion: 0.07840
	StreamCount                 : 1
	StreamKind                  : Audio
	StreamKind/String           : Audio
	StreamKindID                : 0
	StreamOrder                 : 0
	StreamSize                  : 9508436
	StreamSize/String           : 9.07 MiB (8%)
	StreamSize/String1          : 9 MiB
	StreamSize/String2          : 9.1 MiB
	StreamSize/String3          : 9.07 MiB
	StreamSize/String4          : 9.068 MiB
	StreamSize/String5          : 9.07 MiB (8%)
	StreamSize_Proportion       : 0.07840
	Tagged_Date                 : 2008-06-03 00:44:50 UTC

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant