LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-11-2021, 06:46 AM   #1
GPGAgent
Senior Member
 
Registered: Oct 2018
Location: Surrey UK
Distribution: Mint 20 xfce 64bit
Posts: 1,026
Blog Entries: 3

Rep: Reputation: 133Reputation: 133
Question How to customise output from mediainfo?


Hi Folks


I only want a few lines from a mediainfo command, for example:
Code:
jonke@charlie:/media/jonke/SEAG_8TB/FILES/XHAM/1950-60-70s-Movies$ mediainfo 77\ Miss\ Bikini\ 1951.mp4 
General
Complete name                            : 77 Miss Bikini 1951.mp4
Format                                   : MPEG-4
Format profile                           : Base Media / Version 2
Codec ID                                 : mp42 (isom/iso2/avc1/mp41)
File size                                : 75.6 MiB
Duration                                 : 8 min 24 s
Overall bit rate                         : 1 257 kb/s
Encoded date                             : UTC 2021-07-07 19:18:15
Tagged date                              : UTC 2021-07-07 19:18:15
Writing application                      : HandBrake 1.3.1 2020032300

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L3
Format settings                          : CABAC / 4 Ref Frames
Format settings, CABAC                   : Yes
Format settings, Reference frames        : 4 frames
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 8 min 24 s
Bit rate                                 : 1 123 kb/s
Width                                    : 704 pixels
Height                                   : 576 pixels
Display aspect ratio                     : 4:3
Frame rate mode                          : Constant
Frame rate                               : 25.000 FPS
Standard                                 : PAL
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
I only want these lines only:
Code:
Complete name                            : 77 Miss Bikini 1951.mp4
Format                                   : MPEG-4
File size                                : 75.6 MiB
Duration                                 : 8 min 24 s
Overall bit rate                         : 1 257 kb/s
Bit rate                                 : 1 123 kb/s
Width                                    : 704 pixels
Height                                   : 576 pixels
Display aspect ratio                     : 4:3
I know I can add
Code:
--Inform="Video;%DisplayAspectRatio%"
to show the aspect ratio, but that's ll it does it report 1.333, I want the whole line


I'm sure I've seen this done before, but I cannot find it.


TIA
 
Old 10-11-2021, 07:37 AM   #2
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Code:
$> mediainfo --Output="Video;bpp=%Bits-(Pixel*Frame)%\nwidth=%Width%\nheight=%Height%\nframerate=%Framerate%" In\ Search\ Of\ A\ Flat\ Earth-JTfhYyTuT44.mp4
bpp=0.028
width=1920
height=1080
framerate=
I'm sure you can figure out the rest.
 
1 members found this post helpful.
Old 10-11-2021, 09:12 AM   #3
GPGAgent
Senior Member
 
Registered: Oct 2018
Location: Surrey UK
Distribution: Mint 20 xfce 64bit
Posts: 1,026

Original Poster
Blog Entries: 3

Rep: Reputation: 133Reputation: 133
Thumbs up

Quote:
Originally Posted by ondoho View Post
Code:
$> mediainfo --Output="Video;bpp=%Bits-(Pixel*Frame)%\nwidth=%Width%\nheight=%Height%\nframerate=%Framerate%" In\ Search\ Of\ A\ Flat\ Earth-JTfhYyTuT44.mp4
bpp=0.028
width=1920
height=1080
framerate=
I'm sure you can figure out the rest.
Cheers, figured it out, and now it's in my notes not to be forgotten.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How to process mediainfo output GPGAgent Linux - Newbie 8 08-18-2019 06:31 PM
[SOLVED] bash mediainfo and grep Juliusz Linux - Newbie 7 05-22-2016 06:35 PM
[SOLVED] Dvd+rw-mediainfo Utility linuxman2013 Linux - Software 8 04-05-2013 01:28 AM
[SOLVED] Mediainfo Repository salmanal Linux Mint 2 12-11-2010 10:05 PM
LXer: MediaInfo 0.7.28 LXer Syndicated Linux News 0 02-22-2010 06:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:27 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration