[FFmpeg-devel] How do I specify a bitstream filter using the ffmpeg API

declan harrison harrison.declan at gmail.com
Wed Jul 18 15:41:45 CEST 2012

Hi Guys

I had posted this email to the libav-user email alias a few days back
but it never showed up at that alias, so I thought the ffmpeg-devel
alias might be best.

I have a problem creating MPEG2-TS files when using the ffmpeg API.  I
get the following error thrown by ffmpeg "H.264 bitstream malformed,no
startcode found, use the h264_mp4toannexb bitstream filter

On the CLI interface I can easily specify the bitstream filter using
the following : ffmpeg -i INFILE.mp4 -f mpegts -codec copy
-bsf:vh264_mp4toannexb OUTFILE.ts, and this works well for me on the
command line only.

However I cant find away to set the same bit stream filter using the
API as this option isnt a libav* option that can be passed in via the
API.  Is there a way of specify a bitstream filter from the API?

Im running  RHEL 6.2, Im using the latest version of ffmpeg.

libavutil      51. 42.100 / 51. 42.100
libavcodec     54. 10.100 / 54. 10.100
libavformat    54.  2.100 / 54.  2.100
libavdevice    53.  4.100 / 53.  4.100
libavfilter     2. 64.101 /  2. 64.101
libswscale      2.  1.100 /  2.  1.100
libswresample   0.  7.100 /  0.  7.100
libpostproc    52.  0.100 / 52.  0.100


More information about the ffmpeg-devel mailing list