kyriesent / node-rtsp-stream

Stream any RTSP stream and output to websocket for consumption by jsmpeg (https://github.com/phoboslab/jsmpeg). HTML5 streaming video! Requires ffmpeg.
MIT License
451 stars 166 forks source link

could it support 4k video ? #23

Closed codezealot closed 5 years ago

codezealot commented 5 years ago

my video is 4096x2160 , cannot play it:

===================================== Input #0, rtsp, from 'rtsp://xxxxxxx/.trunk.ts': Metadata: title : MPEG Transport Stream, streamed by the LIVE555 Media Server comment : long.trunk.ts Duration: N/A, start: 1.400000, bitrate: N/A Program 1 Metadata: service_name : Service01 service_provider: FFmpeg Stream #0:0: Video: mpeg4 (Simple Profile) ([16][0][0][0] / 0x0010), yuv420p, 4096x2160 [SAR 1:1 DAR 256:135], 15 fps, 15 tbr, 90k tbn, 15 tbc Stream mapping: Stream #0:0 -> #0:0 (mpeg4 (native) -> mpeg1video (native)) Press [q] to stop, [?] for help [mpeg1video @ 0x1129580] MPEG-1 does not support resolutions above 4095x4095 Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height Conversion failed!

kyriesent commented 5 years ago

@codezealot Unfortunately this is going to be a limitation of the MPEG-1 format. If you can resize the output format using ffmpeg flags in the options, you might be able to make this work. MPEG-1 is an old and not especially efficient format, but it's what jsmpeg uses, so that's why it's necessary.

kyriesent commented 5 years ago

Closing issue for now.