[Live-devel] Fwd: includeStartCodeInOutput parameter for H264VideoStreamDiscreteFramer::createNew()

Chris Paucar chris.paucar at roc-connect.com
Tue May 14 08:07:53 PDT 2019


I've managed to come back and test the new optional parameter through a
modified version of the testH264VideoToTransportStream.cpp however there
seem to be issues with the final .TS file. I see the first two packets
consist of the PAT and PMT, and I verified that I have the SPS and PPS NAL
units before any H.264 NAL units, as well as all NAL units have the
0x00000001 start code prefixed to them. I have a working copy of a
QuickTimeFileSink output file that I used with the original unmodified
version of testH264VideoToTransportStream.cpp  and that .TS file doesn't
work either. Have there been any recent changes to the TS part of the
LIVE555? Here is the relevant section of my code.

  // Make stream replicas for the MPEG2-TS and QuickTime file sinks
    replicator = StreamReplicator::createNew(envir(),
subsession.readSource(),
            false);
    streamQT = replicator->createStreamReplica();
    streamTS = replicator->createStreamReplica();

    // Replace video stream in the MediaSession object with a replica for
the QuickTime buffer and file sinks
    subsession.addFilter(static_cast<FramedFilter*>(streamQT));

    // Create a 'framer' filter for this RTP source, to generate
presentation times for each NAL unit:
    framer = H264VideoStreamDiscreteFramer::createNew(envir(), streamTS,
true);

    // Then create a filter that packs the H.264 video data into a
Transport Stream:
    MPEG2TransportStreamFromESSource* tsFrames =
            MPEG2TransportStreamFromESSource::createNew(envir());
    tsFrames->addNewVideoSource(framer, 5/*mpegVersion: H.264*/);
    MediaSink* outputSink = FileSink::createNew(envir(), "out.ts");
    outputSink->startPlaying(*tsFrames, nullptr,  nullptr);

Thanks,
Chris

On Wed, Mar 6, 2019 at 3:35 AM Ross Finlayson <finlayson at live555.com> wrote:

>
>
> > On Mar 2, 2019, at 10:29 AM, Chris Paucar <chris.paucar at roc-connect.com>
> wrote:
> >
> > Hi Ross,
> >
> > http://lists.live555.com/pipermail/live-devel/2014-August/018581.html
> >
> > You mentioned in the above link about
> H264VideoStreamDiscreteFramer::createNew() getting the
> includeStartCodeInOutput parameter that H264VideoStreamFramer::createNew()
> currently has.
>
> Oh wow - I had promised to do this way back in 2014, but (somehow) forgot
> all about it.
>
> I’ve now installed a new version (2019.03.06) of the code that adds an
> (optional) “includeStartCodeInOutput” to “H264VideoStreamDiscreteFramer”
> and “H265VideoStreamDiscreteFramer”.  (I haven’t tested this, but it should
> work OK.  If not, let us know ASAP.)
>
>
> Ross Finlayson
> Live Networks, Inc.
> http://www.live555.com/
>
>
> _______________________________________________
> live-devel mailing list
> live-devel at lists.live555.com
> http://lists.live555.com/mailman/listinfo/live-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20190514/5adc8d7f/attachment.htm>


More information about the live-devel mailing list