[Ffmpeg-devel] Decoding images (jpeg) from an url

Michel Bardiaux mbardiaux
Tue Sep 20 10:43:57 CEST 2005


Stefan Lucke wrote:
> On Montag, 19. September 2005 15:00, Michel Bardiaux wrote:
> 
>>Stefan Lucke wrote:
>>
>>>Hi
>>>
>>>I need some little help on decoding images via url like:
>>>http://w.x.y.z:9001/disk/photo/O2385(1536x1024,0).jpg
>>>
>>>from the following code:
>>>    if ((rc = av_open_input_file(&ic, url, NULL, 0, NULL)) >= 0) {
>>>      if (av_find_stream_info(ic) >= 0) {
>>>        playable = true;
>>>      }
>>>    }
>>>
>>>  fprintf(stderr, "FfmpegIO: url(%s) is %splayable %p (rc = %d)\n",
>>>          url,
>>>          (playable) ? "": "NOT ", ic, rc);
>>>
>>>I get:
>>>FfmpegIO: url(http://w.x.y.z:9001/disk/photo/O2385(1536x1024,0).jpg) is NOT playable (nil) (rc = -6)
>>>
>>>It works fine for mp3 urls and with stuttering audio and video for vdr files.
>>>FfmpegIO: url(http://w.x.y.z:9001/disk/music/O562.mp3) is playable 0x87a51c0 (rc = 0)
>>>FfmpegIO: url(http://w.x.y.z:9001/disk/video/O4712.vdr) is playable 0x8720de0 (rc = 0)
>>>
>>>Would be nice if some could give me a hint how to proceed.
>>>
>>>
>>
>>Since we cat access the URLs in question, and anyway the program as 
>>published is incomplete, I can only suggest you look in the source the 
>>reasons why av_open_input_file can return -6.
>>
> 
> 
> I think its the same as I get when calling ffmpeg:
> stefan at jarada:~> ffmpeg -i 'http://w.x.y.z:9001/disk/photo/O2385(1536x1024,0).jpg' x.yuv
> ffmpeg version CVS, build 3276800, Copyright (c) 2000-2004 Fabrice Bellard
>   configuration:  --enable-shared --enable-pp --enable-shared-pp --enable-gpl --enable-a52
>   built on Sep 17 2005 13:23:03, gcc: 3.3.1 (SuSE Linux)
> http://w.x.y.z:9001/disk/photo/O2385(1536x1024,0).jpg: Unknown format

Good idea. Now we know your software is probably not to blame.

> 
> (real ip adresses replaced).
> 
What happens if you try with some JPEG on the web at some URL anyone can 
access? (I could try that myself but you wisely asked for *hints*...)

HaND,
-- 
Michel Bardiaux
R&D Director
T +32 [0] 2 790 29 41
F +32 [0] 2 790 29 02
E mailto:mbardiaux at mediaxim.be

Mediaxim NV/SA
Vorstlaan 191 Boulevard du Souverain
Brussel 1160 Bruxelles
http://www.mediaxim.com/





More information about the ffmpeg-devel mailing list