[FFmpeg-devel] add MJPEG support into RTP output
Luca Abeni
lucabe72
Fri Apr 9 09:43:50 CEST 2010
Nash Tsai wrote:
> Hi,
>
> On Fri, Apr 9, 2010 at 4:14 AM, Luca Abeni <lucabe72 at email.it> wrote:
>> On 08/04/10 16:29, Luca Abeni wrote:
>> [...]
>>> Unfortunately, it seems that vlc does not like this stream (it prints
>>> some errors, and does not display the video).
>>> So, I suppose that setting q, type and tspec to 0 maybe is not a good
>>> idea.
>>> Or maybe the JPEG bitstream has to be processed somehow before inserting
>>> it in the RTP payload (I did not read RFC 2435 yet).
>> Ok; after a quick look at the RFC, it seems to me that "type" must be set to
>> 0 for the YUV422 pixel format, and to 1 for YUV420. Moreover, the JPEG
>> header should be removed from the payload (it is reconstructed by the
>> depacketiser based on the payload header).
>
> Can you specify which part of RFC states JPEG header should be removed
> from the payload, although it is true that depacketiser is able to
> reconstruct the whole JPEG image from RTP header with current
> implementation?
Section 3.1.9 "JPEG Payload":
"The data following the RTP/JPEG headers is an entropy-coded segment
consisting of a single scan. The scan header is not present and is
inferred from the RTP/JPEG header. ... "
Anyway, I just skimmed the RFC: if someone is able to make the thing
work without removing the headers, I am ready to admit I might have
misunderstood the text... But right now the proposed patch does not
work (vlc is not able to receive the stream, and produces a lot of
errors). If I change "type" to 1, and I remove the JPEG headers, vlc
can display something (and stops to generate errors). The resulting
video is still corrupted (everything looks green), but this can be
due to the wrong value used for "Q".
Luca
More information about the ffmpeg-devel
mailing list