@ -42,7 +42,9 @@
# include "libavutil/bprint.h"
# include "libavutil/bprint.h"
# include "libavutil/display.h"
# include "libavutil/display.h"
# include "libavutil/hash.h"
# include "libavutil/hash.h"
# include "libavutil/hdr_dynamic_metadata.h"
# include "libavutil/mastering_display_metadata.h"
# include "libavutil/mastering_display_metadata.h"
# include "libavutil/dovi_meta.h"
# include "libavutil/opt.h"
# include "libavutil/opt.h"
# include "libavutil/pixdesc.h"
# include "libavutil/pixdesc.h"
# include "libavutil/spherical.h"
# include "libavutil/spherical.h"
@ -257,6 +259,7 @@ __thread OptionDef *ffprobe_options = NULL;
/* FFprobe context */
/* FFprobe context */
__thread const char * input_filename ;
__thread const char * input_filename ;
__thread const char * print_input_filename ;
__thread AVInputFormat * iformat = NULL ;
__thread AVInputFormat * iformat = NULL ;
__thread struct AVHashContext * hash ;
__thread struct AVHashContext * hash ;
@ -1089,12 +1092,12 @@ typedef struct CompactContext {
# define OFFSET(x) offsetof(CompactContext, x)
# define OFFSET(x) offsetof(CompactContext, x)
static const AVOption compact_options [ ] = {
static const AVOption compact_options [ ] = {
{ " item_sep " , " set item separator " , OFFSET ( item_sep_str ) , AV_OPT_TYPE_STRING , { . str = " | " } , CHAR_MIN , CHAR_MAX } ,
{ " item_sep " , " set item separator " , OFFSET ( item_sep_str ) , AV_OPT_TYPE_STRING , { . str = " | " } , 0 , 0 } ,
{ " s " , " set item separator " , OFFSET ( item_sep_str ) , AV_OPT_TYPE_STRING , { . str = " | " } , CHAR_MIN , CHAR_MAX } ,
{ " s " , " set item separator " , OFFSET ( item_sep_str ) , AV_OPT_TYPE_STRING , { . str = " | " } , 0 , 0 } ,
{ " nokey " , " force no key printing " , OFFSET ( nokey ) , AV_OPT_TYPE_BOOL , { . i64 = 0 } , 0 , 1 } ,
{ " nokey " , " force no key printing " , OFFSET ( nokey ) , AV_OPT_TYPE_BOOL , { . i64 = 0 } , 0 , 1 } ,
{ " nk " , " force no key printing " , OFFSET ( nokey ) , AV_OPT_TYPE_BOOL , { . i64 = 0 } , 0 , 1 } ,
{ " nk " , " force no key printing " , OFFSET ( nokey ) , AV_OPT_TYPE_BOOL , { . i64 = 0 } , 0 , 1 } ,
{ " escape " , " set escape mode " , OFFSET ( escape_mode_str ) , AV_OPT_TYPE_STRING , { . str = " c " } , CHAR_MIN , CHAR_MAX } ,
{ " escape " , " set escape mode " , OFFSET ( escape_mode_str ) , AV_OPT_TYPE_STRING , { . str = " c " } , 0 , 0 } ,
{ " e " , " set escape mode " , OFFSET ( escape_mode_str ) , AV_OPT_TYPE_STRING , { . str = " c " } , CHAR_MIN , CHAR_MAX } ,
{ " e " , " set escape mode " , OFFSET ( escape_mode_str ) , AV_OPT_TYPE_STRING , { . str = " c " } , 0 , 0 } ,
{ " print_section " , " print section name " , OFFSET ( print_section ) , AV_OPT_TYPE_BOOL , { . i64 = 1 } , 0 , 1 } ,
{ " print_section " , " print section name " , OFFSET ( print_section ) , AV_OPT_TYPE_BOOL , { . i64 = 1 } , 0 , 1 } ,
{ " p " , " print section name " , OFFSET ( print_section ) , AV_OPT_TYPE_BOOL , { . i64 = 1 } , 0 , 1 } ,
{ " p " , " print section name " , OFFSET ( print_section ) , AV_OPT_TYPE_BOOL , { . i64 = 1 } , 0 , 1 } ,
{ NULL } ,
{ NULL } ,
@ -1205,12 +1208,12 @@ static const Writer compact_writer = {
# define OFFSET(x) offsetof(CompactContext, x)
# define OFFSET(x) offsetof(CompactContext, x)
static const AVOption csv_options [ ] = {
static const AVOption csv_options [ ] = {
{ " item_sep " , " set item separator " , OFFSET ( item_sep_str ) , AV_OPT_TYPE_STRING , { . str = " , " } , CHAR_MIN , CHAR_MAX } ,
{ " item_sep " , " set item separator " , OFFSET ( item_sep_str ) , AV_OPT_TYPE_STRING , { . str = " , " } , 0 , 0 } ,
{ " s " , " set item separator " , OFFSET ( item_sep_str ) , AV_OPT_TYPE_STRING , { . str = " , " } , CHAR_MIN , CHAR_MAX } ,
{ " s " , " set item separator " , OFFSET ( item_sep_str ) , AV_OPT_TYPE_STRING , { . str = " , " } , 0 , 0 } ,
{ " nokey " , " force no key printing " , OFFSET ( nokey ) , AV_OPT_TYPE_BOOL , { . i64 = 1 } , 0 , 1 } ,
{ " nokey " , " force no key printing " , OFFSET ( nokey ) , AV_OPT_TYPE_BOOL , { . i64 = 1 } , 0 , 1 } ,
{ " nk " , " force no key printing " , OFFSET ( nokey ) , AV_OPT_TYPE_BOOL , { . i64 = 1 } , 0 , 1 } ,
{ " nk " , " force no key printing " , OFFSET ( nokey ) , AV_OPT_TYPE_BOOL , { . i64 = 1 } , 0 , 1 } ,
{ " escape " , " set escape mode " , OFFSET ( escape_mode_str ) , AV_OPT_TYPE_STRING , { . str = " csv " } , CHAR_MIN , CHAR_MAX } ,
{ " escape " , " set escape mode " , OFFSET ( escape_mode_str ) , AV_OPT_TYPE_STRING , { . str = " csv " } , 0 , 0 } ,
{ " e " , " set escape mode " , OFFSET ( escape_mode_str ) , AV_OPT_TYPE_STRING , { . str = " csv " } , CHAR_MIN , CHAR_MAX } ,
{ " e " , " set escape mode " , OFFSET ( escape_mode_str ) , AV_OPT_TYPE_STRING , { . str = " csv " } , 0 , 0 } ,
{ " print_section " , " print section name " , OFFSET ( print_section ) , AV_OPT_TYPE_BOOL , { . i64 = 1 } , 0 , 1 } ,
{ " print_section " , " print section name " , OFFSET ( print_section ) , AV_OPT_TYPE_BOOL , { . i64 = 1 } , 0 , 1 } ,
{ " p " , " print section name " , OFFSET ( print_section ) , AV_OPT_TYPE_BOOL , { . i64 = 1 } , 0 , 1 } ,
{ " p " , " print section name " , OFFSET ( print_section ) , AV_OPT_TYPE_BOOL , { . i64 = 1 } , 0 , 1 } ,
{ NULL } ,
{ NULL } ,
@ -1243,8 +1246,8 @@ typedef struct FlatContext {
# define OFFSET(x) offsetof(FlatContext, x)
# define OFFSET(x) offsetof(FlatContext, x)
static const AVOption flat_options [ ] = {
static const AVOption flat_options [ ] = {
{ " sep_char " , " set separator " , OFFSET ( sep_str ) , AV_OPT_TYPE_STRING , { . str = " . " } , CHAR_MIN , CHAR_MAX } ,
{ " sep_char " , " set separator " , OFFSET ( sep_str ) , AV_OPT_TYPE_STRING , { . str = " . " } , 0 , 0 } ,
{ " s " , " set separator " , OFFSET ( sep_str ) , AV_OPT_TYPE_STRING , { . str = " . " } , CHAR_MIN , CHAR_MAX } ,
{ " s " , " set separator " , OFFSET ( sep_str ) , AV_OPT_TYPE_STRING , { . str = " . " } , 0 , 0 } ,
{ " hierarchical " , " specify if the section specification should be hierarchical " , OFFSET ( hierarchical ) , AV_OPT_TYPE_BOOL , { . i64 = 1 } , 0 , 1 } ,
{ " hierarchical " , " specify if the section specification should be hierarchical " , OFFSET ( hierarchical ) , AV_OPT_TYPE_BOOL , { . i64 = 1 } , 0 , 1 } ,
{ " h " , " specify if the section specification should be hierarchical " , OFFSET ( hierarchical ) , AV_OPT_TYPE_BOOL , { . i64 = 1 } , 0 , 1 } ,
{ " h " , " specify if the section specification should be hierarchical " , OFFSET ( hierarchical ) , AV_OPT_TYPE_BOOL , { . i64 = 1 } , 0 , 1 } ,
{ NULL } ,
{ NULL } ,
@ -1859,6 +1862,105 @@ static inline int show_tags(WriterContext *w, AVDictionary *tags, int section_id
return ret ;
return ret ;
}
}
static void print_dynamic_hdr10_plus ( WriterContext * w , const AVDynamicHDRPlus * metadata )
{
if ( ! metadata )
return ;
print_int ( " application version " , metadata - > application_version ) ;
print_int ( " num_windows " , metadata - > num_windows ) ;
for ( int n = 1 ; n < metadata - > num_windows ; n + + ) {
const AVHDRPlusColorTransformParams * params = & metadata - > params [ n ] ;
print_q ( " window_upper_left_corner_x " ,
params - > window_upper_left_corner_x , ' / ' ) ;
print_q ( " window_upper_left_corner_y " ,
params - > window_upper_left_corner_y , ' / ' ) ;
print_q ( " window_lower_right_corner_x " ,
params - > window_lower_right_corner_x , ' / ' ) ;
print_q ( " window_lower_right_corner_y " ,
params - > window_lower_right_corner_y , ' / ' ) ;
print_q ( " window_upper_left_corner_x " ,
params - > window_upper_left_corner_x , ' / ' ) ;
print_q ( " window_upper_left_corner_y " ,
params - > window_upper_left_corner_y , ' / ' ) ;
print_int ( " center_of_ellipse_x " ,
params - > center_of_ellipse_x ) ;
print_int ( " center_of_ellipse_y " ,
params - > center_of_ellipse_y ) ;
print_int ( " rotation_angle " ,
params - > rotation_angle ) ;
print_int ( " semimajor_axis_internal_ellipse " ,
params - > semimajor_axis_internal_ellipse ) ;
print_int ( " semimajor_axis_external_ellipse " ,
params - > semimajor_axis_external_ellipse ) ;
print_int ( " semiminor_axis_external_ellipse " ,
params - > semiminor_axis_external_ellipse ) ;
print_int ( " overlap_process_option " ,
params - > overlap_process_option ) ;
}
print_q ( " targeted_system_display_maximum_luminance " ,
metadata - > targeted_system_display_maximum_luminance , ' / ' ) ;
if ( metadata - > targeted_system_display_actual_peak_luminance_flag ) {
print_int ( " num_rows_targeted_system_display_actual_peak_luminance " ,
metadata - > num_rows_targeted_system_display_actual_peak_luminance ) ;
print_int ( " num_cols_targeted_system_display_actual_peak_luminance " ,
metadata - > num_cols_targeted_system_display_actual_peak_luminance ) ;
for ( int i = 0 ; i < metadata - > num_rows_targeted_system_display_actual_peak_luminance ; i + + ) {
for ( int j = 0 ; j < metadata - > num_cols_targeted_system_display_actual_peak_luminance ; j + + ) {
print_q ( " targeted_system_display_actual_peak_luminance " ,
metadata - > targeted_system_display_actual_peak_luminance [ i ] [ j ] , ' / ' ) ;
}
}
}
for ( int n = 0 ; n < metadata - > num_windows ; n + + ) {
const AVHDRPlusColorTransformParams * params = & metadata - > params [ n ] ;
for ( int i = 0 ; i < 3 ; i + + ) {
print_q ( " maxscl " , params - > maxscl [ i ] , ' / ' ) ;
}
print_q ( " average_maxrgb " ,
params - > average_maxrgb , ' / ' ) ;
print_int ( " num_distribution_maxrgb_percentiles " ,
params - > num_distribution_maxrgb_percentiles ) ;
for ( int i = 0 ; i < params - > num_distribution_maxrgb_percentiles ; i + + ) {
print_int ( " distribution_maxrgb_percentage " ,
params - > distribution_maxrgb [ i ] . percentage ) ;
print_q ( " distribution_maxrgb_percentile " ,
params - > distribution_maxrgb [ i ] . percentile , ' / ' ) ;
}
print_q ( " fraction_bright_pixels " ,
params - > fraction_bright_pixels , ' / ' ) ;
}
if ( metadata - > mastering_display_actual_peak_luminance_flag ) {
print_int ( " num_rows_mastering_display_actual_peak_luminance " ,
metadata - > num_rows_mastering_display_actual_peak_luminance ) ;
print_int ( " num_cols_mastering_display_actual_peak_luminance " ,
metadata - > num_cols_mastering_display_actual_peak_luminance ) ;
for ( int i = 0 ; i < metadata - > num_rows_mastering_display_actual_peak_luminance ; i + + ) {
for ( int j = 0 ; j < metadata - > num_cols_mastering_display_actual_peak_luminance ; j + + ) {
print_q ( " mastering_display_actual_peak_luminance " ,
metadata - > mastering_display_actual_peak_luminance [ i ] [ j ] , ' / ' ) ;
}
}
}
for ( int n = 0 ; n < metadata - > num_windows ; n + + ) {
const AVHDRPlusColorTransformParams * params = & metadata - > params [ n ] ;
if ( params - > tone_mapping_flag ) {
print_q ( " knee_point_x " , params - > knee_point_x , ' / ' ) ;
print_q ( " knee_point_y " , params - > knee_point_y , ' / ' ) ;
print_int ( " num_bezier_curve_anchors " ,
params - > num_bezier_curve_anchors ) ;
for ( int i = 0 ; i < params - > num_bezier_curve_anchors ; i + + ) {
print_q ( " bezier_curve_anchors " ,
params - > bezier_curve_anchors [ i ] , ' / ' ) ;
}
}
if ( params - > color_saturation_mapping_flag ) {
print_q ( " color_saturation_weight " ,
params - > color_saturation_weight , ' / ' ) ;
}
}
}
static void print_pkt_side_data ( WriterContext * w ,
static void print_pkt_side_data ( WriterContext * w ,
AVCodecParameters * par ,
AVCodecParameters * par ,
const AVPacketSideData * side_data ,
const AVPacketSideData * side_data ,
@ -1928,6 +2030,16 @@ static void print_pkt_side_data(WriterContext *w,
AVContentLightMetadata * metadata = ( AVContentLightMetadata * ) sd - > data ;
AVContentLightMetadata * metadata = ( AVContentLightMetadata * ) sd - > data ;
print_int ( " max_content " , metadata - > MaxCLL ) ;
print_int ( " max_content " , metadata - > MaxCLL ) ;
print_int ( " max_average " , metadata - > MaxFALL ) ;
print_int ( " max_average " , metadata - > MaxFALL ) ;
} else if ( sd - > type = = AV_PKT_DATA_DOVI_CONF ) {
AVDOVIDecoderConfigurationRecord * dovi = ( AVDOVIDecoderConfigurationRecord * ) sd - > data ;
print_int ( " dv_version_major " , dovi - > dv_version_major ) ;
print_int ( " dv_version_minor " , dovi - > dv_version_minor ) ;
print_int ( " dv_profile " , dovi - > dv_profile ) ;
print_int ( " dv_level " , dovi - > dv_level ) ;
print_int ( " rpu_present_flag " , dovi - > rpu_present_flag ) ;
print_int ( " el_present_flag " , dovi - > el_present_flag ) ;
print_int ( " bl_present_flag " , dovi - > bl_present_flag ) ;
print_int ( " dv_bl_signal_compatibility_id " , dovi - > dv_bl_signal_compatibility_id ) ;
}
}
writer_print_section_footer ( w ) ;
writer_print_section_footer ( w ) ;
}
}
@ -2214,7 +2326,7 @@ static void show_frame(WriterContext *w, AVFrame *frame, AVStream *stream,
writer_print_section_header ( w , SECTION_ID_FRAME_SIDE_DATA_TIMECODE_LIST ) ;
writer_print_section_header ( w , SECTION_ID_FRAME_SIDE_DATA_TIMECODE_LIST ) ;
for ( int j = 1 ; j < = m ; j + + ) {
for ( int j = 1 ; j < = m ; j + + ) {
char tcbuf [ AV_TIMECODE_STR_SIZE ] ;
char tcbuf [ AV_TIMECODE_STR_SIZE ] ;
av_timecode_make_smpte_tc_string ( tcbuf , tc [ j ] , 0 ) ;
av_timecode_make_smpte_tc_string2 ( tcbuf , stream - > avg_frame_rate , tc [ j ] , 0 , 0 ) ;
writer_print_section_header ( w , SECTION_ID_FRAME_SIDE_DATA_TIMECODE ) ;
writer_print_section_header ( w , SECTION_ID_FRAME_SIDE_DATA_TIMECODE ) ;
print_str ( " value " , tcbuf ) ;
print_str ( " value " , tcbuf ) ;
writer_print_section_footer ( w ) ;
writer_print_section_footer ( w ) ;
@ -2239,6 +2351,9 @@ static void show_frame(WriterContext *w, AVFrame *frame, AVStream *stream,
print_q ( " min_luminance " , metadata - > min_luminance , ' / ' ) ;
print_q ( " min_luminance " , metadata - > min_luminance , ' / ' ) ;
print_q ( " max_luminance " , metadata - > max_luminance , ' / ' ) ;
print_q ( " max_luminance " , metadata - > max_luminance , ' / ' ) ;
}
}
} else if ( sd - > type = = AV_FRAME_DATA_DYNAMIC_HDR_PLUS ) {
AVDynamicHDRPlus * metadata = ( AVDynamicHDRPlus * ) sd - > data ;
print_dynamic_hdr10_plus ( w , metadata ) ;
} else if ( sd - > type = = AV_FRAME_DATA_CONTENT_LIGHT_LEVEL ) {
} else if ( sd - > type = = AV_FRAME_DATA_CONTENT_LIGHT_LEVEL ) {
AVContentLightMetadata * metadata = ( AVContentLightMetadata * ) sd - > data ;
AVContentLightMetadata * metadata = ( AVContentLightMetadata * ) sd - > data ;
print_int ( " max_content " , metadata - > MaxCLL ) ;
print_int ( " max_content " , metadata - > MaxCLL ) ;
@ -2539,6 +2654,7 @@ static int show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_id
if ( dec_ctx ) {
if ( dec_ctx ) {
print_int ( " coded_width " , dec_ctx - > coded_width ) ;
print_int ( " coded_width " , dec_ctx - > coded_width ) ;
print_int ( " coded_height " , dec_ctx - > coded_height ) ;
print_int ( " coded_height " , dec_ctx - > coded_height ) ;
print_int ( " closed_captions " , ! ! ( dec_ctx - > properties & FF_CODEC_PROPERTY_CLOSED_CAPTIONS ) ) ;
}
}
# endif
# endif
print_int ( " has_b_frames " , par - > video_delay ) ;
print_int ( " has_b_frames " , par - > video_delay ) ;
@ -2840,11 +2956,11 @@ static void show_error(WriterContext *w, int err)
writer_print_section_footer ( w ) ;
writer_print_section_footer ( w ) ;
}
}
static int open_input_file ( InputFile * ifile , const char * filename )
static int open_input_file ( InputFile * ifile , const char * filename , const char * print_filename )
{
{
int err , i ;
int err , i ;
AVFormatContext * fmt_ctx = NULL ;
AVFormatContext * fmt_ctx = NULL ;
AVDictionaryEntry * t ;
AVDictionaryEntry * t = NULL ;
int scan_all_pmts_set = 0 ;
int scan_all_pmts_set = 0 ;
fmt_ctx = avformat_alloc_context ( ) ;
fmt_ctx = avformat_alloc_context ( ) ;
@ -2862,13 +2978,15 @@ static int open_input_file(InputFile *ifile, const char *filename)
print_error ( filename , err ) ;
print_error ( filename , err ) ;
return err ;
return err ;
}
}
if ( print_filename ) {
av_freep ( & fmt_ctx - > url ) ;
fmt_ctx - > url = av_strdup ( print_filename ) ;
}
ifile - > fmt_ctx = fmt_ctx ;
ifile - > fmt_ctx = fmt_ctx ;
if ( scan_all_pmts_set )
if ( scan_all_pmts_set )
av_dict_set ( & format_opts , " scan_all_pmts " , NULL , AV_DICT_MATCH_CASE ) ;
av_dict_set ( & format_opts , " scan_all_pmts " , NULL , AV_DICT_MATCH_CASE ) ;
if ( ( t = av_dict_get ( format_opts , " " , NULL , AV_DICT_IGNORE_SUFFIX ) ) ) {
while ( ( t = av_dict_get ( format_opts , " " , t , AV_DICT_IGNORE_SUFFIX ) ) )
av_log ( NULL , AV_LOG_ERROR , " Option %s not found. \n " , t - > key ) ;
av_log ( NULL , AV_LOG_WARNING , " Option %s skipped - not known to demuxer. \n " , t - > key ) ;
return AVERROR_OPTION_NOT_FOUND ;
}
if ( find_stream_info ) {
if ( find_stream_info ) {
AVDictionary * * opts = setup_find_stream_info_opts ( fmt_ctx , codec_opts ) ;
AVDictionary * * opts = setup_find_stream_info_opts ( fmt_ctx , codec_opts ) ;
@ -2938,6 +3056,7 @@ static int open_input_file(InputFile *ifile, const char *filename)
ist - > dec_ctx - > pkt_timebase = stream - > time_base ;
ist - > dec_ctx - > pkt_timebase = stream - > time_base ;
ist - > dec_ctx - > framerate = stream - > avg_frame_rate ;
ist - > dec_ctx - > framerate = stream - > avg_frame_rate ;
# if FF_API_LAVF_AVCTX
# if FF_API_LAVF_AVCTX
ist - > dec_ctx - > properties = stream - > codec - > properties ;
ist - > dec_ctx - > coded_width = stream - > codec - > coded_width ;
ist - > dec_ctx - > coded_width = stream - > codec - > coded_width ;
ist - > dec_ctx - > coded_height = stream - > codec - > coded_height ;
ist - > dec_ctx - > coded_height = stream - > codec - > coded_height ;
# endif
# endif
@ -2975,7 +3094,8 @@ static void close_input_file(InputFile *ifile)
avformat_close_input ( & ifile - > fmt_ctx ) ;
avformat_close_input ( & ifile - > fmt_ctx ) ;
}
}
static int probe_file ( WriterContext * wctx , const char * filename )
static int probe_file ( WriterContext * wctx , const char * filename ,
const char * print_filename )
{
{
InputFile ifile = { 0 } ;
InputFile ifile = { 0 } ;
int ret , i ;
int ret , i ;
@ -2984,7 +3104,7 @@ static int probe_file(WriterContext *wctx, const char *filename)
do_read_frames = do_show_frames | | do_count_frames ;
do_read_frames = do_show_frames | | do_count_frames ;
do_read_packets = do_show_packets | | do_count_packets ;
do_read_packets = do_show_packets | | do_count_packets ;
ret = open_input_file ( & ifile , filename ) ;
ret = open_input_file ( & ifile , filename , print_filename ) ;
if ( ret < 0 )
if ( ret < 0 )
goto end ;
goto end ;
@ -3289,6 +3409,12 @@ static int opt_input_file_i(void *optctx, const char *opt, const char *arg)
return 0 ;
return 0 ;
}
}
static int opt_print_filename ( void * optctx , const char * opt , const char * arg )
{
print_input_filename = arg ;
return 0 ;
}
void show_help_default_ffprobe ( const char * opt , const char * arg )
void show_help_default_ffprobe ( const char * opt , const char * arg )
{
{
show_usage ( ) ;
show_usage ( ) ;
@ -3563,10 +3689,12 @@ void ffprobe_var_cleanup() {
read_intervals = NULL ;
read_intervals = NULL ;
read_intervals_nb = 0 ;
read_intervals_nb = 0 ;
find_stream_info = 1 ;
ffprobe_options = NULL ;
ffprobe_options = NULL ;
input_filename = NULL ;
input_filename = NULL ;
print_input_filename = NULL ;
iformat = NULL ;
iformat = NULL ;
hash = NULL ;
hash = NULL ;
@ -3633,13 +3761,13 @@ int ffprobe_execute(int argc, char **argv)
" use sexagesimal format HOURS:MM:SS.MICROSECONDS for time units " } ,
" use sexagesimal format HOURS:MM:SS.MICROSECONDS for time units " } ,
{ " pretty " , 0 , { . func_arg = opt_pretty } ,
{ " pretty " , 0 , { . func_arg = opt_pretty } ,
" prettify the format of displayed values, make it more human readable " } ,
" prettify the format of displayed values, make it more human readable " } ,
{ " print_format " , OPT_STRING | HAS_ARG , { ( void * ) & print_format } ,
{ " print_format " , OPT_STRING | HAS_ARG , { & print_format } ,
" set the output printing format (available formats are: default, compact, csv, flat, ini, json, xml) " , " format " } ,
" set the output printing format (available formats are: default, compact, csv, flat, ini, json, xml) " , " format " } ,
{ " of " , OPT_STRING | HAS_ARG , { ( void * ) & print_format } , " alias for -print_format " , " format " } ,
{ " of " , OPT_STRING | HAS_ARG , { & print_format } , " alias for -print_format " , " format " } ,
{ " select_streams " , OPT_STRING | HAS_ARG , { ( void * ) & stream_specifier } , " select the specified streams " , " stream_specifier " } ,
{ " select_streams " , OPT_STRING | HAS_ARG , { & stream_specifier } , " select the specified streams " , " stream_specifier " } ,
{ " sections " , OPT_EXIT , { . func_arg = opt_sections } , " print sections structure and section information, and exit " } ,
{ " sections " , OPT_EXIT , { . func_arg = opt_sections } , " print sections structure and section information, and exit " } ,
{ " show_data " , OPT_BOOL , { ( void * ) & do_show_data } , " show packets data " } ,
{ " show_data " , OPT_BOOL , { & do_show_data } , " show packets data " } ,
{ " show_data_hash " , OPT_STRING | HAS_ARG , { ( void * ) & show_data_hash } , " show packets data hash " } ,
{ " show_data_hash " , OPT_STRING | HAS_ARG , { & show_data_hash } , " show packets data hash " } ,
{ " show_error " , 0 , { . func_arg = & opt_show_error } , " show probing error " } ,
{ " show_error " , 0 , { . func_arg = & opt_show_error } , " show probing error " } ,
{ " show_format " , 0 , { . func_arg = & opt_show_format } , " show format/container info " } ,
{ " show_format " , 0 , { . func_arg = & opt_show_format } , " show format/container info " } ,
{ " show_frames " , 0 , { . func_arg = & opt_show_frames } , " show frames info " } ,
{ " show_frames " , 0 , { . func_arg = & opt_show_frames } , " show frames info " } ,
@ -3648,24 +3776,25 @@ int ffprobe_execute(int argc, char **argv)
{ " show_entries " , HAS_ARG , { . func_arg = opt_show_entries } ,
{ " show_entries " , HAS_ARG , { . func_arg = opt_show_entries } ,
" show a set of specified entries " , " entry_list " } ,
" show a set of specified entries " , " entry_list " } ,
# if HAVE_THREADS
# if HAVE_THREADS
{ " show_log " , OPT_INT | HAS_ARG , { ( void * ) & do_show_log } , " show log " } ,
{ " show_log " , OPT_INT | HAS_ARG , { & do_show_log } , " show log " } ,
# endif
# endif
{ " show_packets " , 0 , { . func_arg = & opt_show_packets } , " show packets info " } ,
{ " show_packets " , 0 , { . func_arg = & opt_show_packets } , " show packets info " } ,
{ " show_programs " , 0 , { . func_arg = & opt_show_programs } , " show programs info " } ,
{ " show_programs " , 0 , { . func_arg = & opt_show_programs } , " show programs info " } ,
{ " show_streams " , 0 , { . func_arg = & opt_show_streams } , " show streams info " } ,
{ " show_streams " , 0 , { . func_arg = & opt_show_streams } , " show streams info " } ,
{ " show_chapters " , 0 , { . func_arg = & opt_show_chapters } , " show chapters info " } ,
{ " show_chapters " , 0 , { . func_arg = & opt_show_chapters } , " show chapters info " } ,
{ " count_frames " , OPT_BOOL , { ( void * ) & do_count_frames } , " count the number of frames per stream " } ,
{ " count_frames " , OPT_BOOL , { & do_count_frames } , " count the number of frames per stream " } ,
{ " count_packets " , OPT_BOOL , { ( void * ) & do_count_packets } , " count the number of packets per stream " } ,
{ " count_packets " , OPT_BOOL , { & do_count_packets } , " count the number of packets per stream " } ,
{ " show_program_version " , 0 , { . func_arg = & opt_show_program_version } , " show ffprobe version " } ,
{ " show_program_version " , 0 , { . func_arg = & opt_show_program_version } , " show ffprobe version " } ,
{ " show_library_versions " , 0 , { . func_arg = & opt_show_library_versions } , " show library versions " } ,
{ " show_library_versions " , 0 , { . func_arg = & opt_show_library_versions } , " show library versions " } ,
{ " show_versions " , 0 , { . func_arg = & opt_show_versions } , " show program and library versions " } ,
{ " show_versions " , 0 , { . func_arg = & opt_show_versions } , " show program and library versions " } ,
{ " show_pixel_formats " , 0 , { . func_arg = & opt_show_pixel_formats } , " show pixel format descriptions " } ,
{ " show_pixel_formats " , 0 , { . func_arg = & opt_show_pixel_formats } , " show pixel format descriptions " } ,
{ " show_private_data " , OPT_BOOL , { ( void * ) & show_private_data } , " show private data " } ,
{ " show_private_data " , OPT_BOOL , { & show_private_data } , " show private data " } ,
{ " private " , OPT_BOOL , { ( void * ) & show_private_data } , " same as show_private_data " } ,
{ " private " , OPT_BOOL , { & show_private_data } , " same as show_private_data " } ,
{ " bitexact " , OPT_BOOL , { & do_bitexact } , " force bitexact output " } ,
{ " bitexact " , OPT_BOOL , { & do_bitexact } , " force bitexact output " } ,
{ " read_intervals " , HAS_ARG , { . func_arg = opt_read_intervals } , " set read intervals " , " read_intervals " } ,
{ " read_intervals " , HAS_ARG , { . func_arg = opt_read_intervals } , " set read intervals " , " read_intervals " } ,
{ " default " , HAS_ARG | OPT_AUDIO | OPT_VIDEO | OPT_EXPERT , { . func_arg = opt_default } , " generic catch all option " , " " } ,
{ " default " , HAS_ARG | OPT_AUDIO | OPT_VIDEO | OPT_EXPERT , { . func_arg = opt_default } , " generic catch all option " , " " } ,
{ " i " , HAS_ARG , { . func_arg = opt_input_file_i } , " read specified file " , " input_file " } ,
{ " i " , HAS_ARG , { . func_arg = opt_input_file_i } , " read specified file " , " input_file " } ,
{ " print_filename " , HAS_ARG , { . func_arg = opt_print_filename } , " override the printed input filename " , " print_file " } ,
{ " find_stream_info " , OPT_BOOL | OPT_INPUT | OPT_EXPERT , { & find_stream_info } ,
{ " find_stream_info " , OPT_BOOL | OPT_INPUT | OPT_EXPERT , { & find_stream_info } ,
" read and decode the streams to fill missing information with heuristics " } ,
" read and decode the streams to fill missing information with heuristics " } ,
{ NULL , } ,
{ NULL , } ,
@ -3800,7 +3929,7 @@ int ffprobe_execute(int argc, char **argv)
av_log ( NULL , AV_LOG_ERROR , " Use -h to get full help or, even better, run 'man %s'. \n " , program_name ) ;
av_log ( NULL , AV_LOG_ERROR , " Use -h to get full help or, even better, run 'man %s'. \n " , program_name ) ;
ret = AVERROR ( EINVAL ) ;
ret = AVERROR ( EINVAL ) ;
} else if ( input_filename ) {
} else if ( input_filename ) {
ret = probe_file ( wctx , input_filename ) ;
ret = probe_file ( wctx , input_filename , print_ input_filename) ;
if ( ret < 0 & & do_show_error )
if ( ret < 0 & & do_show_error )
show_error ( wctx , ret ) ;
show_error ( wctx , ret ) ;
}
}