koush / scrypted

Scrypted is a high performance video integration and automation platform
https://scrypted.app
Other
3.95k stars 238 forks source link

Google Nest FFmpeg Filtering and streamcopy cannot be used together. #1337

Closed ellisonpatterson closed 3 weeks ago

ellisonpatterson commented 5 months ago

Describe the bug FFmpeg default settings for transcoding fails to run since filters and streamcopy are being used at the same time. I have not added any custom FFmpeg arguments and am using no encoding/decoding arguments as the documentation recommends.

To Reproduce Steps to reproduce the behavior:

  1. Enable transcoding for any Nest camera and attempt to view the stream.

Expected behavior FFmpeg is able to successfully run and convert the stream.

Screenshots If applicable, add screenshots to help explain your problem.

Server (please complete the following information):

Hardware Model (please complete the following information):

Client (please complete the following information, if applicable):

Additional context Logs of the error:

[Front Door] Client Stream Profile {
  transcodeBaseline: false,
  sessionSupportsH264High: true,
  maximumCompatibilityMode: false,
  userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:122.0) Gecko/20100101 Firefox/122.0',
  capabilities: {
    audio: { codecs: [Array], headerExtensions: [Array] },
    video: { codecs: [Array], headerExtensions: [Array] }
  },
  screen: { devicePixelRatio: 1, width: 1920, height: 1080 }
}

[Front Door] video codec/container not matched, transcoding: undefined {"url":"rtsp://127.0.0.1:45443/xxx/28","urls":["rtsp://192.168.1.20:45443/xxx/28"],"container":"rtsp","inputArguments":["-analyzeduration","0","-probesize","500000","-reorder_queue_size","0","-rtsp_transport","tcp","-f","rtsp","-i","rtsp://127.0.0.1:45443/xxx/28"],"mediaStreamOptions":{"id":"default","name":"Cloud RTSP","container":"rtsp","video":{"codec":"h264","h264Info":{"fuab":false,"stapb":false,"mtap16":false,"mtap32":false,"sei":false,"reserved0":false,"reserved30":false,"reserved31":false},"width":1600,"height":1200},"audio":{"codec":"aac","sampleRate":48000},"source":"cloud","tool":"scrypted","userConfigurable":false,"refreshAt":1708449370227,"metadata":{"trackerId":"922609a80ad5d7d9"},"sdp":"v=0\r\no=- 325390295 325390295 IN IP4 127.0.0.1\r\ns=SDM\r\nc=IN IP4 0.0.0.0\r\nt=0 0\r\na=sdplang:en\r\na=range:npt=now-\r\na=control:*\r\nm=audio 0 RTP/AVP 96\r\na=rtpmap:96 mpeg4-generic/48000/2\r\na=fmtp:96 profile-level-id=1;mode=AAC-hbr;sizelength=13;indexlength=3;indexdeltalength=3;config=1190\r\na=control:trackID=1\r\nm=video 0 RTP/AVP 97\r\na=rtpmap:97 H264/90000\r\na=fmtp:97 packetization-mode=1;profile-level-id=4D0029;sprop-parameter-sets=Z00AKZpkAyAS/+AtwEBAUAAAPoAAB1MOhgC3QALci7y40MAW6ABbkXeXCg==,aO48gA==\r\na=cliprect:0,0,1200,1600\r\na=framesize:97 1600-1200\r\na=framerate:15.0\r\na=control:trackID=2","prebuffer":2000,"prebufferBytes":137764},"h264EncoderArguments":["-c:v","copy"],"destinationVideoBitrate":1000000}

[Front Door] -hide_banner -analyzeduration 0 -probesize 500000 -reorder_queue_size 0 -rtsp_transport tcp -f rtsp -i rtsp:[REDACTED] -b:v 1000000 -bufsize 2000000 -maxrate 1000000 -r 15 -filter_complex scale='min(1280,iw)':-2 -c:v copy -dn -sn -an -f rtp rtp://127.0.0.1:36855?pkt_size=1378 -acodec libopus -flags +global_header -ar 48000 -b:a 40k -bufsize 96k -ac 2 -application lowdelay -dn -sn -vn -f rtp rtp://127.0.0.1:55639? -sdp_file pipe:4

