[Live-devel] openRTSP questions....

Karl Denninger karl at denninger.net
Thu May 24 12:59:41 PDT 2018


I've got the source (latest rev from the archives) and have it built. 
It appears to run ok.

I'm trying to extract video from a webcam, and running into some
issues.  In order:

1. Using MP4 format ("-4" switch) works sort-of.  The camera is set to a
10fps frame rate due to network bandwidth considerations when streamed
live.  If I make an .mp4 I can play it with the Windows video player
(assuming I cleanly terminate it) BUT VLC fails to play it if I transfer
the file to my Android phone and if I attempt to feed it to ExoPlayer
(using their demo app) it complains with the logcat that it cannot find
a matching Extractor.  Also, on Windows, while the video displays
cleanly it runs at 1/3 speed (in other words the 10fps rate is not
honored, I instead get one "tick" of the real-time display every three
seconds.)  This format, however, isn't useful for what I need because
you must let the stream finish and the MP4 header get written on the
file before you can play it (that is, you can't stream it in any event.)

2. Attempting to extract just the video track ("-v") appears to work,
and a file command shows "test.h264: JVT NAL sequence, H.264 video @ L
50", which should be ok.  However, I cannot play that with *any* of the
tools in question, including VLC and feeding it to the ExoPlayer demo --
the latter complains once again that there is no valid extractor:

     Caused by:
com.google.android.exoplayer2.source.UnrecognizedInputFormatException:
None of the available extractors (MatroskaExtractor,
FragmentedMp4Extractor, Mp4Extractor, Mp3Extractor, AdtsExtractor,
Ac3Extractor, TsExtractor, FlvExtractor, OggExtractor, PsExtractor,
WavExtractor, AmrExtractor, FlacExtractor) could read the stream.
        at
com.google.android.exoplayer2.source.ExtractorMediaPeriod$ExtractorHolder.selectExtractor(ExtractorMediaPeriod.java:941)
        at
com.google.android.exoplayer2.source.ExtractorMediaPeriod$ExtractingLoadable.load(ExtractorMediaPeriod.java:863)
        at
com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:317)
        at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
        at java.lang.Thread.run(Thread.java:761)
05-24 14:29:13.010 16486-16486/com.google.android.

Of note there is now a branch of ExoPlayer (which I'm using in this
test) that can *directly* hit the same webcam over UDP on the same local
network via RTSP (it cannot, however, use TCP as a transport so it's
worthless over the Internet as a whole) and it displays just fine -- so
the H.264 codec in question has to be ok, or I couldn't view the stream
live.

The command I'm using to try to get the H.264 stream is

 openRTSP -v 'rtsp://192.168.4.212/cam/realmonitor?channel=1&subtype=0'
> vid.h264

Which, if my understanding of the docs is correct, should produce only
the video track in the native format, which in this case is set on the
camera as H.264.

The negotiation displayed by openRTSP is:

Received a complete DESCRIBE response:
RTSP/1.0 200 OK
CSeq: 4
x-Accept-Dynamic-Rate: 1
Content-Base: rtsp://192.168.4.212/cam/realmonitor?channel=1&subtype=0/
Cache-Control: must-revalidate
Content-Length: 506
Content-Type: application/sdp

v=0
o=- 2252171298 2252171298 IN IP4 0.0.0.0
s=Media Server
c=IN IP4 0.0.0.0
t=0 0
a=control:*
a=packetization-supported:DH
a=rtppayload-supported:DH
a=range:npt=now-
m=video 0 RTP/AVP 96
a=control:trackID=0
a=framerate:10.000000
a=rtpmap:96 H264/90000
a=fmtp:96
packetization-mode=1;profile-level-id=4D0032;sprop-parameter-sets=Z00AMppkASAFH/gLcBAQFAAAD6AAATiDoYAaGAAaGC7y40MANDAANDBd5cKAAA==,aO48gAA=
a=recvonly
m=audio 0 RTP/AVP 8
a=control:trackID=1
a=rtpmap:8 PCMA/16000
a=recvonly

Which looks ok.....

Any ideas as to what's going on and why the resulting output file is
considered invalid?

-- 
Karl Denninger
karl at denninger.net <mailto:karl at denninger.net>
/The Market Ticker/
/[S/MIME encrypted email preferred]/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20180524/e91e3980/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4897 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20180524/e91e3980/attachment.bin>


More information about the live-devel mailing list