[FFmpeg-devel] DVR MPEG4 variant (AS-3024)
ivo.andonov at gmail.com
Fri Feb 3 17:54:14 EET 2017
2017-02-03 16:59 GMT+02:00 Carl Eugen Hoyos <ceffmpeg at gmail.com>:
> 2017-02-03 15:14 GMT+01:00 Ivo Andonov <ivo.andonov at gmail.com>:
> > 2017-02-03 15:58 GMT+02:00 Carl Eugen Hoyos <ceffmpeg at gmail.com>:
> >> > I've got some old Pinetron DVRs that are supposed to produce a MPEG4
> >> > bitstream. Indeed they are but no non-Pinetron software can decode it.
> >> Please provide a sample!
> >> > I do now know what is the best approach for registering this as a new
> >> > decoder
> >> It should be possible to identify the codec while reading the bitstream.
> The encoder sets no user data, so identification is not as simple as
> hoped: How do subsequent frames start? Do you know what the
> first bytes mean?
Yes, no user data is set and as such automatic identification is not
possible. The raw stream coming from the DVR is prefixed by a propriatory
frame header (that I filter) which is not MPEG stream compliant and is
meant for the viewer/recorder (timestamp, keyframe flag, frame data size
So far I'm attempting to implement the decoding by explicitly specifing to
ffmpeg the video codec to use (-vcodec xvid_alogics). xvid_alogics AVCodec
is initialized the same way the mpeg4 one, just a different id. In the
decode_init I change the avctx->codec_id to AV_CODEC_ID_MPEG4 and set a
flag in workaround_bugs that I later use in the initially submitted block
However it seems somewhere else in the code avctx->codec_id reverts back to
avctx->codec->id and as a result I end up with a "Bad picture start code"
due to ff_h263_decode_frame calling ff_h263_decode_picture_header instead
I forgot to mention that my changes are against ffmpeg 2.6. (libavcodec
> > Not sure if attachments are fine here... Attempting one.
> I can confirm that your suggested change (above "pred = FASTDIV")
> works as expected.
> Carl Eugen
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
More information about the ffmpeg-devel