Changes between Initial Version and Version 1 of FFprobeTips


Ignore:
Timestamp:
May 30, 2014, 1:17:24 AM (5 years ago)
Author:
llogan
Comment:

make initial page

Legend:

Unmodified
Added
Removed
Modified
  • FFprobeTips

    v1 v1  
     1`ffprobe` is a simple multimedia streams analyzer. You can use it to output all kinds of information about an input including duration, frame rate, frame size, etc. It is also useful for gathering specific information about an input to be used in a script.
     2
     3= Usage =
     4
     5{{{
     6ffprobe [OPTIONS] [INPUT_FILE]
     7}}}
     8
     9= Show help =
     10
     11{{{
     12ffprobe -h
     13}}}
     14
     15Scroll to the top of the console output and refer to "Main options" for the most important options.
     16
     17= Examples =
     18
     19== Basic example ==
     20
     21{{{
     22$ ffprobe -v 0 -show_format input.mkv
     23[FORMAT]
     24filename=input.mkv
     25nb_streams=2
     26nb_programs=0
     27format_name=matroska,webm
     28format_long_name=Matroska / WebM
     29start_time=0.000000
     30duration=108.501000
     31size=56164272
     32bit_rate=4141106
     33probe_score=100
     34TAG:encoder=libebml v0.7.7 + libmatroska v0.8.1
     35TAG:creation_time=2008-10-22 06:43:30
     36[/FORMAT]
     37}}}
     38
     39* `-v 0` sets the loglevel. `0` will omit the build and "generic" file information.
     40* `-print_format` is useful to change the output format. Available formats are: default, compact, csv, flat, ini, json, xml.
     41
     42== Duration ==
     43
     44{{{
     45eval $(ffprobe -v 0 -show_format -of flat=s=_ input.mkv | grep format_duration); echo $format_duration
     46}}}
     47
     48Alternatively you can omit `grep` by using the `-show_entries` option:
     49{{{
     50eval $(ffprobe -v 0 -show_format -of flat=s=_ -show_entries format=duration input.mkv); echo $format_duration
     51}}}
     52
     53Example output in seconds:
     54{{{
     55108.501000
     56}}}
     57
     58Adding the `-sexagesimal` option will use the `HOURS:MM:SS.MICROSECONDS` time unit format such as:
     59{{{
     600:01:48.501000
     61}}}
     62
     63== Frame Rate ==
     64
     65This will provide the frame rate for the first video stream.
     66
     67{{{
     68eval $(ffprobe -v 0 -of flat=s=_ -select_streams v:0 -show_entries stream=r_frame_rate input.mkv); echo $streams_stream_0_r_frame_rate
     69}}}
     70
     71Example output for a NTSC-film video:
     72{{{
     7324000/1001
     74}}}
     75
     76Example output for a PAL video:
     77{{{
     7825/1
     79}}}
     80
     81* Some files can contain multiple video streams.
     82* Some streams may be variable frame rate.
     83
     84== Width x Height ==
     85
     86{{{
     87eval $(ffprobe -v 0 -of flat=s=_ -select_streams v:0 -show_entries stream=height,width input.mkv)
     88size=${streams_stream_0_width}x${streams_stream_0_height}
     89echo $size
     90}}}
     91
     92Example output:
     93{{{
     941280x720
     95}}}