pull.bend fails
raw source on the hub · import 0xd6fc55bf65b187fec4175f80d08c165a/pull.bend as Pull
Record a camera or a stream into a file.
bend pull.bend -o pull ./pull rtsp://user:pass@camera.example:554/stream out.ts 10 ./pull rtmp://192.168.0.20/live/cam out.flv 10
The file's name picks the form: .ts is MPEG-TS, with the audio and each frame's time; .flv (RTMP only) is the stream's tags as they come; anything else is the raw video (.h264, .h265). The last argument is how many seconds to record (10 when left out).
It is also the example of the library: open a session, take frames until the time is up, close it. It runs as a native binary only (the sockets are in net.c); rtsps:// and rtmps:// are the same under TLS, and STREAM_CAFILE names a PEM file to trust instead of the system's.
11 imports
import Base import ./bytes.bend as B import ./conn.bend as N import ./opts.bend as E import ./frame.bend as F import ./rec.bend as W import ./rtsp.bend as S import ./rtsp_core.bend as C import ./rtmp.bend as M import ./rtmp_core.bend as K import ./flv.bend as V
The reader could not load this file (at 0xd6fc55bf65b187fec4175f80d08c165a/rtmp_core.bend:367). What bend.ts says:
Error:
- expected : a fresh constructor name (duplicate declaration: Wait)
- observed : 'Wait'
Location:
366 | type Ev is Data:
367>| Wait{}
| ^^^^
368 | Skip{st: Dec, rest: List<&2, U32>}