[Libav-user] How do I specify a bitstream filter using the ffmpeg API

declan harrison harrison.declan at gmail.com
Mon Jul 16 18:29:06 CEST 2012


Hi Guys

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 (-bsf
h264_mp4toannexb)".

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

However I cant find away to set the "bsf:v" 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


Thanks


More information about the Libav-user mailing list