declan harrison | 18 Jul 2012 15:41
Picon

How do I specify a bitstream filter using the ffmpeg API

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

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
(Continue reading)

Michael Niedermayer | 18 Jul 2012 16:14
Picon
Picon

Re: How do I specify a bitstream filter using the ffmpeg API

On Wed, Jul 18, 2012 at 02:41:45PM +0100, declan harrison wrote:
> 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
> (-bsfh264_mp4toannexb)".
> 
> 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?

see ffmpeg.c search for bitstream. I think its not documented outside
sadly. ...  that also means that improvments for the doxy in avcodec.h
as well as the wiki or others is very welcome!

[...]
--

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The real ebay dictionary, page 1
(Continue reading)


Gmane