[FFmpeg-devel] [PATCH] Dump output format in case of codec type mismatch

Michael Niedermayer michaelni
Mon Jul 28 20:21:45 CEST 2008


On Sun, Jul 27, 2008 at 10:52:49PM +0200, Stefano Sabatini wrote:
> On date Sunday 2008-07-27 21:08:20 +0200, Diego Biurrun encoded:
> > On Sun, Jul 27, 2008 at 08:40:15PM +0200, Benjamin Larsson wrote:
> > > Stefano Sabatini wrote:
> > > > 
> > > > For example:
> > > > src/ffmpeg/ffmpeg -t 0 -i ~/test.flv -f rtp -map 0.0:0.0 rtp://localhost:5008
> > > > [...]
> > > > Input #0, flv, from '/home/stefano/test.flv':
> > > >   Duration: 00:00:30.01, start: 0.000000, bitrate: 96 kb/s
> > > >     Stream #0.0: Video: vp6f, yuv420p, 320x240, 25.00 tb(r)
> > > >     Stream #0.1: Audio: mp3, 44100 Hz, mono, 96 kb/s
> > > > Output #0, rtp, to 'rtp://localhost:5008':
> > > >     Stream #0.0: Audio: pcm_mulaw, 44100 Hz, mono, 352 kb/s
> > > > Codec type mismatch for mapping #0.0 -> #0.0
> > > > 
> > > > With the patch it becomes:
> > > > src/ffmpeg/ffmpeg -i ~/test.flv -f rtp -map 0.0:0.0 rtp://localhost:5008
> > > > [...]
> > > > Input #0, flv, from '/home/stefano/test.flv':
> > > >   Duration: 00:00:30.01, start: 0.000000, bitrate: 96 kb/s
> > > >     Stream #0.0: Video: vp6f, yuv420p, 320x240, 25.00 tb(r)
> > > >     Stream #0.1: Audio: mp3, 44100 Hz, mono, 96 kb/s
> > > > Output #0, rtp, to 'rtp://localhost:5008':
> > > >     Stream #0.0: Audio: pcm_mulaw, 44100 Hz, mono, 352 kb/s
> > > > Codec type mismatch for mapping #0.0 -> #0.0
> > > > 
> > > > which is far easier to debug.
> > > 
> > > Am I blind ? I see no difference.
> > 
> > I wondered the same thing..
> 
> Lol... without the patch it is:
> ffmpeg -i ~/test.flv -f rtp -map 0.0:0.0 rtp://localhost:5008
> [...]
> Input #0, flv, from '/home/stefano/test.flv':
>   Duration: 00:00:30.01, start: 0.000000, bitrate: 96 kb/s
>     Stream #0.0: Video: vp6f, yuv420p, 320x240, 25.00 tb(r)
>     Stream #0.1: Audio: mp3, 44100 Hz, mono, 96 kb/s
> Codec type mismatch for mapping #0.0 -> #0.0
> 
> Regards.
> -- 
> FFmpeg = Frightening Freak Multimedia Problematic Epic Guru

> Index: ffmpeg.c
> ===================================================================
> --- ffmpeg.c	(revision 14424)
> +++ ffmpeg.c	(working copy)
> @@ -1597,6 +1597,8 @@
>  
>                  /* Sanity check that the stream types match */
>                  if (ist_table[ost->source_index]->st->codec->codec_type != ost->st->codec->codec_type) {
> +                    int i= ost->file_index;
> +                    dump_format(output_files[i], i, output_files[i]->filename, 1);
>                      fprintf(stderr, "Codec type mismatch for mapping #%d.%d -> #%d.%d\n",
>                          stream_maps[n-1].file_index, stream_maps[n-1].stream_index,
>                          ost->file_index, ost->index);

ok, but if these are becoming more common then this dump_format+fprintf+exit
should be factorized into its own function

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I wish the Xiph folks would stop pretending they've got something they
do not.  Somehow I fear this will remain a wish. -- M?ns Rullg?rd
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080728/5abcf30f/attachment.pgp>



More information about the ffmpeg-devel mailing list