Merge commit '2eba9087f3031c6050f8dcd996225490be6c2410'
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 12 Mar 2013 11:41:16 +0000 (12:41 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 12 Mar 2013 11:49:59 +0000 (12:49 +0100)
* commit '2eba9087f3031c6050f8dcd996225490be6c2410':
  lavc: make up a fake frame channel layout when there is no real one.

Conflicts:
libavcodec/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavcodec/internal.h
libavcodec/utils.c
tests/ref/fate/ffprobe_compact
tests/ref/fate/ffprobe_csv
tests/ref/fate/ffprobe_default
tests/ref/fate/ffprobe_flat
tests/ref/fate/ffprobe_ini
tests/ref/fate/ffprobe_json
tests/ref/fate/ffprobe_xml

@@@ -131,23 -118,6 +131,23 @@@ int ff_match_2uint16(const uint16_t (*t
  
  unsigned int avpriv_toupper4(unsigned int x);
  
- void ff_init_buffer_info(AVCodecContext *s, AVFrame *frame);
 +/**
 + * does needed setup of pkt_pts/pos and such for (re)get_buffer();
 + */
++int ff_init_buffer_info(AVCodecContext *s, AVFrame *frame);
 +
 +
 +void avpriv_color_frame(AVFrame *frame, const int color[4]);
 +
 +/**
 + * Remove and free all side data from packet.
 + */
 +void ff_packet_free_side_data(AVPacket *pkt);
 +
 +extern volatile int ff_avcodec_locked;
 +int ff_lock_avcodec(AVCodecContext *log_ctx);
 +int ff_unlock_avcodec(void);
 +
  int avpriv_lock_avformat(void);
  int avpriv_unlock_avformat(void);
  
@@@ -597,22 -521,36 +597,22 @@@ int avcodec_default_get_buffer2(AVCodec
      }
  }
  
- void ff_init_buffer_info(AVCodecContext *avctx, AVFrame *frame)
 -#if FF_API_GET_BUFFER
 -int avcodec_default_get_buffer(AVCodecContext *avctx, AVFrame *frame)
 -{
 -    return avcodec_default_get_buffer2(avctx, frame, 0);
 -}
 -
 -typedef struct CompatReleaseBufPriv {
 -    AVCodecContext avctx;
 -    AVFrame frame;
 -} CompatReleaseBufPriv;
 -
 -static void compat_free_buffer(void *opaque, uint8_t *data)
 -{
 -    CompatReleaseBufPriv *priv = opaque;
 -    priv->avctx.release_buffer(&priv->avctx, &priv->frame);
 -    av_freep(&priv);
 -}
 -
 -static void compat_release_buffer(void *opaque, uint8_t *data)
 -{
 -    AVBufferRef *buf = opaque;
 -    av_buffer_unref(&buf);
 -}
 -#endif
 -
 -int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags)
++int ff_init_buffer_info(AVCodecContext *avctx, AVFrame *frame)
  {
 -    int ret;
 +    if (avctx->pkt) {
 +        frame->pkt_pts = avctx->pkt->pts;
 +        av_frame_set_pkt_pos     (frame, avctx->pkt->pos);
 +        av_frame_set_pkt_duration(frame, avctx->pkt->duration);
 +        av_frame_set_pkt_size    (frame, avctx->pkt->size);
 +    } else {
 +        frame->pkt_pts = AV_NOPTS_VALUE;
 +        av_frame_set_pkt_pos     (frame, -1);
 +        av_frame_set_pkt_duration(frame, 0);
 +        av_frame_set_pkt_size    (frame, -1);
 +    }
 +    frame->reordered_opaque = avctx->reordered_opaque;
  
 -    switch (avctx->codec_type) {
 +    switch (avctx->codec->type) {
      case AVMEDIA_TYPE_VIDEO:
          if (!frame->width)
              frame->width               = avctx->width;
              frame->sample_rate    = avctx->sample_rate;
          if (frame->format < 0)
              frame->format         = avctx->sample_fmt;
-         if (!frame->channel_layout)
-             frame->channel_layout = avctx->channel_layout;
+         if (!frame->channel_layout) {
+             if (avctx->channel_layout) {
+                  if (av_get_channel_layout_nb_channels(avctx->channel_layout) !=
+                      avctx->channels) {
+                      av_log(avctx, AV_LOG_ERROR, "Inconsistent channel "
+                             "configuration.\n");
+                      return AVERROR(EINVAL);
+                  }
+                 frame->channel_layout = avctx->channel_layout;
+             } else {
+                 if (avctx->channels > FF_SANE_NB_CHANNELS) {
+                     av_log(avctx, AV_LOG_ERROR, "Too many channels: %d.\n",
+                            avctx->channels);
+                     return AVERROR(ENOSYS);
+                 }
+                 frame->channel_layout = av_get_default_channel_layout(avctx->channels);
+                 if (!frame->channel_layout)
+                     frame->channel_layout = (1ULL << avctx->channels) - 1;
+             }
+         }
 +        av_frame_set_channels(frame, avctx->channels);
          break;
 -    default: return AVERROR(EINVAL);
      }
++    return 0;
 +}
  
 -    frame->pkt_pts = avctx->pkt ? avctx->pkt->pts : AV_NOPTS_VALUE;
 -    frame->reordered_opaque = avctx->reordered_opaque;
 +#if FF_API_GET_BUFFER
 +int avcodec_default_get_buffer(AVCodecContext *avctx, AVFrame *frame)
 +{
 +    return avcodec_default_get_buffer2(avctx, frame, 0);
 +}
 +
 +typedef struct CompatReleaseBufPriv {
 +    AVCodecContext avctx;
 +    AVFrame frame;
 +} CompatReleaseBufPriv;
 +
 +static void compat_free_buffer(void *opaque, uint8_t *data)
 +{
 +    CompatReleaseBufPriv *priv = opaque;
 +    priv->avctx.release_buffer(&priv->avctx, &priv->frame);
 +    av_freep(&priv);
 +}
 +
 +static void compat_release_buffer(void *opaque, uint8_t *data)
 +{
 +    AVBufferRef *buf = opaque;
 +    av_buffer_unref(&buf);
 +}
 +#endif
 +
 +int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags)
 +{
 +    int ret;
 +
 +    if (avctx->codec_type == AVMEDIA_TYPE_VIDEO) {
 +        if ((ret = av_image_check_size(avctx->width, avctx->height, 0, avctx)) < 0 || avctx->pix_fmt<0) {
 +            av_log(avctx, AV_LOG_ERROR, "video_get_buffer: image parameters invalid\n");
 +            return AVERROR(EINVAL);
 +        }
 +    }
-     ff_init_buffer_info(avctx, frame);
++    if ((ret = ff_init_buffer_info(avctx, frame)) < 0)
++        return ret;
  
  #if FF_API_GET_BUFFER
      /*
index 2c903d4,0000000..e567913
mode 100644,000000..100644
--- /dev/null
@@@ -1,32 -1,0 +1,32 @@@
- frame|media_type=audio|key_frame=1|pkt_pts=0|pkt_pts_time=0.000000|pkt_dts=0|pkt_dts_time=0.000000|pkt_duration=1024|pkt_duration_time=0.023220|pkt_pos=572|pkt_size=2048|sample_fmt=s16|nb_samples=1024|channels=1|channel_layout=unknown
 +packet|codec_type=audio|stream_index=0|pts=0|pts_time=0.000000|dts=0|dts_time=0.000000|duration=1024|duration_time=0.023220|convergence_duration=N/A|convergence_duration_time=N/A|size=2048|pos=572|flags=K
- frame|media_type=audio|key_frame=1|pkt_pts=1024|pkt_pts_time=0.023220|pkt_dts=1024|pkt_dts_time=0.023220|pkt_duration=1024|pkt_duration_time=0.023220|pkt_pos=263073|pkt_size=2048|sample_fmt=s16|nb_samples=1024|channels=1|channel_layout=unknown
++frame|media_type=audio|key_frame=1|pkt_pts=0|pkt_pts_time=0.000000|pkt_dts=0|pkt_dts_time=0.000000|pkt_duration=1024|pkt_duration_time=0.023220|pkt_pos=572|pkt_size=2048|sample_fmt=s16|nb_samples=1024|channels=1|channel_layout=mono
 +packet|codec_type=video|stream_index=1|pts=0|pts_time=0.000000|dts=0|dts_time=0.000000|duration=2048|duration_time=0.040000|convergence_duration=N/A|convergence_duration_time=N/A|size=230400|pos=2647|flags=K
 +frame|media_type=video|key_frame=1|pkt_pts=0|pkt_pts_time=0.000000|pkt_dts=0|pkt_dts_time=0.000000|pkt_duration=2048|pkt_duration_time=0.040000|pkt_pos=2647|pkt_size=N/A|width=320|height=240|pix_fmt=rgb24|sample_aspect_ratio=1:1|pict_type=I|coded_picture_number=0|display_picture_number=0|interlaced_frame=0|top_field_first=0|repeat_pict=0|reference=0
 +packet|codec_type=video|stream_index=2|pts=0|pts_time=0.000000|dts=0|dts_time=0.000000|duration=2048|duration_time=0.040000|convergence_duration=N/A|convergence_duration_time=N/A|size=30000|pos=233068|flags=K
 +frame|media_type=video|key_frame=1|pkt_pts=0|pkt_pts_time=0.000000|pkt_dts=0|pkt_dts_time=0.000000|pkt_duration=2048|pkt_duration_time=0.040000|pkt_pos=233068|pkt_size=N/A|width=100|height=100|pix_fmt=rgb24|sample_aspect_ratio=1:1|pict_type=I|coded_picture_number=0|display_picture_number=0|interlaced_frame=0|top_field_first=0|repeat_pict=0|reference=0
 +packet|codec_type=audio|stream_index=0|pts=1024|pts_time=0.023220|dts=1024|dts_time=0.023220|duration=1024|duration_time=0.023220|convergence_duration=N/A|convergence_duration_time=N/A|size=2048|pos=263073|flags=K
- frame|media_type=audio|key_frame=1|pkt_pts=2048|pkt_pts_time=0.046440|pkt_dts=2048|pkt_dts_time=0.046440|pkt_duration=1024|pkt_duration_time=0.023220|pkt_pos=525580|pkt_size=2048|sample_fmt=s16|nb_samples=1024|channels=1|channel_layout=unknown
++frame|media_type=audio|key_frame=1|pkt_pts=1024|pkt_pts_time=0.023220|pkt_dts=1024|pkt_dts_time=0.023220|pkt_duration=1024|pkt_duration_time=0.023220|pkt_pos=263073|pkt_size=2048|sample_fmt=s16|nb_samples=1024|channels=1|channel_layout=mono
 +packet|codec_type=video|stream_index=1|pts=2048|pts_time=0.040000|dts=2048|dts_time=0.040000|duration=2048|duration_time=0.040000|convergence_duration=N/A|convergence_duration_time=N/A|size=230400|pos=265151|flags=K
 +frame|media_type=video|key_frame=1|pkt_pts=2048|pkt_pts_time=0.040000|pkt_dts=2048|pkt_dts_time=0.040000|pkt_duration=2048|pkt_duration_time=0.040000|pkt_pos=265151|pkt_size=N/A|width=320|height=240|pix_fmt=rgb24|sample_aspect_ratio=1:1|pict_type=I|coded_picture_number=0|display_picture_number=0|interlaced_frame=0|top_field_first=0|repeat_pict=0|reference=0
 +packet|codec_type=video|stream_index=2|pts=2048|pts_time=0.040000|dts=2048|dts_time=0.040000|duration=2048|duration_time=0.040000|convergence_duration=N/A|convergence_duration_time=N/A|size=30000|pos=495575|flags=K
 +frame|media_type=video|key_frame=1|pkt_pts=2048|pkt_pts_time=0.040000|pkt_dts=2048|pkt_dts_time=0.040000|pkt_duration=2048|pkt_duration_time=0.040000|pkt_pos=495575|pkt_size=N/A|width=100|height=100|pix_fmt=rgb24|sample_aspect_ratio=1:1|pict_type=I|coded_picture_number=0|display_picture_number=0|interlaced_frame=0|top_field_first=0|repeat_pict=0|reference=0
 +packet|codec_type=audio|stream_index=0|pts=2048|pts_time=0.046440|dts=2048|dts_time=0.046440|duration=1024|duration_time=0.023220|convergence_duration=N/A|convergence_duration_time=N/A|size=2048|pos=525580|flags=K
- frame|media_type=audio|key_frame=1|pkt_pts=3072|pkt_pts_time=0.069660|pkt_dts=3072|pkt_dts_time=0.069660|pkt_duration=1024|pkt_duration_time=0.023220|pkt_pos=527651|pkt_size=2048|sample_fmt=s16|nb_samples=1024|channels=1|channel_layout=unknown
++frame|media_type=audio|key_frame=1|pkt_pts=2048|pkt_pts_time=0.046440|pkt_dts=2048|pkt_dts_time=0.046440|pkt_duration=1024|pkt_duration_time=0.023220|pkt_pos=525580|pkt_size=2048|sample_fmt=s16|nb_samples=1024|channels=1|channel_layout=mono
 +packet|codec_type=audio|stream_index=0|pts=3072|pts_time=0.069660|dts=3072|dts_time=0.069660|duration=1024|duration_time=0.023220|convergence_duration=N/A|convergence_duration_time=N/A|size=2048|pos=527651|flags=K
- frame|media_type=audio|key_frame=1|pkt_pts=4096|pkt_pts_time=0.092880|pkt_dts=4096|pkt_dts_time=0.092880|pkt_duration=1024|pkt_duration_time=0.023220|pkt_pos=790158|pkt_size=2048|sample_fmt=s16|nb_samples=1024|channels=1|channel_layout=unknown
++frame|media_type=audio|key_frame=1|pkt_pts=3072|pkt_pts_time=0.069660|pkt_dts=3072|pkt_dts_time=0.069660|pkt_duration=1024|pkt_duration_time=0.023220|pkt_pos=527651|pkt_size=2048|sample_fmt=s16|nb_samples=1024|channels=1|channel_layout=mono
 +packet|codec_type=video|stream_index=1|pts=4096|pts_time=0.080000|dts=4096|dts_time=0.080000|duration=2048|duration_time=0.040000|convergence_duration=N/A|convergence_duration_time=N/A|size=230400|pos=529729|flags=K
 +frame|media_type=video|key_frame=1|pkt_pts=4096|pkt_pts_time=0.080000|pkt_dts=4096|pkt_dts_time=0.080000|pkt_duration=2048|pkt_duration_time=0.040000|pkt_pos=529729|pkt_size=N/A|width=320|height=240|pix_fmt=rgb24|sample_aspect_ratio=1:1|pict_type=I|coded_picture_number=0|display_picture_number=0|interlaced_frame=0|top_field_first=0|repeat_pict=0|reference=0
 +packet|codec_type=video|stream_index=2|pts=4096|pts_time=0.080000|dts=4096|dts_time=0.080000|duration=2048|duration_time=0.040000|convergence_duration=N/A|convergence_duration_time=N/A|size=30000|pos=760153|flags=K
 +frame|media_type=video|key_frame=1|pkt_pts=4096|pkt_pts_time=0.080000|pkt_dts=4096|pkt_dts_time=0.080000|pkt_duration=2048|pkt_duration_time=0.040000|pkt_pos=760153|pkt_size=N/A|width=100|height=100|pix_fmt=rgb24|sample_aspect_ratio=1:1|pict_type=I|coded_picture_number=0|display_picture_number=0|interlaced_frame=0|top_field_first=0|repeat_pict=0|reference=0
 +packet|codec_type=audio|stream_index=0|pts=4096|pts_time=0.092880|dts=4096|dts_time=0.092880|duration=1024|duration_time=0.023220|convergence_duration=N/A|convergence_duration_time=N/A|size=2048|pos=790158|flags=K
- frame|media_type=audio|key_frame=1|pkt_pts=5120|pkt_pts_time=0.116100|pkt_dts=5120|pkt_dts_time=0.116100|pkt_duration=1024|pkt_duration_time=0.023220|pkt_pos=792229|pkt_size=2048|sample_fmt=s16|nb_samples=1024|channels=1|channel_layout=unknown
++frame|media_type=audio|key_frame=1|pkt_pts=4096|pkt_pts_time=0.092880|pkt_dts=4096|pkt_dts_time=0.092880|pkt_duration=1024|pkt_duration_time=0.023220|pkt_pos=790158|pkt_size=2048|sample_fmt=s16|nb_samples=1024|channels=1|channel_layout=mono
 +packet|codec_type=audio|stream_index=0|pts=5120|pts_time=0.116100|dts=5120|dts_time=0.116100|duration=1024|duration_time=0.023220|convergence_duration=N/A|convergence_duration_time=N/A|size=2048|pos=792229|flags=K
++frame|media_type=audio|key_frame=1|pkt_pts=5120|pkt_pts_time=0.116100|pkt_dts=5120|pkt_dts_time=0.116100|pkt_duration=1024|pkt_duration_time=0.023220|pkt_pos=792229|pkt_size=2048|sample_fmt=s16|nb_samples=1024|channels=1|channel_layout=mono
 +packet|codec_type=video|stream_index=1|pts=6144|pts_time=0.120000|dts=6144|dts_time=0.120000|duration=2048|duration_time=0.040000|convergence_duration=N/A|convergence_duration_time=N/A|size=230400|pos=794307|flags=K
 +frame|media_type=video|key_frame=1|pkt_pts=6144|pkt_pts_time=0.120000|pkt_dts=6144|pkt_dts_time=0.120000|pkt_duration=2048|pkt_duration_time=0.040000|pkt_pos=794307|pkt_size=N/A|width=320|height=240|pix_fmt=rgb24|sample_aspect_ratio=1:1|pict_type=I|coded_picture_number=0|display_picture_number=0|interlaced_frame=0|top_field_first=0|repeat_pict=0|reference=0
 +packet|codec_type=video|stream_index=2|pts=6144|pts_time=0.120000|dts=6144|dts_time=0.120000|duration=2048|duration_time=0.040000|convergence_duration=N/A|convergence_duration_time=N/A|size=30000|pos=1024731|flags=K
 +frame|media_type=video|key_frame=1|pkt_pts=6144|pkt_pts_time=0.120000|pkt_dts=6144|pkt_dts_time=0.120000|pkt_duration=2048|pkt_duration_time=0.040000|pkt_pos=1024731|pkt_size=N/A|width=100|height=100|pix_fmt=rgb24|sample_aspect_ratio=1:1|pict_type=I|coded_picture_number=0|display_picture_number=0|interlaced_frame=0|top_field_first=0|repeat_pict=0|reference=0
 +stream|index=0|codec_name=pcm_s16le|profile=unknown|codec_type=audio|codec_time_base=1/44100|codec_tag_string=PSD[16]|codec_tag=0x10445350|sample_fmt=s16|sample_rate=44100|channels=1|bits_per_sample=16|id=N/A|r_frame_rate=0/0|avg_frame_rate=0/0|time_base=1/44100|start_pts=0|start_time=0.000000|duration_ts=527406|duration=11.959320|bit_rate=705600|nb_frames=N/A|nb_read_frames=6|nb_read_packets=6|disposition:default=0|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|tag:E=mc²
 +stream|index=1|codec_name=rawvideo|profile=unknown|codec_type=video|codec_time_base=1/51200|codec_tag_string=RGB[24]|codec_tag=0x18424752|width=320|height=240|has_b_frames=0|sample_aspect_ratio=1:1|display_aspect_ratio=4:3|pix_fmt=rgb24|level=-99|timecode=N/A|id=N/A|r_frame_rate=25/1|avg_frame_rate=25/1|time_base=1/51200|start_pts=0|start_time=0.000000|duration_ts=612317|duration=11.959316|bit_rate=N/A|nb_frames=N/A|nb_read_frames=4|nb_read_packets=4|disposition:default=0|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|tag:title=foobar|tag:duration_ts=field-and-tags-conflict-attempt
 +stream|index=2|codec_name=rawvideo|profile=unknown|codec_type=video|codec_time_base=1/51200|codec_tag_string=RGB[24]|codec_tag=0x18424752|width=100|height=100|has_b_frames=0|sample_aspect_ratio=1:1|display_aspect_ratio=1:1|pix_fmt=rgb24|level=-99|timecode=N/A|id=N/A|r_frame_rate=25/1|avg_frame_rate=25/1|time_base=1/51200|start_pts=0|start_time=0.000000|duration_ts=612317|duration=11.959316|bit_rate=N/A|nb_frames=N/A|nb_read_frames=4|nb_read_packets=4|disposition:default=0|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0
 +format|filename=tests/data/ffprobe-test.nut|nb_streams=3|format_name=nut|start_time=0.000000|duration=11.959320|size=1054812|bit_rate=705599|tag:title=ffprobe test file|tag:comment='A comment with CSV, XML & JSON special chars': <tag value="x">|tag:comment2=I ♥ Üñîçød€
index 94314d7,0000000..8defbc9
mode 100644,000000..100644
--- /dev/null
@@@ -1,32 -1,0 +1,32 @@@
- frame,audio,1,0,0.000000,0,0.000000,1024,0.023220,572,2048,s16,1024,1,unknown
 +packet,audio,0,0,0.000000,0,0.000000,1024,0.023220,N/A,N/A,2048,572,K
- frame,audio,1,1024,0.023220,1024,0.023220,1024,0.023220,263073,2048,s16,1024,1,unknown
++frame,audio,1,0,0.000000,0,0.000000,1024,0.023220,572,2048,s16,1024,1,mono
 +packet,video,1,0,0.000000,0,0.000000,2048,0.040000,N/A,N/A,230400,2647,K
 +frame,video,1,0,0.000000,0,0.000000,2048,0.040000,2647,N/A,320,240,rgb24,1:1,I,0,0,0,0,0,0
 +packet,video,2,0,0.000000,0,0.000000,2048,0.040000,N/A,N/A,30000,233068,K
 +frame,video,1,0,0.000000,0,0.000000,2048,0.040000,233068,N/A,100,100,rgb24,1:1,I,0,0,0,0,0,0
 +packet,audio,0,1024,0.023220,1024,0.023220,1024,0.023220,N/A,N/A,2048,263073,K
- frame,audio,1,2048,0.046440,2048,0.046440,1024,0.023220,525580,2048,s16,1024,1,unknown
++frame,audio,1,1024,0.023220,1024,0.023220,1024,0.023220,263073,2048,s16,1024,1,mono
 +packet,video,1,2048,0.040000,2048,0.040000,2048,0.040000,N/A,N/A,230400,265151,K
 +frame,video,1,2048,0.040000,2048,0.040000,2048,0.040000,265151,N/A,320,240,rgb24,1:1,I,0,0,0,0,0,0
 +packet,video,2,2048,0.040000,2048,0.040000,2048,0.040000,N/A,N/A,30000,495575,K
 +frame,video,1,2048,0.040000,2048,0.040000,2048,0.040000,495575,N/A,100,100,rgb24,1:1,I,0,0,0,0,0,0
 +packet,audio,0,2048,0.046440,2048,0.046440,1024,0.023220,N/A,N/A,2048,525580,K
- frame,audio,1,3072,0.069660,3072,0.069660,1024,0.023220,527651,2048,s16,1024,1,unknown
++frame,audio,1,2048,0.046440,2048,0.046440,1024,0.023220,525580,2048,s16,1024,1,mono
 +packet,audio,0,3072,0.069660,3072,0.069660,1024,0.023220,N/A,N/A,2048,527651,K
- frame,audio,1,4096,0.092880,4096,0.092880,1024,0.023220,790158,2048,s16,1024,1,unknown
++frame,audio,1,3072,0.069660,3072,0.069660,1024,0.023220,527651,2048,s16,1024,1,mono
 +packet,video,1,4096,0.080000,4096,0.080000,2048,0.040000,N/A,N/A,230400,529729,K
 +frame,video,1,4096,0.080000,4096,0.080000,2048,0.040000,529729,N/A,320,240,rgb24,1:1,I,0,0,0,0,0,0
 +packet,video,2,4096,0.080000,4096,0.080000,2048,0.040000,N/A,N/A,30000,760153,K
 +frame,video,1,4096,0.080000,4096,0.080000,2048,0.040000,760153,N/A,100,100,rgb24,1:1,I,0,0,0,0,0,0
 +packet,audio,0,4096,0.092880,4096,0.092880,1024,0.023220,N/A,N/A,2048,790158,K
- frame,audio,1,5120,0.116100,5120,0.116100,1024,0.023220,792229,2048,s16,1024,1,unknown
++frame,audio,1,4096,0.092880,4096,0.092880,1024,0.023220,790158,2048,s16,1024,1,mono
 +packet,audio,0,5120,0.116100,5120,0.116100,1024,0.023220,N/A,N/A,2048,792229,K
++frame,audio,1,5120,0.116100,5120,0.116100,1024,0.023220,792229,2048,s16,1024,1,mono
 +packet,video,1,6144,0.120000,6144,0.120000,2048,0.040000,N/A,N/A,230400,794307,K
 +frame,video,1,6144,0.120000,6144,0.120000,2048,0.040000,794307,N/A,320,240,rgb24,1:1,I,0,0,0,0,0,0
 +packet,video,2,6144,0.120000,6144,0.120000,2048,0.040000,N/A,N/A,30000,1024731,K
 +frame,video,1,6144,0.120000,6144,0.120000,2048,0.040000,1024731,N/A,100,100,rgb24,1:1,I,0,0,0,0,0,0
 +stream,0,pcm_s16le,unknown,audio,1/44100,PSD[16],0x10445350,s16,44100,1,16,N/A,0/0,0/0,1/44100,0,0.000000,527406,11.959320,705600,N/A,6,6,0,0,0,0,0,0,0,0,0,0,0,mc²
 +stream,1,rawvideo,unknown,video,1/51200,RGB[24],0x18424752,320,240,0,1:1,4:3,rgb24,-99,N/A,N/A,25/1,25/1,1/51200,0,0.000000,612317,11.959316,N/A,N/A,4,4,0,0,0,0,0,0,0,0,0,0,0,foobar,field-and-tags-conflict-attempt
 +stream,2,rawvideo,unknown,video,1/51200,RGB[24],0x18424752,100,100,0,1:1,1:1,rgb24,-99,N/A,N/A,25/1,25/1,1/51200,0,0.000000,612317,11.959316,N/A,N/A,4,4,0,0,0,0,0,0,0,0,0,0,0
 +format,tests/data/ffprobe-test.nut,3,nut,0.000000,11.959320,1054812,705599,ffprobe test file,"'A comment with CSV, XML & JSON special chars': <tag value=""x"">",I ♥ Üñîçød€
index 4105293,0000000..4151b45
mode 100644,000000..100644
--- /dev/null
@@@ -1,621 -1,0 +1,621 @@@
- channel_layout=unknown
 +[PACKET]
 +codec_type=audio
 +stream_index=0
 +pts=0
 +pts_time=0.000000
 +dts=0
 +dts_time=0.000000
 +duration=1024
 +duration_time=0.023220
 +convergence_duration=N/A
 +convergence_duration_time=N/A
 +size=2048
 +pos=572
 +flags=K
 +[/PACKET]
 +[FRAME]
 +media_type=audio
 +key_frame=1
 +pkt_pts=0
 +pkt_pts_time=0.000000
 +pkt_dts=0
 +pkt_dts_time=0.000000
 +pkt_duration=1024
 +pkt_duration_time=0.023220
 +pkt_pos=572
 +pkt_size=2048
 +sample_fmt=s16
 +nb_samples=1024
 +channels=1
- channel_layout=unknown
++channel_layout=mono
 +[/FRAME]
 +[PACKET]
 +codec_type=video
 +stream_index=1
 +pts=0
 +pts_time=0.000000
 +dts=0
 +dts_time=0.000000
 +duration=2048
 +duration_time=0.040000
 +convergence_duration=N/A
 +convergence_duration_time=N/A
 +size=230400
 +pos=2647
 +flags=K
 +[/PACKET]
 +[FRAME]
 +media_type=video
 +key_frame=1
 +pkt_pts=0
 +pkt_pts_time=0.000000
 +pkt_dts=0
 +pkt_dts_time=0.000000
 +pkt_duration=2048
 +pkt_duration_time=0.040000
 +pkt_pos=2647
 +pkt_size=N/A
 +width=320
 +height=240
 +pix_fmt=rgb24
 +sample_aspect_ratio=1:1
 +pict_type=I
 +coded_picture_number=0
 +display_picture_number=0
 +interlaced_frame=0
 +top_field_first=0
 +repeat_pict=0
 +reference=0
 +[/FRAME]
 +[PACKET]
 +codec_type=video
 +stream_index=2
 +pts=0
 +pts_time=0.000000
 +dts=0
 +dts_time=0.000000
 +duration=2048
 +duration_time=0.040000
 +convergence_duration=N/A
 +convergence_duration_time=N/A
 +size=30000
 +pos=233068
 +flags=K
 +[/PACKET]
 +[FRAME]
 +media_type=video
 +key_frame=1
 +pkt_pts=0
 +pkt_pts_time=0.000000
 +pkt_dts=0
 +pkt_dts_time=0.000000
 +pkt_duration=2048
 +pkt_duration_time=0.040000
 +pkt_pos=233068
 +pkt_size=N/A
 +width=100
 +height=100
 +pix_fmt=rgb24
 +sample_aspect_ratio=1:1
 +pict_type=I
 +coded_picture_number=0
 +display_picture_number=0
 +interlaced_frame=0
 +top_field_first=0
 +repeat_pict=0
 +reference=0
 +[/FRAME]
 +[PACKET]
 +codec_type=audio
 +stream_index=0
 +pts=1024
 +pts_time=0.023220
 +dts=1024
 +dts_time=0.023220
 +duration=1024
 +duration_time=0.023220
 +convergence_duration=N/A
 +convergence_duration_time=N/A
 +size=2048
 +pos=263073
 +flags=K
 +[/PACKET]
 +[FRAME]
 +media_type=audio
 +key_frame=1
 +pkt_pts=1024
 +pkt_pts_time=0.023220
 +pkt_dts=1024
 +pkt_dts_time=0.023220
 +pkt_duration=1024
 +pkt_duration_time=0.023220
 +pkt_pos=263073
 +pkt_size=2048
 +sample_fmt=s16
 +nb_samples=1024
 +channels=1
- channel_layout=unknown
++channel_layout=mono
 +[/FRAME]
 +[PACKET]
 +codec_type=video
 +stream_index=1
 +pts=2048
 +pts_time=0.040000
 +dts=2048
 +dts_time=0.040000
 +duration=2048
 +duration_time=0.040000
 +convergence_duration=N/A
 +convergence_duration_time=N/A
 +size=230400
 +pos=265151
 +flags=K
 +[/PACKET]
 +[FRAME]
 +media_type=video
 +key_frame=1
 +pkt_pts=2048
 +pkt_pts_time=0.040000
 +pkt_dts=2048
 +pkt_dts_time=0.040000
 +pkt_duration=2048
 +pkt_duration_time=0.040000
 +pkt_pos=265151
 +pkt_size=N/A
 +width=320
 +height=240
 +pix_fmt=rgb24
 +sample_aspect_ratio=1:1
 +pict_type=I
 +coded_picture_number=0
 +display_picture_number=0
 +interlaced_frame=0
 +top_field_first=0
 +repeat_pict=0
 +reference=0
 +[/FRAME]
 +[PACKET]
 +codec_type=video
 +stream_index=2
 +pts=2048
 +pts_time=0.040000
 +dts=2048
 +dts_time=0.040000
 +duration=2048
 +duration_time=0.040000
 +convergence_duration=N/A
 +convergence_duration_time=N/A
 +size=30000
 +pos=495575
 +flags=K
 +[/PACKET]
 +[FRAME]
 +media_type=video
 +key_frame=1
 +pkt_pts=2048
 +pkt_pts_time=0.040000
 +pkt_dts=2048
 +pkt_dts_time=0.040000
 +pkt_duration=2048
 +pkt_duration_time=0.040000
 +pkt_pos=495575
 +pkt_size=N/A
 +width=100
 +height=100
 +pix_fmt=rgb24
 +sample_aspect_ratio=1:1
 +pict_type=I
 +coded_picture_number=0
 +display_picture_number=0
 +interlaced_frame=0
 +top_field_first=0
 +repeat_pict=0
 +reference=0
 +[/FRAME]
 +[PACKET]
 +codec_type=audio
 +stream_index=0
 +pts=2048
 +pts_time=0.046440
 +dts=2048
 +dts_time=0.046440
 +duration=1024
 +duration_time=0.023220
 +convergence_duration=N/A
 +convergence_duration_time=N/A
 +size=2048
 +pos=525580
 +flags=K
 +[/PACKET]
 +[FRAME]
 +media_type=audio
 +key_frame=1
 +pkt_pts=2048
 +pkt_pts_time=0.046440
 +pkt_dts=2048
 +pkt_dts_time=0.046440
 +pkt_duration=1024
 +pkt_duration_time=0.023220
 +pkt_pos=525580
 +pkt_size=2048
 +sample_fmt=s16
 +nb_samples=1024
 +channels=1
- channel_layout=unknown
++channel_layout=mono
 +[/FRAME]
 +[PACKET]
 +codec_type=audio
 +stream_index=0
 +pts=3072
 +pts_time=0.069660
 +dts=3072
 +dts_time=0.069660
 +duration=1024
 +duration_time=0.023220
 +convergence_duration=N/A
 +convergence_duration_time=N/A
 +size=2048
 +pos=527651
 +flags=K
 +[/PACKET]
 +[FRAME]
 +media_type=audio
 +key_frame=1
 +pkt_pts=3072
 +pkt_pts_time=0.069660
 +pkt_dts=3072
 +pkt_dts_time=0.069660
 +pkt_duration=1024
 +pkt_duration_time=0.023220
 +pkt_pos=527651
 +pkt_size=2048
 +sample_fmt=s16
 +nb_samples=1024
 +channels=1
- channel_layout=unknown
++channel_layout=mono
 +[/FRAME]
 +[PACKET]
 +codec_type=video
 +stream_index=1
 +pts=4096
 +pts_time=0.080000
 +dts=4096
 +dts_time=0.080000
 +duration=2048
 +duration_time=0.040000
 +convergence_duration=N/A
 +convergence_duration_time=N/A
 +size=230400
 +pos=529729
 +flags=K
 +[/PACKET]
 +[FRAME]
 +media_type=video
 +key_frame=1
 +pkt_pts=4096
 +pkt_pts_time=0.080000
 +pkt_dts=4096
 +pkt_dts_time=0.080000
 +pkt_duration=2048
 +pkt_duration_time=0.040000
 +pkt_pos=529729
 +pkt_size=N/A
 +width=320
 +height=240
 +pix_fmt=rgb24
 +sample_aspect_ratio=1:1
 +pict_type=I
 +coded_picture_number=0
 +display_picture_number=0
 +interlaced_frame=0
 +top_field_first=0
 +repeat_pict=0
 +reference=0
 +[/FRAME]
 +[PACKET]
 +codec_type=video
 +stream_index=2
 +pts=4096
 +pts_time=0.080000
 +dts=4096
 +dts_time=0.080000
 +duration=2048
 +duration_time=0.040000
 +convergence_duration=N/A
 +convergence_duration_time=N/A
 +size=30000
 +pos=760153
 +flags=K
 +[/PACKET]
 +[FRAME]
 +media_type=video
 +key_frame=1
 +pkt_pts=4096
 +pkt_pts_time=0.080000
 +pkt_dts=4096
 +pkt_dts_time=0.080000
 +pkt_duration=2048
 +pkt_duration_time=0.040000
 +pkt_pos=760153
 +pkt_size=N/A
 +width=100
 +height=100
 +pix_fmt=rgb24
 +sample_aspect_ratio=1:1
 +pict_type=I
 +coded_picture_number=0
 +display_picture_number=0
 +interlaced_frame=0
 +top_field_first=0
 +repeat_pict=0
 +reference=0
 +[/FRAME]
 +[PACKET]
 +codec_type=audio
 +stream_index=0
 +pts=4096
 +pts_time=0.092880
 +dts=4096
 +dts_time=0.092880
 +duration=1024
 +duration_time=0.023220
 +convergence_duration=N/A
 +convergence_duration_time=N/A
 +size=2048
 +pos=790158
 +flags=K
 +[/PACKET]
 +[FRAME]
 +media_type=audio
 +key_frame=1
 +pkt_pts=4096
 +pkt_pts_time=0.092880
 +pkt_dts=4096
 +pkt_dts_time=0.092880
 +pkt_duration=1024
 +pkt_duration_time=0.023220
 +pkt_pos=790158
 +pkt_size=2048
 +sample_fmt=s16
 +nb_samples=1024
 +channels=1
- channel_layout=unknown
++channel_layout=mono
 +[/FRAME]
 +[PACKET]
 +codec_type=audio
 +stream_index=0
 +pts=5120
 +pts_time=0.116100
 +dts=5120
 +dts_time=0.116100
 +duration=1024
 +duration_time=0.023220
 +convergence_duration=N/A
 +convergence_duration_time=N/A
 +size=2048
 +pos=792229
 +flags=K
 +[/PACKET]
 +[FRAME]
 +media_type=audio
 +key_frame=1
 +pkt_pts=5120
 +pkt_pts_time=0.116100
 +pkt_dts=5120
 +pkt_dts_time=0.116100
 +pkt_duration=1024
 +pkt_duration_time=0.023220
 +pkt_pos=792229
 +pkt_size=2048
 +sample_fmt=s16
 +nb_samples=1024
 +channels=1
++channel_layout=mono
 +[/FRAME]
 +[PACKET]
 +codec_type=video
 +stream_index=1
 +pts=6144
 +pts_time=0.120000
 +dts=6144
 +dts_time=0.120000
 +duration=2048
 +duration_time=0.040000
 +convergence_duration=N/A
 +convergence_duration_time=N/A
 +size=230400
 +pos=794307
 +flags=K
 +[/PACKET]
 +[FRAME]
 +media_type=video
 +key_frame=1
 +pkt_pts=6144
 +pkt_pts_time=0.120000
 +pkt_dts=6144
 +pkt_dts_time=0.120000
 +pkt_duration=2048
 +pkt_duration_time=0.040000
 +pkt_pos=794307
 +pkt_size=N/A
 +width=320
 +height=240
 +pix_fmt=rgb24
 +sample_aspect_ratio=1:1
 +pict_type=I
 +coded_picture_number=0
 +display_picture_number=0
 +interlaced_frame=0
 +top_field_first=0
 +repeat_pict=0
 +reference=0
 +[/FRAME]
 +[PACKET]
 +codec_type=video
 +stream_index=2
 +pts=6144
 +pts_time=0.120000
 +dts=6144
 +dts_time=0.120000
 +duration=2048
 +duration_time=0.040000
 +convergence_duration=N/A
 +convergence_duration_time=N/A
 +size=30000
 +pos=1024731
 +flags=K
 +[/PACKET]
 +[FRAME]
 +media_type=video
 +key_frame=1
 +pkt_pts=6144
 +pkt_pts_time=0.120000
 +pkt_dts=6144
 +pkt_dts_time=0.120000
 +pkt_duration=2048
 +pkt_duration_time=0.040000
 +pkt_pos=1024731
 +pkt_size=N/A
 +width=100
 +height=100
 +pix_fmt=rgb24
 +sample_aspect_ratio=1:1
 +pict_type=I
 +coded_picture_number=0
 +display_picture_number=0
 +interlaced_frame=0
 +top_field_first=0
 +repeat_pict=0
 +reference=0
 +[/FRAME]
 +[STREAM]
 +index=0
 +codec_name=pcm_s16le
 +profile=unknown
 +codec_type=audio
 +codec_time_base=1/44100
 +codec_tag_string=PSD[16]
 +codec_tag=0x10445350
 +sample_fmt=s16
 +sample_rate=44100
 +channels=1
 +bits_per_sample=16
 +id=N/A
 +r_frame_rate=0/0
 +avg_frame_rate=0/0
 +time_base=1/44100
 +start_pts=0
 +start_time=0.000000
 +duration_ts=527406
 +duration=11.959320
 +bit_rate=705600
 +nb_frames=N/A
 +nb_read_frames=6
 +nb_read_packets=6
 +DISPOSITION:default=0
 +DISPOSITION:dub=0
 +DISPOSITION:original=0
 +DISPOSITION:comment=0
 +DISPOSITION:lyrics=0
 +DISPOSITION:karaoke=0
 +DISPOSITION:forced=0
 +DISPOSITION:hearing_impaired=0
 +DISPOSITION:visual_impaired=0
 +DISPOSITION:clean_effects=0
 +DISPOSITION:attached_pic=0
 +TAG:E=mc²
 +[/STREAM]
 +[STREAM]
 +index=1
 +codec_name=rawvideo
 +profile=unknown
 +codec_type=video
 +codec_time_base=1/51200
 +codec_tag_string=RGB[24]
 +codec_tag=0x18424752
 +width=320
 +height=240
 +has_b_frames=0
 +sample_aspect_ratio=1:1
 +display_aspect_ratio=4:3
 +pix_fmt=rgb24
 +level=-99
 +timecode=N/A
 +id=N/A
 +r_frame_rate=25/1
 +avg_frame_rate=25/1
 +time_base=1/51200
 +start_pts=0
 +start_time=0.000000
 +duration_ts=612317
 +duration=11.959316
 +bit_rate=N/A
 +nb_frames=N/A
 +nb_read_frames=4
 +nb_read_packets=4
 +DISPOSITION:default=0
 +DISPOSITION:dub=0
 +DISPOSITION:original=0
 +DISPOSITION:comment=0
 +DISPOSITION:lyrics=0
 +DISPOSITION:karaoke=0
 +DISPOSITION:forced=0
 +DISPOSITION:hearing_impaired=0
 +DISPOSITION:visual_impaired=0
 +DISPOSITION:clean_effects=0
 +DISPOSITION:attached_pic=0
 +TAG:title=foobar
 +TAG:duration_ts=field-and-tags-conflict-attempt
 +[/STREAM]
 +[STREAM]
 +index=2
 +codec_name=rawvideo
 +profile=unknown
 +codec_type=video
 +codec_time_base=1/51200
 +codec_tag_string=RGB[24]
 +codec_tag=0x18424752
 +width=100
 +height=100
 +has_b_frames=0
 +sample_aspect_ratio=1:1
 +display_aspect_ratio=1:1
 +pix_fmt=rgb24
 +level=-99
 +timecode=N/A
 +id=N/A
 +r_frame_rate=25/1
 +avg_frame_rate=25/1
 +time_base=1/51200
 +start_pts=0
 +start_time=0.000000
 +duration_ts=612317
 +duration=11.959316
 +bit_rate=N/A
 +nb_frames=N/A
 +nb_read_frames=4
 +nb_read_packets=4
 +DISPOSITION:default=0
 +DISPOSITION:dub=0
 +DISPOSITION:original=0
 +DISPOSITION:comment=0
 +DISPOSITION:lyrics=0
 +DISPOSITION:karaoke=0
 +DISPOSITION:forced=0
 +DISPOSITION:hearing_impaired=0
 +DISPOSITION:visual_impaired=0
 +DISPOSITION:clean_effects=0
 +DISPOSITION:attached_pic=0
 +[/STREAM]
 +[FORMAT]
 +filename=tests/data/ffprobe-test.nut
 +nb_streams=3
 +format_name=nut
 +start_time=0.000000
 +duration=11.959320
 +size=1054812
 +bit_rate=705599
 +TAG:title=ffprobe test file
 +TAG:comment='A comment with CSV, XML & JSON special chars': <tag value="x">
 +TAG:comment2=I ♥ Üñîçød€
 +[/FORMAT]
index 156f215,0000000..b473c86
mode 100644,000000..100644
--- /dev/null
@@@ -1,557 -1,0 +1,557 @@@
- packets_and_frames.frame.0.channel_layout="unknown"
 +packets_and_frames.packet.0.codec_type="audio"
 +packets_and_frames.packet.0.stream_index=0
 +packets_and_frames.packet.0.pts=0
 +packets_and_frames.packet.0.pts_time="0.000000"
 +packets_and_frames.packet.0.dts=0
 +packets_and_frames.packet.0.dts_time="0.000000"
 +packets_and_frames.packet.0.duration=1024
 +packets_and_frames.packet.0.duration_time="0.023220"
 +packets_and_frames.packet.0.convergence_duration="N/A"
 +packets_and_frames.packet.0.convergence_duration_time="N/A"
 +packets_and_frames.packet.0.size="2048"
 +packets_and_frames.packet.0.pos="572"
 +packets_and_frames.packet.0.flags="K"
 +packets_and_frames.frame.0.media_type="audio"
 +packets_and_frames.frame.0.key_frame=1
 +packets_and_frames.frame.0.pkt_pts=0
 +packets_and_frames.frame.0.pkt_pts_time="0.000000"
 +packets_and_frames.frame.0.pkt_dts=0
 +packets_and_frames.frame.0.pkt_dts_time="0.000000"
 +packets_and_frames.frame.0.pkt_duration=1024
 +packets_and_frames.frame.0.pkt_duration_time="0.023220"
 +packets_and_frames.frame.0.pkt_pos="572"
 +packets_and_frames.frame.0.pkt_size="2048"
 +packets_and_frames.frame.0.sample_fmt="s16"
 +packets_and_frames.frame.0.nb_samples=1024
 +packets_and_frames.frame.0.channels=1
- packets_and_frames.frame.3.channel_layout="unknown"
++packets_and_frames.frame.0.channel_layout="mono"
 +packets_and_frames.packet.1.codec_type="video"
 +packets_and_frames.packet.1.stream_index=1
 +packets_and_frames.packet.1.pts=0
 +packets_and_frames.packet.1.pts_time="0.000000"
 +packets_and_frames.packet.1.dts=0
 +packets_and_frames.packet.1.dts_time="0.000000"
 +packets_and_frames.packet.1.duration=2048
 +packets_and_frames.packet.1.duration_time="0.040000"
 +packets_and_frames.packet.1.convergence_duration="N/A"
 +packets_and_frames.packet.1.convergence_duration_time="N/A"
 +packets_and_frames.packet.1.size="230400"
 +packets_and_frames.packet.1.pos="2647"
 +packets_and_frames.packet.1.flags="K"
 +packets_and_frames.frame.1.media_type="video"
 +packets_and_frames.frame.1.key_frame=1
 +packets_and_frames.frame.1.pkt_pts=0
 +packets_and_frames.frame.1.pkt_pts_time="0.000000"
 +packets_and_frames.frame.1.pkt_dts=0
 +packets_and_frames.frame.1.pkt_dts_time="0.000000"
 +packets_and_frames.frame.1.pkt_duration=2048
 +packets_and_frames.frame.1.pkt_duration_time="0.040000"
 +packets_and_frames.frame.1.pkt_pos="2647"
 +packets_and_frames.frame.1.pkt_size="N/A"
 +packets_and_frames.frame.1.width=320
 +packets_and_frames.frame.1.height=240
 +packets_and_frames.frame.1.pix_fmt="rgb24"
 +packets_and_frames.frame.1.sample_aspect_ratio="1:1"
 +packets_and_frames.frame.1.pict_type="I"
 +packets_and_frames.frame.1.coded_picture_number=0
 +packets_and_frames.frame.1.display_picture_number=0
 +packets_and_frames.frame.1.interlaced_frame=0
 +packets_and_frames.frame.1.top_field_first=0
 +packets_and_frames.frame.1.repeat_pict=0
 +packets_and_frames.frame.1.reference=0
 +packets_and_frames.packet.2.codec_type="video"
 +packets_and_frames.packet.2.stream_index=2
 +packets_and_frames.packet.2.pts=0
 +packets_and_frames.packet.2.pts_time="0.000000"
 +packets_and_frames.packet.2.dts=0
 +packets_and_frames.packet.2.dts_time="0.000000"
 +packets_and_frames.packet.2.duration=2048
 +packets_and_frames.packet.2.duration_time="0.040000"
 +packets_and_frames.packet.2.convergence_duration="N/A"
 +packets_and_frames.packet.2.convergence_duration_time="N/A"
 +packets_and_frames.packet.2.size="30000"
 +packets_and_frames.packet.2.pos="233068"
 +packets_and_frames.packet.2.flags="K"
 +packets_and_frames.frame.2.media_type="video"
 +packets_and_frames.frame.2.key_frame=1
 +packets_and_frames.frame.2.pkt_pts=0
 +packets_and_frames.frame.2.pkt_pts_time="0.000000"
 +packets_and_frames.frame.2.pkt_dts=0
 +packets_and_frames.frame.2.pkt_dts_time="0.000000"
 +packets_and_frames.frame.2.pkt_duration=2048
 +packets_and_frames.frame.2.pkt_duration_time="0.040000"
 +packets_and_frames.frame.2.pkt_pos="233068"
 +packets_and_frames.frame.2.pkt_size="N/A"
 +packets_and_frames.frame.2.width=100
 +packets_and_frames.frame.2.height=100
 +packets_and_frames.frame.2.pix_fmt="rgb24"
 +packets_and_frames.frame.2.sample_aspect_ratio="1:1"
 +packets_and_frames.frame.2.pict_type="I"
 +packets_and_frames.frame.2.coded_picture_number=0
 +packets_and_frames.frame.2.display_picture_number=0
 +packets_and_frames.frame.2.interlaced_frame=0
 +packets_and_frames.frame.2.top_field_first=0
 +packets_and_frames.frame.2.repeat_pict=0
 +packets_and_frames.frame.2.reference=0
 +packets_and_frames.packet.3.codec_type="audio"
 +packets_and_frames.packet.3.stream_index=0
 +packets_and_frames.packet.3.pts=1024
 +packets_and_frames.packet.3.pts_time="0.023220"
 +packets_and_frames.packet.3.dts=1024
 +packets_and_frames.packet.3.dts_time="0.023220"
 +packets_and_frames.packet.3.duration=1024
 +packets_and_frames.packet.3.duration_time="0.023220"
 +packets_and_frames.packet.3.convergence_duration="N/A"
 +packets_and_frames.packet.3.convergence_duration_time="N/A"
 +packets_and_frames.packet.3.size="2048"
 +packets_and_frames.packet.3.pos="263073"
 +packets_and_frames.packet.3.flags="K"
 +packets_and_frames.frame.3.media_type="audio"
 +packets_and_frames.frame.3.key_frame=1
 +packets_and_frames.frame.3.pkt_pts=1024
 +packets_and_frames.frame.3.pkt_pts_time="0.023220"
 +packets_and_frames.frame.3.pkt_dts=1024
 +packets_and_frames.frame.3.pkt_dts_time="0.023220"
 +packets_and_frames.frame.3.pkt_duration=1024
 +packets_and_frames.frame.3.pkt_duration_time="0.023220"
 +packets_and_frames.frame.3.pkt_pos="263073"
 +packets_and_frames.frame.3.pkt_size="2048"
 +packets_and_frames.frame.3.sample_fmt="s16"
 +packets_and_frames.frame.3.nb_samples=1024
 +packets_and_frames.frame.3.channels=1
- packets_and_frames.frame.6.channel_layout="unknown"
++packets_and_frames.frame.3.channel_layout="mono"
 +packets_and_frames.packet.4.codec_type="video"
 +packets_and_frames.packet.4.stream_index=1
 +packets_and_frames.packet.4.pts=2048
 +packets_and_frames.packet.4.pts_time="0.040000"
 +packets_and_frames.packet.4.dts=2048
 +packets_and_frames.packet.4.dts_time="0.040000"
 +packets_and_frames.packet.4.duration=2048
 +packets_and_frames.packet.4.duration_time="0.040000"
 +packets_and_frames.packet.4.convergence_duration="N/A"
 +packets_and_frames.packet.4.convergence_duration_time="N/A"
 +packets_and_frames.packet.4.size="230400"
 +packets_and_frames.packet.4.pos="265151"
 +packets_and_frames.packet.4.flags="K"
 +packets_and_frames.frame.4.media_type="video"
 +packets_and_frames.frame.4.key_frame=1
 +packets_and_frames.frame.4.pkt_pts=2048
 +packets_and_frames.frame.4.pkt_pts_time="0.040000"
 +packets_and_frames.frame.4.pkt_dts=2048
 +packets_and_frames.frame.4.pkt_dts_time="0.040000"
 +packets_and_frames.frame.4.pkt_duration=2048
 +packets_and_frames.frame.4.pkt_duration_time="0.040000"
 +packets_and_frames.frame.4.pkt_pos="265151"
 +packets_and_frames.frame.4.pkt_size="N/A"
 +packets_and_frames.frame.4.width=320
 +packets_and_frames.frame.4.height=240
 +packets_and_frames.frame.4.pix_fmt="rgb24"
 +packets_and_frames.frame.4.sample_aspect_ratio="1:1"
 +packets_and_frames.frame.4.pict_type="I"
 +packets_and_frames.frame.4.coded_picture_number=0
 +packets_and_frames.frame.4.display_picture_number=0
 +packets_and_frames.frame.4.interlaced_frame=0
 +packets_and_frames.frame.4.top_field_first=0
 +packets_and_frames.frame.4.repeat_pict=0
 +packets_and_frames.frame.4.reference=0
 +packets_and_frames.packet.5.codec_type="video"
 +packets_and_frames.packet.5.stream_index=2
 +packets_and_frames.packet.5.pts=2048
 +packets_and_frames.packet.5.pts_time="0.040000"
 +packets_and_frames.packet.5.dts=2048
 +packets_and_frames.packet.5.dts_time="0.040000"
 +packets_and_frames.packet.5.duration=2048
 +packets_and_frames.packet.5.duration_time="0.040000"
 +packets_and_frames.packet.5.convergence_duration="N/A"
 +packets_and_frames.packet.5.convergence_duration_time="N/A"
 +packets_and_frames.packet.5.size="30000"
 +packets_and_frames.packet.5.pos="495575"
 +packets_and_frames.packet.5.flags="K"
 +packets_and_frames.frame.5.media_type="video"
 +packets_and_frames.frame.5.key_frame=1
 +packets_and_frames.frame.5.pkt_pts=2048
 +packets_and_frames.frame.5.pkt_pts_time="0.040000"
 +packets_and_frames.frame.5.pkt_dts=2048
 +packets_and_frames.frame.5.pkt_dts_time="0.040000"
 +packets_and_frames.frame.5.pkt_duration=2048
 +packets_and_frames.frame.5.pkt_duration_time="0.040000"
 +packets_and_frames.frame.5.pkt_pos="495575"
 +packets_and_frames.frame.5.pkt_size="N/A"
 +packets_and_frames.frame.5.width=100
 +packets_and_frames.frame.5.height=100
 +packets_and_frames.frame.5.pix_fmt="rgb24"
 +packets_and_frames.frame.5.sample_aspect_ratio="1:1"
 +packets_and_frames.frame.5.pict_type="I"
 +packets_and_frames.frame.5.coded_picture_number=0
 +packets_and_frames.frame.5.display_picture_number=0
 +packets_and_frames.frame.5.interlaced_frame=0
 +packets_and_frames.frame.5.top_field_first=0
 +packets_and_frames.frame.5.repeat_pict=0
 +packets_and_frames.frame.5.reference=0
 +packets_and_frames.packet.6.codec_type="audio"
 +packets_and_frames.packet.6.stream_index=0
 +packets_and_frames.packet.6.pts=2048
 +packets_and_frames.packet.6.pts_time="0.046440"
 +packets_and_frames.packet.6.dts=2048
 +packets_and_frames.packet.6.dts_time="0.046440"
 +packets_and_frames.packet.6.duration=1024
 +packets_and_frames.packet.6.duration_time="0.023220"
 +packets_and_frames.packet.6.convergence_duration="N/A"
 +packets_and_frames.packet.6.convergence_duration_time="N/A"
 +packets_and_frames.packet.6.size="2048"
 +packets_and_frames.packet.6.pos="525580"
 +packets_and_frames.packet.6.flags="K"
 +packets_and_frames.frame.6.media_type="audio"
 +packets_and_frames.frame.6.key_frame=1
 +packets_and_frames.frame.6.pkt_pts=2048
 +packets_and_frames.frame.6.pkt_pts_time="0.046440"
 +packets_and_frames.frame.6.pkt_dts=2048
 +packets_and_frames.frame.6.pkt_dts_time="0.046440"
 +packets_and_frames.frame.6.pkt_duration=1024
 +packets_and_frames.frame.6.pkt_duration_time="0.023220"
 +packets_and_frames.frame.6.pkt_pos="525580"
 +packets_and_frames.frame.6.pkt_size="2048"
 +packets_and_frames.frame.6.sample_fmt="s16"
 +packets_and_frames.frame.6.nb_samples=1024
 +packets_and_frames.frame.6.channels=1
- packets_and_frames.frame.7.channel_layout="unknown"
++packets_and_frames.frame.6.channel_layout="mono"
 +packets_and_frames.packet.7.codec_type="audio"
 +packets_and_frames.packet.7.stream_index=0
 +packets_and_frames.packet.7.pts=3072
 +packets_and_frames.packet.7.pts_time="0.069660"
 +packets_and_frames.packet.7.dts=3072
 +packets_and_frames.packet.7.dts_time="0.069660"
 +packets_and_frames.packet.7.duration=1024
 +packets_and_frames.packet.7.duration_time="0.023220"
 +packets_and_frames.packet.7.convergence_duration="N/A"
 +packets_and_frames.packet.7.convergence_duration_time="N/A"
 +packets_and_frames.packet.7.size="2048"
 +packets_and_frames.packet.7.pos="527651"
 +packets_and_frames.packet.7.flags="K"
 +packets_and_frames.frame.7.media_type="audio"
 +packets_and_frames.frame.7.key_frame=1
 +packets_and_frames.frame.7.pkt_pts=3072
 +packets_and_frames.frame.7.pkt_pts_time="0.069660"
 +packets_and_frames.frame.7.pkt_dts=3072
 +packets_and_frames.frame.7.pkt_dts_time="0.069660"
 +packets_and_frames.frame.7.pkt_duration=1024
 +packets_and_frames.frame.7.pkt_duration_time="0.023220"
 +packets_and_frames.frame.7.pkt_pos="527651"
 +packets_and_frames.frame.7.pkt_size="2048"
 +packets_and_frames.frame.7.sample_fmt="s16"
 +packets_and_frames.frame.7.nb_samples=1024
 +packets_and_frames.frame.7.channels=1
- packets_and_frames.frame.10.channel_layout="unknown"
++packets_and_frames.frame.7.channel_layout="mono"
 +packets_and_frames.packet.8.codec_type="video"
 +packets_and_frames.packet.8.stream_index=1
 +packets_and_frames.packet.8.pts=4096
 +packets_and_frames.packet.8.pts_time="0.080000"
 +packets_and_frames.packet.8.dts=4096
 +packets_and_frames.packet.8.dts_time="0.080000"
 +packets_and_frames.packet.8.duration=2048
 +packets_and_frames.packet.8.duration_time="0.040000"
 +packets_and_frames.packet.8.convergence_duration="N/A"
 +packets_and_frames.packet.8.convergence_duration_time="N/A"
 +packets_and_frames.packet.8.size="230400"
 +packets_and_frames.packet.8.pos="529729"
 +packets_and_frames.packet.8.flags="K"
 +packets_and_frames.frame.8.media_type="video"
 +packets_and_frames.frame.8.key_frame=1
 +packets_and_frames.frame.8.pkt_pts=4096
 +packets_and_frames.frame.8.pkt_pts_time="0.080000"
 +packets_and_frames.frame.8.pkt_dts=4096
 +packets_and_frames.frame.8.pkt_dts_time="0.080000"
 +packets_and_frames.frame.8.pkt_duration=2048
 +packets_and_frames.frame.8.pkt_duration_time="0.040000"
 +packets_and_frames.frame.8.pkt_pos="529729"
 +packets_and_frames.frame.8.pkt_size="N/A"
 +packets_and_frames.frame.8.width=320
 +packets_and_frames.frame.8.height=240
 +packets_and_frames.frame.8.pix_fmt="rgb24"
 +packets_and_frames.frame.8.sample_aspect_ratio="1:1"
 +packets_and_frames.frame.8.pict_type="I"
 +packets_and_frames.frame.8.coded_picture_number=0
 +packets_and_frames.frame.8.display_picture_number=0
 +packets_and_frames.frame.8.interlaced_frame=0
 +packets_and_frames.frame.8.top_field_first=0
 +packets_and_frames.frame.8.repeat_pict=0
 +packets_and_frames.frame.8.reference=0
 +packets_and_frames.packet.9.codec_type="video"
 +packets_and_frames.packet.9.stream_index=2
 +packets_and_frames.packet.9.pts=4096
 +packets_and_frames.packet.9.pts_time="0.080000"
 +packets_and_frames.packet.9.dts=4096
 +packets_and_frames.packet.9.dts_time="0.080000"
 +packets_and_frames.packet.9.duration=2048
 +packets_and_frames.packet.9.duration_time="0.040000"
 +packets_and_frames.packet.9.convergence_duration="N/A"
 +packets_and_frames.packet.9.convergence_duration_time="N/A"
 +packets_and_frames.packet.9.size="30000"
 +packets_and_frames.packet.9.pos="760153"
 +packets_and_frames.packet.9.flags="K"
 +packets_and_frames.frame.9.media_type="video"
 +packets_and_frames.frame.9.key_frame=1
 +packets_and_frames.frame.9.pkt_pts=4096
 +packets_and_frames.frame.9.pkt_pts_time="0.080000"
 +packets_and_frames.frame.9.pkt_dts=4096
 +packets_and_frames.frame.9.pkt_dts_time="0.080000"
 +packets_and_frames.frame.9.pkt_duration=2048
 +packets_and_frames.frame.9.pkt_duration_time="0.040000"
 +packets_and_frames.frame.9.pkt_pos="760153"
 +packets_and_frames.frame.9.pkt_size="N/A"
 +packets_and_frames.frame.9.width=100
 +packets_and_frames.frame.9.height=100
 +packets_and_frames.frame.9.pix_fmt="rgb24"
 +packets_and_frames.frame.9.sample_aspect_ratio="1:1"
 +packets_and_frames.frame.9.pict_type="I"
 +packets_and_frames.frame.9.coded_picture_number=0
 +packets_and_frames.frame.9.display_picture_number=0
 +packets_and_frames.frame.9.interlaced_frame=0
 +packets_and_frames.frame.9.top_field_first=0
 +packets_and_frames.frame.9.repeat_pict=0
 +packets_and_frames.frame.9.reference=0
 +packets_and_frames.packet.10.codec_type="audio"
 +packets_and_frames.packet.10.stream_index=0
 +packets_and_frames.packet.10.pts=4096
 +packets_and_frames.packet.10.pts_time="0.092880"
 +packets_and_frames.packet.10.dts=4096
 +packets_and_frames.packet.10.dts_time="0.092880"
 +packets_and_frames.packet.10.duration=1024
 +packets_and_frames.packet.10.duration_time="0.023220"
 +packets_and_frames.packet.10.convergence_duration="N/A"
 +packets_and_frames.packet.10.convergence_duration_time="N/A"
 +packets_and_frames.packet.10.size="2048"
 +packets_and_frames.packet.10.pos="790158"
 +packets_and_frames.packet.10.flags="K"
 +packets_and_frames.frame.10.media_type="audio"
 +packets_and_frames.frame.10.key_frame=1
 +packets_and_frames.frame.10.pkt_pts=4096
 +packets_and_frames.frame.10.pkt_pts_time="0.092880"
 +packets_and_frames.frame.10.pkt_dts=4096
 +packets_and_frames.frame.10.pkt_dts_time="0.092880"
 +packets_and_frames.frame.10.pkt_duration=1024
 +packets_and_frames.frame.10.pkt_duration_time="0.023220"
 +packets_and_frames.frame.10.pkt_pos="790158"
 +packets_and_frames.frame.10.pkt_size="2048"
 +packets_and_frames.frame.10.sample_fmt="s16"
 +packets_and_frames.frame.10.nb_samples=1024
 +packets_and_frames.frame.10.channels=1
- packets_and_frames.frame.11.channel_layout="unknown"
++packets_and_frames.frame.10.channel_layout="mono"
 +packets_and_frames.packet.11.codec_type="audio"
 +packets_and_frames.packet.11.stream_index=0
 +packets_and_frames.packet.11.pts=5120
 +packets_and_frames.packet.11.pts_time="0.116100"
 +packets_and_frames.packet.11.dts=5120
 +packets_and_frames.packet.11.dts_time="0.116100"
 +packets_and_frames.packet.11.duration=1024
 +packets_and_frames.packet.11.duration_time="0.023220"
 +packets_and_frames.packet.11.convergence_duration="N/A"
 +packets_and_frames.packet.11.convergence_duration_time="N/A"
 +packets_and_frames.packet.11.size="2048"
 +packets_and_frames.packet.11.pos="792229"
 +packets_and_frames.packet.11.flags="K"
 +packets_and_frames.frame.11.media_type="audio"
 +packets_and_frames.frame.11.key_frame=1
 +packets_and_frames.frame.11.pkt_pts=5120
 +packets_and_frames.frame.11.pkt_pts_time="0.116100"
 +packets_and_frames.frame.11.pkt_dts=5120
 +packets_and_frames.frame.11.pkt_dts_time="0.116100"
 +packets_and_frames.frame.11.pkt_duration=1024
 +packets_and_frames.frame.11.pkt_duration_time="0.023220"
 +packets_and_frames.frame.11.pkt_pos="792229"
 +packets_and_frames.frame.11.pkt_size="2048"
 +packets_and_frames.frame.11.sample_fmt="s16"
 +packets_and_frames.frame.11.nb_samples=1024
 +packets_and_frames.frame.11.channels=1
++packets_and_frames.frame.11.channel_layout="mono"
 +packets_and_frames.packet.12.codec_type="video"
 +packets_and_frames.packet.12.stream_index=1
 +packets_and_frames.packet.12.pts=6144
 +packets_and_frames.packet.12.pts_time="0.120000"
 +packets_and_frames.packet.12.dts=6144
 +packets_and_frames.packet.12.dts_time="0.120000"
 +packets_and_frames.packet.12.duration=2048
 +packets_and_frames.packet.12.duration_time="0.040000"
 +packets_and_frames.packet.12.convergence_duration="N/A"
 +packets_and_frames.packet.12.convergence_duration_time="N/A"
 +packets_and_frames.packet.12.size="230400"
 +packets_and_frames.packet.12.pos="794307"
 +packets_and_frames.packet.12.flags="K"
 +packets_and_frames.frame.12.media_type="video"
 +packets_and_frames.frame.12.key_frame=1
 +packets_and_frames.frame.12.pkt_pts=6144
 +packets_and_frames.frame.12.pkt_pts_time="0.120000"
 +packets_and_frames.frame.12.pkt_dts=6144
 +packets_and_frames.frame.12.pkt_dts_time="0.120000"
 +packets_and_frames.frame.12.pkt_duration=2048
 +packets_and_frames.frame.12.pkt_duration_time="0.040000"
 +packets_and_frames.frame.12.pkt_pos="794307"
 +packets_and_frames.frame.12.pkt_size="N/A"
 +packets_and_frames.frame.12.width=320
 +packets_and_frames.frame.12.height=240
 +packets_and_frames.frame.12.pix_fmt="rgb24"
 +packets_and_frames.frame.12.sample_aspect_ratio="1:1"
 +packets_and_frames.frame.12.pict_type="I"
 +packets_and_frames.frame.12.coded_picture_number=0
 +packets_and_frames.frame.12.display_picture_number=0
 +packets_and_frames.frame.12.interlaced_frame=0
 +packets_and_frames.frame.12.top_field_first=0
 +packets_and_frames.frame.12.repeat_pict=0
 +packets_and_frames.frame.12.reference=0
 +packets_and_frames.packet.13.codec_type="video"
 +packets_and_frames.packet.13.stream_index=2
 +packets_and_frames.packet.13.pts=6144
 +packets_and_frames.packet.13.pts_time="0.120000"
 +packets_and_frames.packet.13.dts=6144
 +packets_and_frames.packet.13.dts_time="0.120000"
 +packets_and_frames.packet.13.duration=2048
 +packets_and_frames.packet.13.duration_time="0.040000"
 +packets_and_frames.packet.13.convergence_duration="N/A"
 +packets_and_frames.packet.13.convergence_duration_time="N/A"
 +packets_and_frames.packet.13.size="30000"
 +packets_and_frames.packet.13.pos="1024731"
 +packets_and_frames.packet.13.flags="K"
 +packets_and_frames.frame.13.media_type="video"
 +packets_and_frames.frame.13.key_frame=1
 +packets_and_frames.frame.13.pkt_pts=6144
 +packets_and_frames.frame.13.pkt_pts_time="0.120000"
 +packets_and_frames.frame.13.pkt_dts=6144
 +packets_and_frames.frame.13.pkt_dts_time="0.120000"
 +packets_and_frames.frame.13.pkt_duration=2048
 +packets_and_frames.frame.13.pkt_duration_time="0.040000"
 +packets_and_frames.frame.13.pkt_pos="1024731"
 +packets_and_frames.frame.13.pkt_size="N/A"
 +packets_and_frames.frame.13.width=100
 +packets_and_frames.frame.13.height=100
 +packets_and_frames.frame.13.pix_fmt="rgb24"
 +packets_and_frames.frame.13.sample_aspect_ratio="1:1"
 +packets_and_frames.frame.13.pict_type="I"
 +packets_and_frames.frame.13.coded_picture_number=0
 +packets_and_frames.frame.13.display_picture_number=0
 +packets_and_frames.frame.13.interlaced_frame=0
 +packets_and_frames.frame.13.top_field_first=0
 +packets_and_frames.frame.13.repeat_pict=0
 +packets_and_frames.frame.13.reference=0
 +streams.stream.0.index=0
 +streams.stream.0.codec_name="pcm_s16le"
 +streams.stream.0.profile="unknown"
 +streams.stream.0.codec_type="audio"
 +streams.stream.0.codec_time_base="1/44100"
 +streams.stream.0.codec_tag_string="PSD[16]"
 +streams.stream.0.codec_tag="0x10445350"
 +streams.stream.0.sample_fmt="s16"
 +streams.stream.0.sample_rate="44100"
 +streams.stream.0.channels=1
 +streams.stream.0.bits_per_sample=16
 +streams.stream.0.id="N/A"
 +streams.stream.0.r_frame_rate="0/0"
 +streams.stream.0.avg_frame_rate="0/0"
 +streams.stream.0.time_base="1/44100"
 +streams.stream.0.start_pts=0
 +streams.stream.0.start_time="0.000000"
 +streams.stream.0.duration_ts=527406
 +streams.stream.0.duration="11.959320"
 +streams.stream.0.bit_rate="705600"
 +streams.stream.0.nb_frames="N/A"
 +streams.stream.0.nb_read_frames="6"
 +streams.stream.0.nb_read_packets="6"
 +streams.stream.0.disposition.default=0
 +streams.stream.0.disposition.dub=0
 +streams.stream.0.disposition.original=0
 +streams.stream.0.disposition.comment=0
 +streams.stream.0.disposition.lyrics=0
 +streams.stream.0.disposition.karaoke=0
 +streams.stream.0.disposition.forced=0
 +streams.stream.0.disposition.hearing_impaired=0
 +streams.stream.0.disposition.visual_impaired=0
 +streams.stream.0.disposition.clean_effects=0
 +streams.stream.0.disposition.attached_pic=0
 +streams.stream.0.tags.E="mc²"
 +streams.stream.1.index=1
 +streams.stream.1.codec_name="rawvideo"
 +streams.stream.1.profile="unknown"
 +streams.stream.1.codec_type="video"
 +streams.stream.1.codec_time_base="1/51200"
 +streams.stream.1.codec_tag_string="RGB[24]"
 +streams.stream.1.codec_tag="0x18424752"
 +streams.stream.1.width=320
 +streams.stream.1.height=240
 +streams.stream.1.has_b_frames=0
 +streams.stream.1.sample_aspect_ratio="1:1"
 +streams.stream.1.display_aspect_ratio="4:3"
 +streams.stream.1.pix_fmt="rgb24"
 +streams.stream.1.level=-99
 +streams.stream.1.timecode="N/A"
 +streams.stream.1.id="N/A"
 +streams.stream.1.r_frame_rate="25/1"
 +streams.stream.1.avg_frame_rate="25/1"
 +streams.stream.1.time_base="1/51200"
 +streams.stream.1.start_pts=0
 +streams.stream.1.start_time="0.000000"
 +streams.stream.1.duration_ts=612317
 +streams.stream.1.duration="11.959316"
 +streams.stream.1.bit_rate="N/A"
 +streams.stream.1.nb_frames="N/A"
 +streams.stream.1.nb_read_frames="4"
 +streams.stream.1.nb_read_packets="4"
 +streams.stream.1.disposition.default=0
 +streams.stream.1.disposition.dub=0
 +streams.stream.1.disposition.original=0
 +streams.stream.1.disposition.comment=0
 +streams.stream.1.disposition.lyrics=0
 +streams.stream.1.disposition.karaoke=0
 +streams.stream.1.disposition.forced=0
 +streams.stream.1.disposition.hearing_impaired=0
 +streams.stream.1.disposition.visual_impaired=0
 +streams.stream.1.disposition.clean_effects=0
 +streams.stream.1.disposition.attached_pic=0
 +streams.stream.1.tags.title="foobar"
 +streams.stream.1.tags.duration_ts="field-and-tags-conflict-attempt"
 +streams.stream.2.index=2
 +streams.stream.2.codec_name="rawvideo"
 +streams.stream.2.profile="unknown"
 +streams.stream.2.codec_type="video"
 +streams.stream.2.codec_time_base="1/51200"
 +streams.stream.2.codec_tag_string="RGB[24]"
 +streams.stream.2.codec_tag="0x18424752"
 +streams.stream.2.width=100
 +streams.stream.2.height=100
 +streams.stream.2.has_b_frames=0
 +streams.stream.2.sample_aspect_ratio="1:1"
 +streams.stream.2.display_aspect_ratio="1:1"
 +streams.stream.2.pix_fmt="rgb24"
 +streams.stream.2.level=-99
 +streams.stream.2.timecode="N/A"
 +streams.stream.2.id="N/A"
 +streams.stream.2.r_frame_rate="25/1"
 +streams.stream.2.avg_frame_rate="25/1"
 +streams.stream.2.time_base="1/51200"
 +streams.stream.2.start_pts=0
 +streams.stream.2.start_time="0.000000"
 +streams.stream.2.duration_ts=612317
 +streams.stream.2.duration="11.959316"
 +streams.stream.2.bit_rate="N/A"
 +streams.stream.2.nb_frames="N/A"
 +streams.stream.2.nb_read_frames="4"
 +streams.stream.2.nb_read_packets="4"
 +streams.stream.2.disposition.default=0
 +streams.stream.2.disposition.dub=0
 +streams.stream.2.disposition.original=0
 +streams.stream.2.disposition.comment=0
 +streams.stream.2.disposition.lyrics=0
 +streams.stream.2.disposition.karaoke=0
 +streams.stream.2.disposition.forced=0
 +streams.stream.2.disposition.hearing_impaired=0
 +streams.stream.2.disposition.visual_impaired=0
 +streams.stream.2.disposition.clean_effects=0
 +streams.stream.2.disposition.attached_pic=0
 +format.filename="tests/data/ffprobe-test.nut"
 +format.nb_streams=3
 +format.format_name="nut"
 +format.start_time="0.000000"
 +format.duration="11.959320"
 +format.size="1054812"
 +format.bit_rate="705599"
 +format.tags.title="ffprobe test file"
 +format.tags.comment="'A comment with CSV, XML & JSON special chars': <tag value=\"x\">"
 +format.tags.comment2="I ♥ Üñîçød€"
index 0e324b6,0000000..85349a5
mode 100644,000000..100644
--- /dev/null
@@@ -1,634 -1,0 +1,634 @@@
- channel_layout=unknown
 +# ffprobe output
 +
 +[packets_and_frames.packet.0]
 +codec_type=audio
 +stream_index=0
 +pts=0
 +pts_time=0.000000
 +dts=0
 +dts_time=0.000000
 +duration=1024
 +duration_time=0.023220
 +convergence_duration=N/A
 +convergence_duration_time=N/A
 +size=2048
 +pos=572
 +flags=K
 +
 +[packets_and_frames.frame.0]
 +media_type=audio
 +key_frame=1
 +pkt_pts=0
 +pkt_pts_time=0.000000
 +pkt_dts=0
 +pkt_dts_time=0.000000
 +pkt_duration=1024
 +pkt_duration_time=0.023220
 +pkt_pos=572
 +pkt_size=2048
 +sample_fmt=s16
 +nb_samples=1024
 +channels=1
- channel_layout=unknown
++channel_layout=mono
 +
 +[packets_and_frames.packet.1]
 +codec_type=video
 +stream_index=1
 +pts=0
 +pts_time=0.000000
 +dts=0
 +dts_time=0.000000
 +duration=2048
 +duration_time=0.040000
 +convergence_duration=N/A
 +convergence_duration_time=N/A
 +size=230400
 +pos=2647
 +flags=K
 +
 +[packets_and_frames.frame.1]
 +media_type=video
 +key_frame=1
 +pkt_pts=0
 +pkt_pts_time=0.000000
 +pkt_dts=0
 +pkt_dts_time=0.000000
 +pkt_duration=2048
 +pkt_duration_time=0.040000
 +pkt_pos=2647
 +pkt_size=N/A
 +width=320
 +height=240
 +pix_fmt=rgb24
 +sample_aspect_ratio=1\:1
 +pict_type=I
 +coded_picture_number=0
 +display_picture_number=0
 +interlaced_frame=0
 +top_field_first=0
 +repeat_pict=0
 +reference=0
 +
 +[packets_and_frames.packet.2]
 +codec_type=video
 +stream_index=2
 +pts=0
 +pts_time=0.000000
 +dts=0
 +dts_time=0.000000
 +duration=2048
 +duration_time=0.040000
 +convergence_duration=N/A
 +convergence_duration_time=N/A
 +size=30000
 +pos=233068
 +flags=K
 +
 +[packets_and_frames.frame.2]
 +media_type=video
 +key_frame=1
 +pkt_pts=0
 +pkt_pts_time=0.000000
 +pkt_dts=0
 +pkt_dts_time=0.000000
 +pkt_duration=2048
 +pkt_duration_time=0.040000
 +pkt_pos=233068
 +pkt_size=N/A
 +width=100
 +height=100
 +pix_fmt=rgb24
 +sample_aspect_ratio=1\:1
 +pict_type=I
 +coded_picture_number=0
 +display_picture_number=0
 +interlaced_frame=0
 +top_field_first=0
 +repeat_pict=0
 +reference=0
 +
 +[packets_and_frames.packet.3]
 +codec_type=audio
 +stream_index=0
 +pts=1024
 +pts_time=0.023220
 +dts=1024
 +dts_time=0.023220
 +duration=1024
 +duration_time=0.023220
 +convergence_duration=N/A
 +convergence_duration_time=N/A
 +size=2048
 +pos=263073
 +flags=K
 +
 +[packets_and_frames.frame.3]
 +media_type=audio
 +key_frame=1
 +pkt_pts=1024
 +pkt_pts_time=0.023220
 +pkt_dts=1024
 +pkt_dts_time=0.023220
 +pkt_duration=1024
 +pkt_duration_time=0.023220
 +pkt_pos=263073
 +pkt_size=2048
 +sample_fmt=s16
 +nb_samples=1024
 +channels=1
- channel_layout=unknown
++channel_layout=mono
 +
 +[packets_and_frames.packet.4]
 +codec_type=video
 +stream_index=1
 +pts=2048
 +pts_time=0.040000
 +dts=2048
 +dts_time=0.040000
 +duration=2048
 +duration_time=0.040000
 +convergence_duration=N/A
 +convergence_duration_time=N/A
 +size=230400
 +pos=265151
 +flags=K
 +
 +[packets_and_frames.frame.4]
 +media_type=video
 +key_frame=1
 +pkt_pts=2048
 +pkt_pts_time=0.040000
 +pkt_dts=2048
 +pkt_dts_time=0.040000
 +pkt_duration=2048
 +pkt_duration_time=0.040000
 +pkt_pos=265151
 +pkt_size=N/A
 +width=320
 +height=240
 +pix_fmt=rgb24
 +sample_aspect_ratio=1\:1
 +pict_type=I
 +coded_picture_number=0
 +display_picture_number=0
 +interlaced_frame=0
 +top_field_first=0
 +repeat_pict=0
 +reference=0
 +
 +[packets_and_frames.packet.5]
 +codec_type=video
 +stream_index=2
 +pts=2048
 +pts_time=0.040000
 +dts=2048
 +dts_time=0.040000
 +duration=2048
 +duration_time=0.040000
 +convergence_duration=N/A
 +convergence_duration_time=N/A
 +size=30000
 +pos=495575
 +flags=K
 +
 +[packets_and_frames.frame.5]
 +media_type=video
 +key_frame=1
 +pkt_pts=2048
 +pkt_pts_time=0.040000
 +pkt_dts=2048
 +pkt_dts_time=0.040000
 +pkt_duration=2048
 +pkt_duration_time=0.040000
 +pkt_pos=495575
 +pkt_size=N/A
 +width=100
 +height=100
 +pix_fmt=rgb24
 +sample_aspect_ratio=1\:1
 +pict_type=I
 +coded_picture_number=0
 +display_picture_number=0
 +interlaced_frame=0
 +top_field_first=0
 +repeat_pict=0
 +reference=0
 +
 +[packets_and_frames.packet.6]
 +codec_type=audio
 +stream_index=0
 +pts=2048
 +pts_time=0.046440
 +dts=2048
 +dts_time=0.046440
 +duration=1024
 +duration_time=0.023220
 +convergence_duration=N/A
 +convergence_duration_time=N/A
 +size=2048
 +pos=525580
 +flags=K
 +
 +[packets_and_frames.frame.6]
 +media_type=audio
 +key_frame=1
 +pkt_pts=2048
 +pkt_pts_time=0.046440
 +pkt_dts=2048
 +pkt_dts_time=0.046440
 +pkt_duration=1024
 +pkt_duration_time=0.023220
 +pkt_pos=525580
 +pkt_size=2048
 +sample_fmt=s16
 +nb_samples=1024
 +channels=1
- channel_layout=unknown
++channel_layout=mono
 +
 +[packets_and_frames.packet.7]
 +codec_type=audio
 +stream_index=0
 +pts=3072
 +pts_time=0.069660
 +dts=3072
 +dts_time=0.069660
 +duration=1024
 +duration_time=0.023220
 +convergence_duration=N/A
 +convergence_duration_time=N/A
 +size=2048
 +pos=527651
 +flags=K
 +
 +[packets_and_frames.frame.7]
 +media_type=audio
 +key_frame=1
 +pkt_pts=3072
 +pkt_pts_time=0.069660
 +pkt_dts=3072
 +pkt_dts_time=0.069660
 +pkt_duration=1024
 +pkt_duration_time=0.023220
 +pkt_pos=527651
 +pkt_size=2048
 +sample_fmt=s16
 +nb_samples=1024
 +channels=1
- channel_layout=unknown
++channel_layout=mono
 +
 +[packets_and_frames.packet.8]
 +codec_type=video
 +stream_index=1
 +pts=4096
 +pts_time=0.080000
 +dts=4096
 +dts_time=0.080000
 +duration=2048
 +duration_time=0.040000
 +convergence_duration=N/A
 +convergence_duration_time=N/A
 +size=230400
 +pos=529729
 +flags=K
 +
 +[packets_and_frames.frame.8]
 +media_type=video
 +key_frame=1
 +pkt_pts=4096
 +pkt_pts_time=0.080000
 +pkt_dts=4096
 +pkt_dts_time=0.080000
 +pkt_duration=2048
 +pkt_duration_time=0.040000
 +pkt_pos=529729
 +pkt_size=N/A
 +width=320
 +height=240
 +pix_fmt=rgb24
 +sample_aspect_ratio=1\:1
 +pict_type=I
 +coded_picture_number=0
 +display_picture_number=0
 +interlaced_frame=0
 +top_field_first=0
 +repeat_pict=0
 +reference=0
 +
 +[packets_and_frames.packet.9]
 +codec_type=video
 +stream_index=2
 +pts=4096
 +pts_time=0.080000
 +dts=4096
 +dts_time=0.080000
 +duration=2048
 +duration_time=0.040000
 +convergence_duration=N/A
 +convergence_duration_time=N/A
 +size=30000
 +pos=760153
 +flags=K
 +
 +[packets_and_frames.frame.9]
 +media_type=video
 +key_frame=1
 +pkt_pts=4096
 +pkt_pts_time=0.080000
 +pkt_dts=4096
 +pkt_dts_time=0.080000
 +pkt_duration=2048
 +pkt_duration_time=0.040000
 +pkt_pos=760153
 +pkt_size=N/A
 +width=100
 +height=100
 +pix_fmt=rgb24
 +sample_aspect_ratio=1\:1
 +pict_type=I
 +coded_picture_number=0
 +display_picture_number=0
 +interlaced_frame=0
 +top_field_first=0
 +repeat_pict=0
 +reference=0
 +
 +[packets_and_frames.packet.10]
 +codec_type=audio
 +stream_index=0
 +pts=4096
 +pts_time=0.092880
 +dts=4096
 +dts_time=0.092880
 +duration=1024
 +duration_time=0.023220
 +convergence_duration=N/A
 +convergence_duration_time=N/A
 +size=2048
 +pos=790158
 +flags=K
 +
 +[packets_and_frames.frame.10]
 +media_type=audio
 +key_frame=1
 +pkt_pts=4096
 +pkt_pts_time=0.092880
 +pkt_dts=4096
 +pkt_dts_time=0.092880
 +pkt_duration=1024
 +pkt_duration_time=0.023220
 +pkt_pos=790158
 +pkt_size=2048
 +sample_fmt=s16
 +nb_samples=1024
 +channels=1
- channel_layout=unknown
++channel_layout=mono
 +
 +[packets_and_frames.packet.11]
 +codec_type=audio
 +stream_index=0
 +pts=5120
 +pts_time=0.116100
 +dts=5120
 +dts_time=0.116100
 +duration=1024
 +duration_time=0.023220
 +convergence_duration=N/A
 +convergence_duration_time=N/A
 +size=2048
 +pos=792229
 +flags=K
 +
 +[packets_and_frames.frame.11]
 +media_type=audio
 +key_frame=1
 +pkt_pts=5120
 +pkt_pts_time=0.116100
 +pkt_dts=5120
 +pkt_dts_time=0.116100
 +pkt_duration=1024
 +pkt_duration_time=0.023220
 +pkt_pos=792229
 +pkt_size=2048
 +sample_fmt=s16
 +nb_samples=1024
 +channels=1
++channel_layout=mono
 +
 +[packets_and_frames.packet.12]
 +codec_type=video
 +stream_index=1
 +pts=6144
 +pts_time=0.120000
 +dts=6144
 +dts_time=0.120000
 +duration=2048
 +duration_time=0.040000
 +convergence_duration=N/A
 +convergence_duration_time=N/A
 +size=230400
 +pos=794307
 +flags=K
 +
 +[packets_and_frames.frame.12]
 +media_type=video
 +key_frame=1
 +pkt_pts=6144
 +pkt_pts_time=0.120000
 +pkt_dts=6144
 +pkt_dts_time=0.120000
 +pkt_duration=2048
 +pkt_duration_time=0.040000
 +pkt_pos=794307
 +pkt_size=N/A
 +width=320
 +height=240
 +pix_fmt=rgb24
 +sample_aspect_ratio=1\:1
 +pict_type=I
 +coded_picture_number=0
 +display_picture_number=0
 +interlaced_frame=0
 +top_field_first=0
 +repeat_pict=0
 +reference=0
 +
 +[packets_and_frames.packet.13]
 +codec_type=video
 +stream_index=2
 +pts=6144
 +pts_time=0.120000
 +dts=6144
 +dts_time=0.120000
 +duration=2048
 +duration_time=0.040000
 +convergence_duration=N/A
 +convergence_duration_time=N/A
 +size=30000
 +pos=1024731
 +flags=K
 +
 +[packets_and_frames.frame.13]
 +media_type=video
 +key_frame=1
 +pkt_pts=6144
 +pkt_pts_time=0.120000
 +pkt_dts=6144
 +pkt_dts_time=0.120000
 +pkt_duration=2048
 +pkt_duration_time=0.040000
 +pkt_pos=1024731
 +pkt_size=N/A
 +width=100
 +height=100
 +pix_fmt=rgb24
 +sample_aspect_ratio=1\:1
 +pict_type=I
 +coded_picture_number=0
 +display_picture_number=0
 +interlaced_frame=0
 +top_field_first=0
 +repeat_pict=0
 +reference=0
 +
 +[streams.stream.0]
 +index=0
 +codec_name=pcm_s16le
 +profile=unknown
 +codec_type=audio
 +codec_time_base=1/44100
 +codec_tag_string=PSD[16]
 +codec_tag=0x10445350
 +sample_fmt=s16
 +sample_rate=44100
 +channels=1
 +bits_per_sample=16
 +id=N/A
 +r_frame_rate=0/0
 +avg_frame_rate=0/0
 +time_base=1/44100
 +start_pts=0
 +start_time=0.000000
 +duration_ts=527406
 +duration=11.959320
 +bit_rate=705600
 +nb_frames=N/A
 +nb_read_frames=6
 +nb_read_packets=6
 +
 +[streams.stream.0.disposition]
 +default=0
 +dub=0
 +original=0
 +comment=0
 +lyrics=0
 +karaoke=0
 +forced=0
 +hearing_impaired=0
 +visual_impaired=0
 +clean_effects=0
 +attached_pic=0
 +
 +[streams.stream.0.tags]
 +E=mc²
 +
 +[streams.stream.1]
 +index=1
 +codec_name=rawvideo
 +profile=unknown
 +codec_type=video
 +codec_time_base=1/51200
 +codec_tag_string=RGB[24]
 +codec_tag=0x18424752
 +width=320
 +height=240
 +has_b_frames=0
 +sample_aspect_ratio=1\:1
 +display_aspect_ratio=4\:3
 +pix_fmt=rgb24
 +level=-99
 +timecode=N/A
 +id=N/A
 +r_frame_rate=25/1
 +avg_frame_rate=25/1
 +time_base=1/51200
 +start_pts=0
 +start_time=0.000000
 +duration_ts=612317
 +duration=11.959316
 +bit_rate=N/A
 +nb_frames=N/A
 +nb_read_frames=4
 +nb_read_packets=4
 +
 +[streams.stream.1.disposition]
 +default=0
 +dub=0
 +original=0
 +comment=0
 +lyrics=0
 +karaoke=0
 +forced=0
 +hearing_impaired=0
 +visual_impaired=0
 +clean_effects=0
 +attached_pic=0
 +
 +[streams.stream.1.tags]
 +title=foobar
 +duration_ts=field-and-tags-conflict-attempt
 +
 +[streams.stream.2]
 +index=2
 +codec_name=rawvideo
 +profile=unknown
 +codec_type=video
 +codec_time_base=1/51200
 +codec_tag_string=RGB[24]
 +codec_tag=0x18424752
 +width=100
 +height=100
 +has_b_frames=0
 +sample_aspect_ratio=1\:1
 +display_aspect_ratio=1\:1
 +pix_fmt=rgb24
 +level=-99
 +timecode=N/A
 +id=N/A
 +r_frame_rate=25/1
 +avg_frame_rate=25/1
 +time_base=1/51200
 +start_pts=0
 +start_time=0.000000
 +duration_ts=612317
 +duration=11.959316
 +bit_rate=N/A
 +nb_frames=N/A
 +nb_read_frames=4
 +nb_read_packets=4
 +
 +[streams.stream.2.disposition]
 +default=0
 +dub=0
 +original=0
 +comment=0
 +lyrics=0
 +karaoke=0
 +forced=0
 +hearing_impaired=0
 +visual_impaired=0
 +clean_effects=0
 +attached_pic=0
 +
 +[format]
 +filename=tests/data/ffprobe-test.nut
 +nb_streams=3
 +format_name=nut
 +start_time=0.000000
 +duration=11.959320
 +size=1054812
 +bit_rate=705599
 +
 +[format.tags]
 +title=ffprobe test file
 +comment='A comment with CSV, XML & JSON special chars'\: <tag value\="x">
 +comment2=I ♥ Üñîçød€
index 1864deb,0000000..94e63fc
mode 100644,000000..100644
--- /dev/null
@@@ -1,612 -1,0 +1,618 @@@
-             "channels": 1
 +{
 +    "packets_and_frames": [
 +        {
 +            "type": "packet",
 +            "codec_type": "audio",
 +            "stream_index": 0,
 +            "pts": 0,
 +            "pts_time": "0.000000",
 +            "dts": 0,
 +            "dts_time": "0.000000",
 +            "duration": 1024,
 +            "duration_time": "0.023220",
 +            "size": "2048",
 +            "pos": "572",
 +            "flags": "K"
 +        },
 +        {
 +            "type": "frame",
 +            "media_type": "audio",
 +            "key_frame": 1,
 +            "pkt_pts": 0,
 +            "pkt_pts_time": "0.000000",
 +            "pkt_dts": 0,
 +            "pkt_dts_time": "0.000000",
 +            "pkt_duration": 1024,
 +            "pkt_duration_time": "0.023220",
 +            "pkt_pos": "572",
 +            "pkt_size": "2048",
 +            "sample_fmt": "s16",
 +            "nb_samples": 1024,
-             "channels": 1
++            "channels": 1,
++            "channel_layout": "mono"
 +        },
 +        {
 +            "type": "packet",
 +            "codec_type": "video",
 +            "stream_index": 1,
 +            "pts": 0,
 +            "pts_time": "0.000000",
 +            "dts": 0,
 +            "dts_time": "0.000000",
 +            "duration": 2048,
 +            "duration_time": "0.040000",
 +            "size": "230400",
 +            "pos": "2647",
 +            "flags": "K"
 +        },
 +        {
 +            "type": "frame",
 +            "media_type": "video",
 +            "key_frame": 1,
 +            "pkt_pts": 0,
 +            "pkt_pts_time": "0.000000",
 +            "pkt_dts": 0,
 +            "pkt_dts_time": "0.000000",
 +            "pkt_duration": 2048,
 +            "pkt_duration_time": "0.040000",
 +            "pkt_pos": "2647",
 +            "width": 320,
 +            "height": 240,
 +            "pix_fmt": "rgb24",
 +            "sample_aspect_ratio": "1:1",
 +            "pict_type": "I",
 +            "coded_picture_number": 0,
 +            "display_picture_number": 0,
 +            "interlaced_frame": 0,
 +            "top_field_first": 0,
 +            "repeat_pict": 0,
 +            "reference": 0
 +        },
 +        {
 +            "type": "packet",
 +            "codec_type": "video",
 +            "stream_index": 2,
 +            "pts": 0,
 +            "pts_time": "0.000000",
 +            "dts": 0,
 +            "dts_time": "0.000000",
 +            "duration": 2048,
 +            "duration_time": "0.040000",
 +            "size": "30000",
 +            "pos": "233068",
 +            "flags": "K"
 +        },
 +        {
 +            "type": "frame",
 +            "media_type": "video",
 +            "key_frame": 1,
 +            "pkt_pts": 0,
 +            "pkt_pts_time": "0.000000",
 +            "pkt_dts": 0,
 +            "pkt_dts_time": "0.000000",
 +            "pkt_duration": 2048,
 +            "pkt_duration_time": "0.040000",
 +            "pkt_pos": "233068",
 +            "width": 100,
 +            "height": 100,
 +            "pix_fmt": "rgb24",
 +            "sample_aspect_ratio": "1:1",
 +            "pict_type": "I",
 +            "coded_picture_number": 0,
 +            "display_picture_number": 0,
 +            "interlaced_frame": 0,
 +            "top_field_first": 0,
 +            "repeat_pict": 0,
 +            "reference": 0
 +        },
 +        {
 +            "type": "packet",
 +            "codec_type": "audio",
 +            "stream_index": 0,
 +            "pts": 1024,
 +            "pts_time": "0.023220",
 +            "dts": 1024,
 +            "dts_time": "0.023220",
 +            "duration": 1024,
 +            "duration_time": "0.023220",
 +            "size": "2048",
 +            "pos": "263073",
 +            "flags": "K"
 +        },
 +        {
 +            "type": "frame",
 +            "media_type": "audio",
 +            "key_frame": 1,
 +            "pkt_pts": 1024,
 +            "pkt_pts_time": "0.023220",
 +            "pkt_dts": 1024,
 +            "pkt_dts_time": "0.023220",
 +            "pkt_duration": 1024,
 +            "pkt_duration_time": "0.023220",
 +            "pkt_pos": "263073",
 +            "pkt_size": "2048",
 +            "sample_fmt": "s16",
 +            "nb_samples": 1024,
-             "channels": 1
++            "channels": 1,
++            "channel_layout": "mono"
 +        },
 +        {
 +            "type": "packet",
 +            "codec_type": "video",
 +            "stream_index": 1,
 +            "pts": 2048,
 +            "pts_time": "0.040000",
 +            "dts": 2048,
 +            "dts_time": "0.040000",
 +            "duration": 2048,
 +            "duration_time": "0.040000",
 +            "size": "230400",
 +            "pos": "265151",
 +            "flags": "K"
 +        },
 +        {
 +            "type": "frame",
 +            "media_type": "video",
 +            "key_frame": 1,
 +            "pkt_pts": 2048,
 +            "pkt_pts_time": "0.040000",
 +            "pkt_dts": 2048,
 +            "pkt_dts_time": "0.040000",
 +            "pkt_duration": 2048,
 +            "pkt_duration_time": "0.040000",
 +            "pkt_pos": "265151",
 +            "width": 320,
 +            "height": 240,
 +            "pix_fmt": "rgb24",
 +            "sample_aspect_ratio": "1:1",
 +            "pict_type": "I",
 +            "coded_picture_number": 0,
 +            "display_picture_number": 0,
 +            "interlaced_frame": 0,
 +            "top_field_first": 0,
 +            "repeat_pict": 0,
 +            "reference": 0
 +        },
 +        {
 +            "type": "packet",
 +            "codec_type": "video",
 +            "stream_index": 2,
 +            "pts": 2048,
 +            "pts_time": "0.040000",
 +            "dts": 2048,
 +            "dts_time": "0.040000",
 +            "duration": 2048,
 +            "duration_time": "0.040000",
 +            "size": "30000",
 +            "pos": "495575",
 +            "flags": "K"
 +        },
 +        {
 +            "type": "frame",
 +            "media_type": "video",
 +            "key_frame": 1,
 +            "pkt_pts": 2048,
 +            "pkt_pts_time": "0.040000",
 +            "pkt_dts": 2048,
 +            "pkt_dts_time": "0.040000",
 +            "pkt_duration": 2048,
 +            "pkt_duration_time": "0.040000",
 +            "pkt_pos": "495575",
 +            "width": 100,
 +            "height": 100,
 +            "pix_fmt": "rgb24",
 +            "sample_aspect_ratio": "1:1",
 +            "pict_type": "I",
 +            "coded_picture_number": 0,
 +            "display_picture_number": 0,
 +            "interlaced_frame": 0,
 +            "top_field_first": 0,
 +            "repeat_pict": 0,
 +            "reference": 0
 +        },
 +        {
 +            "type": "packet",
 +            "codec_type": "audio",
 +            "stream_index": 0,
 +            "pts": 2048,
 +            "pts_time": "0.046440",
 +            "dts": 2048,
 +            "dts_time": "0.046440",
 +            "duration": 1024,
 +            "duration_time": "0.023220",
 +            "size": "2048",
 +            "pos": "525580",
 +            "flags": "K"
 +        },
 +        {
 +            "type": "frame",
 +            "media_type": "audio",
 +            "key_frame": 1,
 +            "pkt_pts": 2048,
 +            "pkt_pts_time": "0.046440",
 +            "pkt_dts": 2048,
 +            "pkt_dts_time": "0.046440",
 +            "pkt_duration": 1024,
 +            "pkt_duration_time": "0.023220",
 +            "pkt_pos": "525580",
 +            "pkt_size": "2048",
 +            "sample_fmt": "s16",
 +            "nb_samples": 1024,
-             "channels": 1
++            "channels": 1,
++            "channel_layout": "mono"
 +        },
 +        {
 +            "type": "packet",
 +            "codec_type": "audio",
 +            "stream_index": 0,
 +            "pts": 3072,
 +            "pts_time": "0.069660",
 +            "dts": 3072,
 +            "dts_time": "0.069660",
 +            "duration": 1024,
 +            "duration_time": "0.023220",
 +            "size": "2048",
 +            "pos": "527651",
 +            "flags": "K"
 +        },
 +        {
 +            "type": "frame",
 +            "media_type": "audio",
 +            "key_frame": 1,
 +            "pkt_pts": 3072,
 +            "pkt_pts_time": "0.069660",
 +            "pkt_dts": 3072,
 +            "pkt_dts_time": "0.069660",
 +            "pkt_duration": 1024,
 +            "pkt_duration_time": "0.023220",
 +            "pkt_pos": "527651",
 +            "pkt_size": "2048",
 +            "sample_fmt": "s16",
 +            "nb_samples": 1024,
-             "channels": 1
++            "channels": 1,
++            "channel_layout": "mono"
 +        },
 +        {
 +            "type": "packet",
 +            "codec_type": "video",
 +            "stream_index": 1,
 +            "pts": 4096,
 +            "pts_time": "0.080000",
 +            "dts": 4096,
 +            "dts_time": "0.080000",
 +            "duration": 2048,
 +            "duration_time": "0.040000",
 +            "size": "230400",
 +            "pos": "529729",
 +            "flags": "K"
 +        },
 +        {
 +            "type": "frame",
 +            "media_type": "video",
 +            "key_frame": 1,
 +            "pkt_pts": 4096,
 +            "pkt_pts_time": "0.080000",
 +            "pkt_dts": 4096,
 +            "pkt_dts_time": "0.080000",
 +            "pkt_duration": 2048,
 +            "pkt_duration_time": "0.040000",
 +            "pkt_pos": "529729",
 +            "width": 320,
 +            "height": 240,
 +            "pix_fmt": "rgb24",
 +            "sample_aspect_ratio": "1:1",
 +            "pict_type": "I",
 +            "coded_picture_number": 0,
 +            "display_picture_number": 0,
 +            "interlaced_frame": 0,
 +            "top_field_first": 0,
 +            "repeat_pict": 0,
 +            "reference": 0
 +        },
 +        {
 +            "type": "packet",
 +            "codec_type": "video",
 +            "stream_index": 2,
 +            "pts": 4096,
 +            "pts_time": "0.080000",
 +            "dts": 4096,
 +            "dts_time": "0.080000",
 +            "duration": 2048,
 +            "duration_time": "0.040000",
 +            "size": "30000",
 +            "pos": "760153",
 +            "flags": "K"
 +        },
 +        {
 +            "type": "frame",
 +            "media_type": "video",
 +            "key_frame": 1,
 +            "pkt_pts": 4096,
 +            "pkt_pts_time": "0.080000",
 +            "pkt_dts": 4096,
 +            "pkt_dts_time": "0.080000",
 +            "pkt_duration": 2048,
 +            "pkt_duration_time": "0.040000",
 +            "pkt_pos": "760153",
 +            "width": 100,
 +            "height": 100,
 +            "pix_fmt": "rgb24",
 +            "sample_aspect_ratio": "1:1",
 +            "pict_type": "I",
 +            "coded_picture_number": 0,
 +            "display_picture_number": 0,
 +            "interlaced_frame": 0,
 +            "top_field_first": 0,
 +            "repeat_pict": 0,
 +            "reference": 0
 +        },
 +        {
 +            "type": "packet",
 +            "codec_type": "audio",
 +            "stream_index": 0,
 +            "pts": 4096,
 +            "pts_time": "0.092880",
 +            "dts": 4096,
 +            "dts_time": "0.092880",
 +            "duration": 1024,
 +            "duration_time": "0.023220",
 +            "size": "2048",
 +            "pos": "790158",
 +            "flags": "K"
 +        },
 +        {
 +            "type": "frame",
 +            "media_type": "audio",
 +            "key_frame": 1,
 +            "pkt_pts": 4096,
 +            "pkt_pts_time": "0.092880",
 +            "pkt_dts": 4096,
 +            "pkt_dts_time": "0.092880",
 +            "pkt_duration": 1024,
 +            "pkt_duration_time": "0.023220",
 +            "pkt_pos": "790158",
 +            "pkt_size": "2048",
 +            "sample_fmt": "s16",
 +            "nb_samples": 1024,
-             "channels": 1
++            "channels": 1,
++            "channel_layout": "mono"
 +        },
 +        {
 +            "type": "packet",
 +            "codec_type": "audio",
 +            "stream_index": 0,
 +            "pts": 5120,
 +            "pts_time": "0.116100",
 +            "dts": 5120,
 +            "dts_time": "0.116100",
 +            "duration": 1024,
 +            "duration_time": "0.023220",
 +            "size": "2048",
 +            "pos": "792229",
 +            "flags": "K"
 +        },
 +        {
 +            "type": "frame",
 +            "media_type": "audio",
 +            "key_frame": 1,
 +            "pkt_pts": 5120,
 +            "pkt_pts_time": "0.116100",
 +            "pkt_dts": 5120,
 +            "pkt_dts_time": "0.116100",
 +            "pkt_duration": 1024,
 +            "pkt_duration_time": "0.023220",
 +            "pkt_pos": "792229",
 +            "pkt_size": "2048",
 +            "sample_fmt": "s16",
 +            "nb_samples": 1024,
++            "channels": 1,
++            "channel_layout": "mono"
 +        },
 +        {
 +            "type": "packet",
 +            "codec_type": "video",
 +            "stream_index": 1,
 +            "pts": 6144,
 +            "pts_time": "0.120000",
 +            "dts": 6144,
 +            "dts_time": "0.120000",
 +            "duration": 2048,
 +            "duration_time": "0.040000",
 +            "size": "230400",
 +            "pos": "794307",
 +            "flags": "K"
 +        },
 +        {
 +            "type": "frame",
 +            "media_type": "video",
 +            "key_frame": 1,
 +            "pkt_pts": 6144,
 +            "pkt_pts_time": "0.120000",
 +            "pkt_dts": 6144,
 +            "pkt_dts_time": "0.120000",
 +            "pkt_duration": 2048,
 +            "pkt_duration_time": "0.040000",
 +            "pkt_pos": "794307",
 +            "width": 320,
 +            "height": 240,
 +            "pix_fmt": "rgb24",
 +            "sample_aspect_ratio": "1:1",
 +            "pict_type": "I",
 +            "coded_picture_number": 0,
 +            "display_picture_number": 0,
 +            "interlaced_frame": 0,
 +            "top_field_first": 0,
 +            "repeat_pict": 0,
 +            "reference": 0
 +        },
 +        {
 +            "type": "packet",
 +            "codec_type": "video",
 +            "stream_index": 2,
 +            "pts": 6144,
 +            "pts_time": "0.120000",
 +            "dts": 6144,
 +            "dts_time": "0.120000",
 +            "duration": 2048,
 +            "duration_time": "0.040000",
 +            "size": "30000",
 +            "pos": "1024731",
 +            "flags": "K"
 +        },
 +        {
 +            "type": "frame",
 +            "media_type": "video",
 +            "key_frame": 1,
 +            "pkt_pts": 6144,
 +            "pkt_pts_time": "0.120000",
 +            "pkt_dts": 6144,
 +            "pkt_dts_time": "0.120000",
 +            "pkt_duration": 2048,
 +            "pkt_duration_time": "0.040000",
 +            "pkt_pos": "1024731",
 +            "width": 100,
 +            "height": 100,
 +            "pix_fmt": "rgb24",
 +            "sample_aspect_ratio": "1:1",
 +            "pict_type": "I",
 +            "coded_picture_number": 0,
 +            "display_picture_number": 0,
 +            "interlaced_frame": 0,
 +            "top_field_first": 0,
 +            "repeat_pict": 0,
 +            "reference": 0
 +        }
 +    ],
 +    "streams": [
 +        {
 +            "index": 0,
 +            "codec_name": "pcm_s16le",
 +            "codec_type": "audio",
 +            "codec_time_base": "1/44100",
 +            "codec_tag_string": "PSD[16]",
 +            "codec_tag": "0x10445350",
 +            "sample_fmt": "s16",
 +            "sample_rate": "44100",
 +            "channels": 1,
 +            "bits_per_sample": 16,
 +            "r_frame_rate": "0/0",
 +            "avg_frame_rate": "0/0",
 +            "time_base": "1/44100",
 +            "start_pts": 0,
 +            "start_time": "0.000000",
 +            "duration_ts": 527406,
 +            "duration": "11.959320",
 +            "bit_rate": "705600",
 +            "nb_read_frames": "6",
 +            "nb_read_packets": "6",
 +            "disposition": {
 +                "default": 0,
 +                "dub": 0,
 +                "original": 0,
 +                "comment": 0,
 +                "lyrics": 0,
 +                "karaoke": 0,
 +                "forced": 0,
 +                "hearing_impaired": 0,
 +                "visual_impaired": 0,
 +                "clean_effects": 0,
 +                "attached_pic": 0
 +            },
 +            "tags": {
 +                "E": "mc²"
 +            }
 +        },
 +        {
 +            "index": 1,
 +            "codec_name": "rawvideo",
 +            "codec_type": "video",
 +            "codec_time_base": "1/51200",
 +            "codec_tag_string": "RGB[24]",
 +            "codec_tag": "0x18424752",
 +            "width": 320,
 +            "height": 240,
 +            "has_b_frames": 0,
 +            "sample_aspect_ratio": "1:1",
 +            "display_aspect_ratio": "4:3",
 +            "pix_fmt": "rgb24",
 +            "level": -99,
 +            "r_frame_rate": "25/1",
 +            "avg_frame_rate": "25/1",
 +            "time_base": "1/51200",
 +            "start_pts": 0,
 +            "start_time": "0.000000",
 +            "duration_ts": 612317,
 +            "duration": "11.959316",
 +            "nb_read_frames": "4",
 +            "nb_read_packets": "4",
 +            "disposition": {
 +                "default": 0,
 +                "dub": 0,
 +                "original": 0,
 +                "comment": 0,
 +                "lyrics": 0,
 +                "karaoke": 0,
 +                "forced": 0,
 +                "hearing_impaired": 0,
 +                "visual_impaired": 0,
 +                "clean_effects": 0,
 +                "attached_pic": 0
 +            },
 +            "tags": {
 +                "title": "foobar",
 +                "duration_ts": "field-and-tags-conflict-attempt"
 +            }
 +        },
 +        {
 +            "index": 2,
 +            "codec_name": "rawvideo",
 +            "codec_type": "video",
 +            "codec_time_base": "1/51200",
 +            "codec_tag_string": "RGB[24]",
 +            "codec_tag": "0x18424752",
 +            "width": 100,
 +            "height": 100,
 +            "has_b_frames": 0,
 +            "sample_aspect_ratio": "1:1",
 +            "display_aspect_ratio": "1:1",
 +            "pix_fmt": "rgb24",
 +            "level": -99,
 +            "r_frame_rate": "25/1",
 +            "avg_frame_rate": "25/1",
 +            "time_base": "1/51200",
 +            "start_pts": 0,
 +            "start_time": "0.000000",
 +            "duration_ts": 612317,
 +            "duration": "11.959316",
 +            "nb_read_frames": "4",
 +            "nb_read_packets": "4",
 +            "disposition": {
 +                "default": 0,
 +                "dub": 0,
 +                "original": 0,
 +                "comment": 0,
 +                "lyrics": 0,
 +                "karaoke": 0,
 +                "forced": 0,
 +                "hearing_impaired": 0,
 +                "visual_impaired": 0,
 +                "clean_effects": 0,
 +                "attached_pic": 0
 +            }
 +        }
 +    ],
 +    "format": {
 +        "filename": "tests/data/ffprobe-test.nut",
 +        "nb_streams": 3,
 +        "format_name": "nut",
 +        "start_time": "0.000000",
 +        "duration": "11.959320",
 +        "size": "1054812",
 +        "bit_rate": "705599",
 +        "tags": {
 +            "title": "ffprobe test file",
 +            "comment": "'A comment with CSV, XML & JSON special chars': <tag value=\"x\">",
 +            "comment2": "I ♥ Üñîçød€"
 +        }
 +    }
 +}
index 8d38202,0000000..ac5ac86
mode 100644,000000..100644
--- /dev/null
@@@ -1,54 -1,0 +1,54 @@@
-         <frame media_type="audio" key_frame="1" pkt_pts="0" pkt_pts_time="0.000000" pkt_dts="0" pkt_dts_time="0.000000" pkt_duration="1024" pkt_duration_time="0.023220" pkt_pos="572" pkt_size="2048" sample_fmt="s16" nb_samples="1024" channels="1"/>
 +<?xml version="1.0" encoding="UTF-8"?>
 +<ffprobe>
 +    <packets_and_frames>
 +        <packet codec_type="audio" stream_index="0" pts="0" pts_time="0.000000" dts="0" dts_time="0.000000" duration="1024" duration_time="0.023220" size="2048" pos="572" flags="K"/>
-         <frame media_type="audio" key_frame="1" pkt_pts="1024" pkt_pts_time="0.023220" pkt_dts="1024" pkt_dts_time="0.023220" pkt_duration="1024" pkt_duration_time="0.023220" pkt_pos="263073" pkt_size="2048" sample_fmt="s16" nb_samples="1024" channels="1"/>
++        <frame media_type="audio" key_frame="1" pkt_pts="0" pkt_pts_time="0.000000" pkt_dts="0" pkt_dts_time="0.000000" pkt_duration="1024" pkt_duration_time="0.023220" pkt_pos="572" pkt_size="2048" sample_fmt="s16" nb_samples="1024" channels="1" channel_layout="mono"/>
 +        <packet codec_type="video" stream_index="1" pts="0" pts_time="0.000000" dts="0" dts_time="0.000000" duration="2048" duration_time="0.040000" size="230400" pos="2647" flags="K"/>
 +        <frame media_type="video" key_frame="1" pkt_pts="0" pkt_pts_time="0.000000" pkt_dts="0" pkt_dts_time="0.000000" pkt_duration="2048" pkt_duration_time="0.040000" pkt_pos="2647" width="320" height="240" pix_fmt="rgb24" sample_aspect_ratio="1:1" pict_type="I" coded_picture_number="0" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0" reference="0"/>
 +        <packet codec_type="video" stream_index="2" pts="0" pts_time="0.000000" dts="0" dts_time="0.000000" duration="2048" duration_time="0.040000" size="30000" pos="233068" flags="K"/>
 +        <frame media_type="video" key_frame="1" pkt_pts="0" pkt_pts_time="0.000000" pkt_dts="0" pkt_dts_time="0.000000" pkt_duration="2048" pkt_duration_time="0.040000" pkt_pos="233068" width="100" height="100" pix_fmt="rgb24" sample_aspect_ratio="1:1" pict_type="I" coded_picture_number="0" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0" reference="0"/>
 +        <packet codec_type="audio" stream_index="0" pts="1024" pts_time="0.023220" dts="1024" dts_time="0.023220" duration="1024" duration_time="0.023220" size="2048" pos="263073" flags="K"/>
-         <frame media_type="audio" key_frame="1" pkt_pts="2048" pkt_pts_time="0.046440" pkt_dts="2048" pkt_dts_time="0.046440" pkt_duration="1024" pkt_duration_time="0.023220" pkt_pos="525580" pkt_size="2048" sample_fmt="s16" nb_samples="1024" channels="1"/>
++        <frame media_type="audio" key_frame="1" pkt_pts="1024" pkt_pts_time="0.023220" pkt_dts="1024" pkt_dts_time="0.023220" pkt_duration="1024" pkt_duration_time="0.023220" pkt_pos="263073" pkt_size="2048" sample_fmt="s16" nb_samples="1024" channels="1" channel_layout="mono"/>
 +        <packet codec_type="video" stream_index="1" pts="2048" pts_time="0.040000" dts="2048" dts_time="0.040000" duration="2048" duration_time="0.040000" size="230400" pos="265151" flags="K"/>
 +        <frame media_type="video" key_frame="1" pkt_pts="2048" pkt_pts_time="0.040000" pkt_dts="2048" pkt_dts_time="0.040000" pkt_duration="2048" pkt_duration_time="0.040000" pkt_pos="265151" width="320" height="240" pix_fmt="rgb24" sample_aspect_ratio="1:1" pict_type="I" coded_picture_number="0" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0" reference="0"/>
 +        <packet codec_type="video" stream_index="2" pts="2048" pts_time="0.040000" dts="2048" dts_time="0.040000" duration="2048" duration_time="0.040000" size="30000" pos="495575" flags="K"/>
 +        <frame media_type="video" key_frame="1" pkt_pts="2048" pkt_pts_time="0.040000" pkt_dts="2048" pkt_dts_time="0.040000" pkt_duration="2048" pkt_duration_time="0.040000" pkt_pos="495575" width="100" height="100" pix_fmt="rgb24" sample_aspect_ratio="1:1" pict_type="I" coded_picture_number="0" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0" reference="0"/>
 +        <packet codec_type="audio" stream_index="0" pts="2048" pts_time="0.046440" dts="2048" dts_time="0.046440" duration="1024" duration_time="0.023220" size="2048" pos="525580" flags="K"/>
-         <frame media_type="audio" key_frame="1" pkt_pts="3072" pkt_pts_time="0.069660" pkt_dts="3072" pkt_dts_time="0.069660" pkt_duration="1024" pkt_duration_time="0.023220" pkt_pos="527651" pkt_size="2048" sample_fmt="s16" nb_samples="1024" channels="1"/>
++        <frame media_type="audio" key_frame="1" pkt_pts="2048" pkt_pts_time="0.046440" pkt_dts="2048" pkt_dts_time="0.046440" pkt_duration="1024" pkt_duration_time="0.023220" pkt_pos="525580" pkt_size="2048" sample_fmt="s16" nb_samples="1024" channels="1" channel_layout="mono"/>
 +        <packet codec_type="audio" stream_index="0" pts="3072" pts_time="0.069660" dts="3072" dts_time="0.069660" duration="1024" duration_time="0.023220" size="2048" pos="527651" flags="K"/>
-         <frame media_type="audio" key_frame="1" pkt_pts="4096" pkt_pts_time="0.092880" pkt_dts="4096" pkt_dts_time="0.092880" pkt_duration="1024" pkt_duration_time="0.023220" pkt_pos="790158" pkt_size="2048" sample_fmt="s16" nb_samples="1024" channels="1"/>
++        <frame media_type="audio" key_frame="1" pkt_pts="3072" pkt_pts_time="0.069660" pkt_dts="3072" pkt_dts_time="0.069660" pkt_duration="1024" pkt_duration_time="0.023220" pkt_pos="527651" pkt_size="2048" sample_fmt="s16" nb_samples="1024" channels="1" channel_layout="mono"/>
 +        <packet codec_type="video" stream_index="1" pts="4096" pts_time="0.080000" dts="4096" dts_time="0.080000" duration="2048" duration_time="0.040000" size="230400" pos="529729" flags="K"/>
 +        <frame media_type="video" key_frame="1" pkt_pts="4096" pkt_pts_time="0.080000" pkt_dts="4096" pkt_dts_time="0.080000" pkt_duration="2048" pkt_duration_time="0.040000" pkt_pos="529729" width="320" height="240" pix_fmt="rgb24" sample_aspect_ratio="1:1" pict_type="I" coded_picture_number="0" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0" reference="0"/>
 +        <packet codec_type="video" stream_index="2" pts="4096" pts_time="0.080000" dts="4096" dts_time="0.080000" duration="2048" duration_time="0.040000" size="30000" pos="760153" flags="K"/>
 +        <frame media_type="video" key_frame="1" pkt_pts="4096" pkt_pts_time="0.080000" pkt_dts="4096" pkt_dts_time="0.080000" pkt_duration="2048" pkt_duration_time="0.040000" pkt_pos="760153" width="100" height="100" pix_fmt="rgb24" sample_aspect_ratio="1:1" pict_type="I" coded_picture_number="0" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0" reference="0"/>
 +        <packet codec_type="audio" stream_index="0" pts="4096" pts_time="0.092880" dts="4096" dts_time="0.092880" duration="1024" duration_time="0.023220" size="2048" pos="790158" flags="K"/>
-         <frame media_type="audio" key_frame="1" pkt_pts="5120" pkt_pts_time="0.116100" pkt_dts="5120" pkt_dts_time="0.116100" pkt_duration="1024" pkt_duration_time="0.023220" pkt_pos="792229" pkt_size="2048" sample_fmt="s16" nb_samples="1024" channels="1"/>
++        <frame media_type="audio" key_frame="1" pkt_pts="4096" pkt_pts_time="0.092880" pkt_dts="4096" pkt_dts_time="0.092880" pkt_duration="1024" pkt_duration_time="0.023220" pkt_pos="790158" pkt_size="2048" sample_fmt="s16" nb_samples="1024" channels="1" channel_layout="mono"/>
 +        <packet codec_type="audio" stream_index="0" pts="5120" pts_time="0.116100" dts="5120" dts_time="0.116100" duration="1024" duration_time="0.023220" size="2048" pos="792229" flags="K"/>
++        <frame media_type="audio" key_frame="1" pkt_pts="5120" pkt_pts_time="0.116100" pkt_dts="5120" pkt_dts_time="0.116100" pkt_duration="1024" pkt_duration_time="0.023220" pkt_pos="792229" pkt_size="2048" sample_fmt="s16" nb_samples="1024" channels="1" channel_layout="mono"/>
 +        <packet codec_type="video" stream_index="1" pts="6144" pts_time="0.120000" dts="6144" dts_time="0.120000" duration="2048" duration_time="0.040000" size="230400" pos="794307" flags="K"/>
 +        <frame media_type="video" key_frame="1" pkt_pts="6144" pkt_pts_time="0.120000" pkt_dts="6144" pkt_dts_time="0.120000" pkt_duration="2048" pkt_duration_time="0.040000" pkt_pos="794307" width="320" height="240" pix_fmt="rgb24" sample_aspect_ratio="1:1" pict_type="I" coded_picture_number="0" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0" reference="0"/>
 +        <packet codec_type="video" stream_index="2" pts="6144" pts_time="0.120000" dts="6144" dts_time="0.120000" duration="2048" duration_time="0.040000" size="30000" pos="1024731" flags="K"/>
 +        <frame media_type="video" key_frame="1" pkt_pts="6144" pkt_pts_time="0.120000" pkt_dts="6144" pkt_dts_time="0.120000" pkt_duration="2048" pkt_duration_time="0.040000" pkt_pos="1024731" width="100" height="100" pix_fmt="rgb24" sample_aspect_ratio="1:1" pict_type="I" coded_picture_number="0" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0" reference="0"/>
 +    </packets_and_frames>
 +
 +    <streams>
 +        <stream index="0" codec_name="pcm_s16le" codec_type="audio" codec_time_base="1/44100" codec_tag_string="PSD[16]" codec_tag="0x10445350" sample_fmt="s16" sample_rate="44100" channels="1" bits_per_sample="16" r_frame_rate="0/0" avg_frame_rate="0/0" time_base="1/44100" start_pts="0" start_time="0.000000" duration_ts="527406" duration="11.959320" bit_rate="705600" nb_read_frames="6" nb_read_packets="6">
 +            <disposition default="0" dub="0" original="0" comment="0" lyrics="0" karaoke="0" forced="0" hearing_impaired="0" visual_impaired="0" clean_effects="0" attached_pic="0"/>
 +            <tag key="E" value="mc²"/>
 +        </stream>
 +        <stream index="1" codec_name="rawvideo" codec_type="video" codec_time_base="1/51200" codec_tag_string="RGB[24]" codec_tag="0x18424752" width="320" height="240" has_b_frames="0" sample_aspect_ratio="1:1" display_aspect_ratio="4:3" pix_fmt="rgb24" level="-99" r_frame_rate="25/1" avg_frame_rate="25/1" time_base="1/51200" start_pts="0" start_time="0.000000" duration_ts="612317" duration="11.959316" nb_read_frames="4" nb_read_packets="4">
 +            <disposition default="0" dub="0" original="0" comment="0" lyrics="0" karaoke="0" forced="0" hearing_impaired="0" visual_impaired="0" clean_effects="0" attached_pic="0"/>
 +            <tag key="title" value="foobar"/>
 +            <tag key="duration_ts" value="field-and-tags-conflict-attempt"/>
 +        </stream>
 +        <stream index="2" codec_name="rawvideo" codec_type="video" codec_time_base="1/51200" codec_tag_string="RGB[24]" codec_tag="0x18424752" width="100" height="100" has_b_frames="0" sample_aspect_ratio="1:1" display_aspect_ratio="1:1" pix_fmt="rgb24" level="-99" r_frame_rate="25/1" avg_frame_rate="25/1" time_base="1/51200" start_pts="0" start_time="0.000000" duration_ts="612317" duration="11.959316" nb_read_frames="4" nb_read_packets="4">
 +            <disposition default="0" dub="0" original="0" comment="0" lyrics="0" karaoke="0" forced="0" hearing_impaired="0" visual_impaired="0" clean_effects="0" attached_pic="0"/>
 +        </stream>
 +    </streams>
 +
 +    <format filename="tests/data/ffprobe-test.nut" nb_streams="3" format_name="nut" start_time="0.000000" duration="11.959320" size="1054812" bit_rate="705599">
 +        <tag key="title" value="ffprobe test file"/>
 +        <tag key="comment" value="&apos;A comment with CSV, XML &amp; JSON special chars&apos;: &lt;tag value=&quot;x&quot;&gt;"/>
 +        <tag key="comment2" value="I ♥ Üñîçød€"/>
 +    </format>
 +</ffprobe>