Hi , I have a media file having mpeg4 as video format and amrnb as audio format . I wanted to apply some effects (brightness,contrast etc) to the video and re-encode it to the same format and no changes to audio stream(only copying the audio packets) , using ffmpeg.
The steps I followed were , 1. Open the input file and initialize the AVCodecContext for the video stream of input file ater finding the decoder . 2. Created an output file and added new streams to it for video and audio streams. 3. Since I wanted same configurations for the new file I initialised the AVCodecContext of the output streams using avcodec_copy_context() . 4. Decoded the video frames and re-encoded the frames after applying some changes in Y,U,V components and just copied and remuxed the audio frames to the output file . I was able to re-encode the video frames succesfully but I found a significant decrease in bit rate of video streams in the output file . Infact my input video bitrate was 10032kb/s and output video bitrate reduced to 675kb/s . Also the file size got reduced from 46MB to 3.1MB !!! I also tried without applying any effects ie,just re-encoding video frames after decoding . Am I doing something seriously wrong here ?? Note : I followed http://ffmpeg.org/doxygen/trunk/transcoding_8c-example.html for re-encoding . -- Thanks and Regards , David Varghese _______________________________________________ ffmpeg-user mailing list [email protected] http://ffmpeg.org/mailman/listinfo/ffmpeg-user
