[Live-devel] Record a H265 stream from IP camera to file

Nicolas Julien nicolas.julien at cdvi.com
Fri Sep 11 04:57:06 PDT 2020


Thanks a lot for the answer.
I am not very familiar with the subject and your answer helps me a lot.
However, I am wondering why it works well with live feed (rtsp://192.168.1.64:554/Streaming/Channels/102?transportmode=mcast&profile=Profile_1  -> mp4 file is ok) when it does not work with replay when both streams are from the same camera.
Is there a difference between live stream and replay stream (recorded on micro SD) ?

________________________________________
De : live-devel [live-devel-bounces at us.live555.com] de la part de Ross Finlayson [finlayson at live555.com]
Date d'envoi : vendredi 11 septembre 2020 13:41
À : LIVE555 Streaming Media - development & use
Objet : Re: [Live-devel] Record a H265 stream from IP camera to file

> On Sep 11, 2020, at 8:52 PM, Nicolas Julien <nicolas.julien at cdvi.com> wrote:
>
> Any idea why this is not working?

The error message says why:

> Warning: we don't implement a QuickTime Video Media Data Type for the "H265" track, so we'll insert a dummy "????" Media Data Atom instead.  A separate, codec-specific editing pass will be needed before this track can be played.

Specifically, our implementation of outputting “.mp4”-format files does not yet handle writing “.mp4”-format files that contain H.265 video.  (See the “if” statement in “liveMedia/QuickTimeFileSink.cpp”, starting at line 644.)

One way you can overcome this problem is to instead record a raw H.265 video file, *not* a “.mp4”-format file.  I.e. run:
        openrtsp -b 200000 -u admin admin -v -d 10 -w 2560 -h 1440 -f 15 rtsp://192.168.1.64:554/Streaming/Tracks/101?transportmode=unicast&replaymode=onvifreplay
i.e., without the “-4” option, and without stdout redirection.

This will give you a video file, named something like “VIDEO-1-H265”, which you can rename as “test.h264” (note, with a “.h264” filename suffix, even though the data is H.265).  Then use “ffmpeg” to convert this to a “.mp4”-format file, e.g.
        ffmpeg -i test.h264 -c copy test.mp4


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



More information about the live-devel mailing list