Cai, Xin wrote:
> hi guys
> So I have been playing around with AV library for a few days and so far I 
> gotten it to grab video from an IP camera and convert it to mpeg4 and write 
> it to the disk. 
> My code basically works by 
> 1. grab frame from Video and decode it by calling avcodec_decode_video
> 2. encode the frame by calling avcodec_encode_video 
> 3. write the frame to disk using av_write_frame 
>
> Now I want to be able to further control the quality of the video I am 
> writing to the disk. So I would like to know how can I change the frame rate 
> of the video being written to the disk? Now base on the output_example.c file 
> I thought that it is controlled
> by the AVstream *st->codec->time_base.den field. But when I tried to set 
> that, all it did is slow down the rate in which the video is being played at. 
> So lets say I have a 5 second video at 30 fps, now it plays it at 2fps but it 
> takes 15 * 5 seconds to finish playing. So how can I get it to drop frames? 
>   
Isn't is as simple as to omit the 14 images in between ? So instead of
writing 30 images/sec to disk you would only write 2 of them. This way
you would get back to 'real time' display when playing the video.
> My second question is, I also want to be able to strip away color information 
> and turn the video to black and white. How would I do that? Thanks
>
> Xin Cai
>
>
>
>
>
> _______________________________________________
> libav-user mailing list
> [email protected]
> https://lists.mplayerhq.hu/mailman/listinfo/libav-user
>   

_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to