[FFmpeg-devel] [PATCH] Improve error reporting in case of input/output stream mismatch

Stefano Sabatini stefano.sabatini-lala
Sat Jun 7 16:42:54 CEST 2008


Hi all,

as in subject.

For example, without the patch:

stefano at geppetto ~/s/ffmpeg> 
ffmpeg -f video4linux -s 640x480 -r 25 -i /dev/video0  http://localhost:8090/feed1.ffm
[...]
Input #0, video4linux, from '/dev/video0':
  Duration: N/A, start: 1212849517.880434, bitrate: 92160 kb/s
    Stream #0.0: Video: rawvideo, yuv420p, 640x480, 92160 kb/s, 25.00 tb(r)
Could not find input stream matching output stream #0.3

with the patch:

stefano at geppetto ~/s/ffmpeg> 
ffmpeg -f video4linux -s 640x480 -r 25 -i /dev/video0  http://localhost:8090/feed1.ffm
[...]
Input #0, video4linux, from '/dev/video0':
  Duration: N/A, start: 1212849517.880434, bitrate: 92160 kb/s
    Stream #0.0: Video: rawvideo, yuv420p, 640x480, 92160 kb/s, 25.00 tb(r)
Output #0, ffm, to 'http://localhost:8090/feed1.ffm':
    Stream #0.0: Video: mjpeg, yuv420p, 160x128, q=3-31, 64 kb/s,  2.00 tb(c)
    Stream #0.1: Video: mjpeg, yuv420p, 352x240, q=3-31, 64 kb/s,  2.00 tb(c)
    Stream #0.2: Video: flv, yuv420p, 160x128, q=3-31, 64 kb/s,  2.00 tb(c)
    Stream #0.3: Audio: libmp3lame, 22050 Hz, mono, 64 kb/s
    Stream #0.4: Video: msmpeg4, yuv420p, 352x240, q=3-31, 256 kb/s, 15.00 tb(c)
Could not find input stream matching output stream #0.3

I think the latter is more user friendly.

BTW dump_format() doesn't seem to belong to libavformat (what's the
meaning of is_output and file_index in a library?), is it OK to move
it to ffmpeg.c or maybe cmdutils.c (yes I know with all the necessary
ifdeffery required to preserve API)?

Regards.
-- 
FFmpeg = Frenzy Foolish MultiPurpose EniGma
-------------- next part --------------
A non-text attachment was scrubbed...
Name: improve-mismatch-report-00.patch
Type: text/x-diff
Size: 590 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080607/78f4963d/attachment.patch>



More information about the ffmpeg-devel mailing list