[Front Door] Cloud RTSP active rebroadcast clients: 1

[Front Door] Input #0, rtsp, from 'rtsp://127.0.0.1:45443/xxx/28':
  Metadata:
    title           : SDM
  Duration: N/A, start: 0.000000, bitrate: N/A
  Stream #0:0: Audio: aac (LC), 48000 Hz, stereo, fltp
  Stream #0:1: Video: h264 (Main), yuvj420p(pc, bt709, progressive), 1600x1200 [SAR 1:1 DAR 4:3], 15 fps, 15 tbr, 90k tbn, 30 tbc
Streamcopy requested for output stream 0:0, which is fed from a complex filtergraph. Filtering and streamcopy cannot be used together.

[Front Door] Cloud RTSP active rebroadcast clients: 0

[Front Door] ffmpeg exited

[Front Door] signalingState closed

[Front Door] connectionState closed

[Front Door] iceConnectionState closed
koush commented 3 weeks ago

did you try chrome

koush commented 3 weeks ago

rather than using transcode extension, can now use the output transcode arguments. that is preferable.

ellisonpatterson commented 3 weeks ago

Thank you!

ellisonpatterson commented 3 weeks ago

did you try chrome

Also no, I use firefox. The Indoor Camera Gen 2 simply does not work on firefox.

Works fine in homekit.

Here is the error I get in the JS console:

