[Live-devel] Question about streaming a H.264 video file via RTP

Stas Desyatnlkov stas at tech-mer.com
Tue Sep 22 01:58:22 PDT 2009


Hi,
I'm having the same problem (trying to stream NAL packets in TS). 
So, it looks like there is no way to calculate the timestamps for the MPEG TS once the AVC NALs are saved into a file. Its probably possible to read SEI, SPS NALs and get the idea of the approximate bitrate of the AVC stream and thus set the frame time. This might not work with variable bitrate though.

-----Original Message-----
From: live-devel-bounces at ns.live555.com [mailto:live-devel-bounces at ns.live555.com] On Behalf Of Jeremy Noring
Sent: Thursday, September 17, 2009 7:44 PM
To: LIVE555 Streaming Media - development & use
Subject: Re: [Live-devel] Question about streaming a H.264 video file via RTP

On Thu, Sep 17, 2009 at 12:13 AM, 12091637 <12091637 at qq.com> wrote:
> Dear all,
> I am working with live555 library for H.264 video file streaming via RTP.
> When I creat "ByteStreamFileSource" instance to stream *.h264 video file,
> how can I set
> "PlayTimePerFrame" and "preferredFrameSize" value?How to get the
> "preferredFrameSize" and
> "playTimePerFrame" parameters base on existing *.h264 file? How to calculate
> them from the information of *.h264 file.
> If I set the two parameters to zero, my stream will be incompatible with
> existing, standards-compliant clients (e.g., VLC,MPlayer).
> Sometimes VLC will crash when play my stream(
> rtsp://192.168.10.62/test.h264)


To get the preferredFrameSize value, you'll have to parse the h264
bytestream; read the H.264 standard to figure out how to do this
(you'll likely need to read the standard to get your streaming working
anyway).

You cannot get "playTimePerFrame" from a ".h264" file because raw h264
byte streams contain no timing information (H.264 encoders themselves
have no notion of time, only successive frames).
_______________________________________________
live-devel mailing list
live-devel at lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel


More information about the live-devel mailing list