[FFmpeg-trac] #3706(undetermined:new): support header row per section in ffprobe csv writer

FFmpeg trac at avcodec.org
Mon Jun 9 16:46:19 CEST 2014


#3706: support header row per section in ffprobe csv writer
-------------------------------------+-------------------------------------
               Reporter:  dericed    |                  Owner:
                   Type:             |                 Status:  new
  enhancement                        |              Component:
               Priority:  normal     |  undetermined
                Version:  git-       |               Keywords:  ffprobe,csv
  master                             |               Blocking:
             Blocked By:             |  Analyzed by developer:  0
Reproduced by developer:  0          |
-------------------------------------+-------------------------------------
 Summary of the enhancement:

 I propose an option in the csv writer of ffprobe to write out header rows
 per section.


 {{{
 ffprobe -v 0 -f lavfi smptebars=r=3:d=1 -of csv -show_streams -show_format
 -show_frames
 frame,video,1,0,0.000000,0,0.000000,0,0.000000,1,0.333333,N/A,N/A,320,240,yuv420p,1:1,I,0,0,0,0,0
 frame,video,1,1,0.333333,1,0.333333,1,0.333333,1,0.333333,N/A,N/A,320,240,yuv420p,1:1,I,0,0,0,0,0
 frame,video,1,2,0.666667,2,0.666667,2,0.666667,1,0.333333,N/A,N/A,320,240,yuv420p,1:1,I,0,0,0,0,0
 stream,0,rawvideo,raw
 video,unknown,video,1/3,I420,0x30323449,320,240,0,1:1,4:3,yuv420p,-99,N/A,N/A,3/1,3/1,1/3,0,0.000000,N/A,N/A,N/A,N/A,3,N/A,0,0,0,0,0,0,0,0,0,0,0
 format,smptebars=r=3:d=1,1,0,lavfi,Libavfilter virtual input
 device,0.000000,N/A,N/A,N/A,25
 }}}


 with a proposed header option the output could be:


 {{{
 frame,media_type,key_frame,pkt_pts,pkt_pts_time,pkt_dts,pkt_dts_time,best_effort_timestamp,best_effort_timestamp_time,pkt_duration,pkt_duration_time,pkt_pos,pkt_size,width,height,pix_fmt,sample_aspect_ratio,pict_type,coded_picture_number,display_picture_number,interlaced_frame,top_field_first,repeat_pict
 frame,video,1,0,0.000000,0,0.000000,0,0.000000,1,0.333333,N/A,N/A,320,240,yuv420p,1:1,I,0,0,0,0,0
 frame,video,1,1,0.333333,1,0.333333,1,0.333333,1,0.333333,N/A,N/A,320,240,yuv420p,1:1,I,0,0,0,0,0
 frame,video,1,2,0.666667,2,0.666667,2,0.666667,1,0.333333,N/A,N/A,320,240,yuv420p,1:1,I,0,0,0,0,0
 stream,index,codec_name,codec_long_name,profile,codec_type,codec_time_base,codec_tag_string,codec_tag,width,height,has_b_frames,sample_aspect_ratio,display_aspect_ratio,pix_fmt,level,timecode,id,r_frame_rate,avg_frame_rate,time_base,start_pts,start_time,duration_ts,duration,bit_rate,nb_frames,nb_read_frames,nb_read_packets,DISPOSITION:default,DISPOSITION:dub,DISPOSITION:original,DISPOSITION:comment,DISPOSITION:lyrics,DISPOSITION:karaoke,DISPOSITION:forced,DISPOSITION:hearing_impaired,DISPOSITION:visual_impaired,DISPOSITION:clean_effects,DISPOSITION:attached_pic
 stream,0,rawvideo,raw
 video,unknown,video,1/3,I420,0x30323449,320,240,0,1:1,4:3,yuv420p,-99,N/A,N/A,3/1,3/1,1/3,0,0.000000,N/A,N/A,N/A,N/A,3,N/A,0,0,0,0,0,0,0,0,0,0,0
 format,filename,nb_streams,nb_programs,format_name,format_long_name,start_time,duration,size,bit_rate,probe_score
 format,smptebars=r=3:d=1,1,0,lavfi,Libavfilter virtual input
 device,0.000000,N/A,N/A,N/A,25
 }}}

 I think the advantage here is the output is much more self-descriptive and
 sustainable as the output of ffprobe changes/expands as it is developed. I
 know there are other self-descriptive formats such as json and xml but
 these are close to 10x the data rate of csv. A csv output with per-section
 headers would have a low data but still be self-descriptive.
 Dave Rice

--
Ticket URL: <https://trac.ffmpeg.org/ticket/3706>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list