I use ffmpeg to decode x264 720P stream from a IP camera,
av_open_input_file(&pFormatCtx, url, NULL, 0, NULL) works well,
parameter url could be a RTSP://host address or the pathfilename save by my
program metion in the mail,only question left is: I cannot control the
displaying frame rate now,i wondered if someone could help me.
thanks a million!!
( :
在 2011年5月25日 下午12:10，lsosa <dophinwei at 126.com>写道：
> you can save the data into the file, but the file can't be played by the
> same program because of its new file format.
>>> --
>>>> 在2011-05-25 09:07:00，"孙大伟" <sundawei at gmail.com> 写道：
> >Hi all,
> > I have send this mail to the libav-user at ffmpeg.org, but got no
> reply,I
> >really need someone's help!
> > I got RTP strem from a IP camera, decode ervery frame and display it,
> >and now I want to save the stream to file for later playing.
> > My question is, can i directly save AVPacket data to a file, like the
> >following:
> >
> > while(av_read_frame(pFormatCtx, &packet)>=0) {
> > if(packet.stream_index==videoStream) {
> > here I write packet.data to a file.
> >
> > After doing that, I got a file,and with the same program I play it.Is
> >this process correct?
> >_______________________________________________
> >ffmpeg-devel mailing list
> >ffmpeg-devel at ffmpeg.org> >http://ffmpeg.org/mailman/listinfo/ffmpeg-devel> _______________________________________________
> ffmpeg-devel mailing list
>ffmpeg-devel at ffmpeg.org>http://ffmpeg.org/mailman/listinfo/ffmpeg-devel>