0

I'm trying to use FFMpeg to create a video. So far i've been playing with a multiplexing example: http://ffmpeg.org/doxygen/trunk/muxing_8c-source.html, and i'm able to create a compressed video from an already existing video.

Because my program is going to run on an embedded platform I would like to use some custom code (generated by a colleague) to compress the video data and place it into the video file. So I'm looking for a way to create a video file in c/c++ using ffmpeg in which i have full control over the compression part (to basically circumvent ffmpeg from doing the compression for me and inserting my own code).

To clarify i'm planning to use this to save film from an intelligent camera into a compressed h264 mpeg-4 file.

p.streef
  • 2,952
  • 2
  • 21
  • 46
  • I want to use ffmpeg algoritham with android NDK (JNI) to compress large mp4 video. is it possible for me to use http://ffmpeg.org/doxygen/trunk/muxing_8c-source.html for tha – Mr.G Dec 11 '13 at 16:59

1 Answers1

0

You could pipe the output with -vcodec rawvideo to your custom program, or write it as a codec and have ffmpeg handle it.

By the way, ffmpeg was superceded by avconv. ffmpeg only exists for backwards compatibility now.

Edit: apparently avconv is a newer fork of ffmpeg, and seems to have more support. Either way, the options are almost the same.

Community
  • 1
  • 1
J V
  • 9,736
  • 7
  • 41
  • 64
  • I do not want to run the program seperately because that will take up too much cycletime. I am looking for code using avformat and perhaps some other ffmpeg libraries – p.streef Aug 21 '12 at 13:22
  • Stick with ffmpeg. avcons is buggy. There is war going on between the 2 camps. So pls test and decide accordingly. – MarcoZen May 04 '15 at 16:56