[Libav-user] Recent ffmpeg version doesn't support v4l2
Leandro Santiago
leandrosansilva at gmail.com
Mon Jul 4 16:07:12 CEST 2011
Yes... It's very strange. After trying what you told me, I could open
replacing the old code with this, using the new API:
/* New API */
AVDictionary *dict = NULL;
int dictRet = av_dict_set(&dict,"standard","ntsc",0);
dictRet = av_dict_set(&dict,"video_size","320x240",0);
bRet = avformat_open_input(&pIFormatCtx, sFile, pIFormat,&dict);
And it worked :-) Why did you replaced informations like video width
and height by strings in a dictionary? By the say, thx for your help
:-)
2011/7/2 Stefano Sabatini <stefano.sabatini-lala at poste.it>:
> On date Friday 2011-07-01 15:23:58 -0300, Leandro Santiago encoded:
>> Sorry for the delay (I was busy these days and couldn't answer). I
>> continue having problems with ffmpeg from trunk. The last which worked
>> with me is 0.7rc
>> the pastebin is in:
>> http://pastebin.com/rLL2jBUp
>>
>> and the error, when I call av_open_input_file is:
>> [video4linux2 @ 0xa904180] ioctl set time per frame(7/8560628) failed
>
> Whence does this 7/8560628 value comes from?
>
>> this call returns a valid value, but so I can't find any streams in
>> the input. With 0.7rc everything works fine.
>
> The problem is related to this hunk:
>
> memset(&oFormatParams,0,sizeof(AVFormatParameters));
> oFormatParams.standard = "ntsc";
> pIFormat = av_find_input_format("video4linux2");
> bRet = av_open_input_file(&pIFormatCtx, sFile, pIFormat, 0, &oFormatParams);
>
> Note that av_open_input_file() was recently deprecated, maybe something
> went wrong in the transition with the new API.
>
> I suggest you to try with latest git, and check if it works with
> ffmpeg/ffplay (debugging with gdb will show you why this is happening).
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user
>
More information about the Libav-user
mailing list