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

Baptiste Coudurier baptiste.coudurier
Sat Jun 7 18:26:06 CEST 2008


Hi,

Michael Niedermayer wrote:
> On Sat, Jun 07, 2008 at 04:42:54PM +0200, Stefano Sabatini wrote:
>> 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.
> 
> ok
> 
> 
>> 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)?
> 
> i see no harm done by having it in lavf
> 

Yes, and I find it quite useful when it comes to print file infos in
applications :>

-- 
Baptiste COUDURIER                              GnuPG Key Id: 0x5C1ABAAA
Smartjog USA Inc.                                http://www.smartjog.com
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA




More information about the ffmpeg-devel mailing list