Uncaught (in promise) InvalidAccessError: Answer tried to set recv when offer did not set send
api/@scrypted/core:engine.io
@scrypted/google-device-access:host
host:@scrypted/google-device-access
@scrypted/webrtc:host
host:@scrypted/webrtc
engine.io-client:api
    setRemoteDescription https://192.168.1.20:10443/endpoint/@scrypted/core/public/js/app.d6a243fd.js:1
    handleMessageInternal https://192.168.1.20:10443/endpoint/@scrypted/core/public/js/app.d6a243fd.js:1
    handleMessage https://192.168.1.20:10443/endpoint/@scrypted/core/public/js/app.d6a243fd.js:1
    p https://192.168.1.20:10443/endpoint/@scrypted/core/public/js/app.d6a243fd.js:1
    O https://192.168.1.20:10443/endpoint/@scrypted/core/public/js/app.d6a243fd.js:1
    emit https://192.168.1.20:10443/endpoint/@scrypted/core/public/js/chunk-vendors.8d03973f.js:394
    onPacket https://192.168.1.20:10443/endpoint/@scrypted/core/public/js/chunk-vendors.8d03973f.js:48
    emit https://192.168.1.20:10443/endpoint/@scrypted/core/public/js/chunk-vendors.8d03973f.js:394
    onPacket https://192.168.1.20:10443/endpoint/@scrypted/core/public/js/chunk-vendors.8d03973f.js:402
    onData https://192.168.1.20:10443/endpoint/@scrypted/core/public/js/chunk-vendors.8d03973f.js:402
    onmessage https://192.168.1.20:10443/endpoint/@scrypted/core/public/js/chunk-vendors.8d03973f.js:394
    addEventListeners https://192.168.1.20:10443/endpoint/@scrypted/core/public/js/chunk-vendors.8d03973f.js:394
    doOpen https://192.168.1.20:10443/endpoint/@scrypted/core/public/js/chunk-vendors.8d03973f.js:394
    open https://192.168.1.20:10443/endpoint/@scrypted/core/public/js/chunk-vendors.8d03973f.js:402
    probe https://192.168.1.20:10443/endpoint/@scrypted/core/public/js/chunk-vendors.8d03973f.js:48
    onOpen https://192.168.1.20:10443/endpoint/@scrypted/core/public/js/chunk-vendors.8d03973f.js:48
    onHandshake https://192.168.1.20:10443/endpoint/@scrypted/core/public/js/chunk-vendors.8d03973f.js:48
    onPacket https://192.168.1.20:10443/endpoint/@scrypted/core/public/js/chunk-vendors.8d03973f.js:48
    emit https://192.168.1.20:10443/endpoint/@scrypted/core/public/js/chunk-vendors.8d03973f.js:394
    onPacket https://192.168.1.20:10443/endpoint/@scrypted/core/public/js/chunk-vendors.8d03973f.js:402
    t https://192.168.1.20:10443/endpoint/@scrypted/core/public/js/chunk-vendors.8d03973f.js:48
    onData https://192.168.1.20:10443/endpoint/@scrypted/core/public/js/chunk-vendors.8d03973f.js:48
    emit https://192.168.1.20:10443/endpoint/@scrypted/core/public/js/chunk-vendors.8d03973f.js:394
    onLoad https://192.168.1.20:10443/endpoint/@scrypted/core/public/js/chunk-vendors.8d03973f.js:48
    onreadystatechange https://192.168.1.20:10443/endpoint/@scrypted/core/public/js/chunk-vendors.8d03973f.js:48
    create https://192.168.1.20:10443/endpoint/@scrypted/core/public/js/chunk-vendors.8d03973f.js:48
    m https://192.168.1.20:10443/endpoint/@scrypted/core/public/js/chunk-vendors.8d03973f.js:48
    request https://192.168.1.20:10443/endpoint/@scrypted/core/public/js/chunk-vendors.8d03973f.js:48
    doPoll https://192.168.1.20:10443/endpoint/@scrypted/core/public/js/chunk-vendors.8d03973f.js:48
    poll https://192.168.1.20:10443/endpoint/@scrypted/core/public/js/chunk-vendors.8d03973f.js:48
    doOpen https://192.168.1.20:10443/endpoint/@scrypted/core/public/js/chunk-vendors.8d03973f.js:48
    open https://192.168.1.20:10443/endpoint/@scrypted/core/public/js/chunk-vendors.8d03973f.js:402
    open https://192.168.1.20:10443/endpoint/@scrypted/core/public/js/chunk-vendors.8d03973f.js:48
    E https://192.168.1.20:10443/endpoint/@scrypted/core/public/js/chunk-vendors.8d03973f.js:48
    O https://192.168.1.20:10443/endpoint/@scrypted/core/public/js/app.d6a243fd.js:1
    O https://192.168.1.20:10443/endpoint/@scrypted/core/public/js/app.d6a243fd.js:1
    $connectScrypted https://192.168.1.20:10443/endpoint/@scrypted/core/public/js/app.d6a243fd.js:1
    cd49 https://192.168.1.20:10443/endpoint/@scrypted/core/public/js/app.d6a243fd.js:1
    use https://192.168.1.20:10443/endpoint/@scrypted/core/public/js/chunk-vendors.8d03973f.js:402
    cd49 https://192.168.1.20:10443/endpoint/@scrypted/core/public/js/app.d6a243fd.js:1
    o https://192.168.1.20:10443/endpoint/@scrypted/core/public/js/app.d6a243fd.js:1
    0 https://192.168.1.20:10443/endpoint/@scrypted/core/public/js/app.d6a243fd.js:1
    o https://192.168.1.20:10443/endpoint/@scrypted/core/public/js/app.d6a243fd.js:1
    n https://192.168.1.20:10443/endpoint/@scrypted/core/public/js/app.d6a243fd.js:1
    <anonymous> https://192.168.1.20:10443/endpoint/@scrypted/core/public/js/app.d6a243fd.js:1
    <anonymous> https://192.168.1.20:10443/endpoint/@scrypted/core/public/js/app.d6a243fd.js:1
Caused by: undefined