Home/News | About | Download | Documentation | Forum | Bug Reports | Contact | Donations | Consulting | Projects | Legal | Security | FATE


This forum has not been maintained for a long time and will probably get deleted in the near future.
For faster responses to your questions, please use StackOverflow instead and tag your questions with "FFmpeg".
If you need a backup of the posts from this forum, please contact me directly.

ffprobe output [format] issues

Discussions about problems encountered using ffprobe.
Forum rules
FFmpeg is in a state of perpetual development and we do not currently have the person power to backport fixes to official releases. As such, if you wish to query or report a bug, you must try with the latest development branch revision of FFmpeg to confirm the issue still exists. The latest FFmpeg can be downloaded from here: http://www.ffmpeg.org/download.html

ffprobe output [format] issues

Postby jdkoops » Wed Jul 23, 2014 4:40 am

Hi,

There a way so the [FORMAT] tags are not on the output?
Also, possible to get duration without the milliseconds and file size to show as MB ?
see below. Thanks for any help.


Code: Select all
C:\>ffprobe.exe -i test.mp4 -show_entries format=duration,size -pretty
ffprobe version N-63013-g4cdea92 Copyright (c) 2007-2014 the FFmpeg developers
  built on May  6 2014 22:02:02 with gcc 4.8.2 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
le-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetyp
e --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --ena
ble-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-l
ibopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libsp
eex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aa
cenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavp
ack --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable
-decklink --enable-zlib
  libavutil      52. 81.100 / 52. 81.100
  libavcodec     55. 60.103 / 55. 60.103
  libavformat    55. 37.102 / 55. 37.102
  libavdevice    55. 13.101 / 55. 13.101
  libavfilter     4.  5.100 /  4.  5.100
  libswscale      2.  6.100 /  2.  6.100
  libswresample   0. 18.100 /  0. 18.100
  libpostproc    52.  3.100 / 52.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'cecile.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf54.59.106
  Duration: 00:31:05.38, start: 0.000000, bitrate: 1741 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 720x480 [
SAR 1:1 DAR 3:2], 1611 kb/s, 19.24 fps, 29.97 tbr, 11988 tbn, 59.94 tbc (default
)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 12
7 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
[FORMAT]
duration=0:31:05.376000
size=387.311201 Mibyte
[/FORMAT]
jdkoops
 
Posts: 2
Joined: Wed Jul 23, 2014 4:27 am

Re: ffprobe output [format] issues

Postby llogan » Thu Jul 24, 2014 6:56 pm

jdkoops wrote:There a way so the [FORMAT] tags are not on the output?

You can add "-print_format flat" or some other format type other than flat (see "ffprobe -h").
Also, possible to get duration without the milliseconds

One method is to process the output with sed, awk, etc.
...and file size to show as MB?

I don't know how to do that.

Some of the examples in https://trac.ffmpeg.org/wiki/FFprobeTips may be helpful.
llogan
 
Posts: 2339
Joined: Fri Jan 25, 2013 9:47 pm
Location: Alaska

Re: ffprobe output [format] issues

Postby jdkoops » Wed Jul 30, 2014 4:14 pm

-print_format flat worked great for removing [format].
i'll check the link you gave to find the other info.

Thanks for your help!
jdkoops
 
Posts: 2
Joined: Wed Jul 23, 2014 4:27 am


Return to ffprobe

Who is online

Users browsing this forum: No registered users and 1 guest