DEFENDORe / pseudotv

Create live TV channels from your own media. Access the streams using the simulated HDHomerun tuner or the generated M3U URl.
MIT License
234 stars 36 forks source link

FFMPEG Issue encoding & Connect time out || Not able to connect to Plex DVR #67

Open CyberPoison opened 4 years ago

CyberPoison commented 4 years ago
Stream ended. Channel: 1 (Channel 1),
FFMPEG ERROR {,
  code: 1,,
  cmd: '/usr/bin/ffmpeg -threads 4 -fflags +genpts+discardcorrupt+igndts -f concat -safe 0 -protocol_whitelist file,http,tcp,https,tcp,tls -i http://localhost:8000/playlist?channel=1 -map 0:v -map 0:a? -c copy -muxdelay 1 -muxpreload 1 -metadata service_provider="PseudoTV" -metadata service_name="Channel 1 -f mpegts pipe:1',
},
Stream starting. Channel: 1 (Channel 1),
Plex transcoder initiated,
Debug logging enabled,
Getting stream,
  deinterlace:     undefined,
  streamPath:      plex,
  forceDirectPlay: false,
Setting transcoding parameters,
(node:17) UnhandledPromiseRejectionWarning: Plex 'Get' request failed. URL: https://xxx-xxx-xxx-xx.78e7563cf4584b2bbf81ebf5d19ab72f.plex.direct:32400/livetv/dvrs,
(node:17) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2),
Error: connect ETIMEDOUT xxx--xxx.xxx.xx:32400,
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1141:16) {,
  errno: 'ETIMEDOUT',,
  code: 'ETIMEDOUT',,
  syscall: 'connect',,
  address: 'xxx--xxx.xxx.xx',,
  port: 32400,,
  config: {,
    url: 'https://xxx-xxx-xxx-xx.78e7563cf4584b2bbf81ebf5d19ab72f.plex.direct:32400/video/:/transcode/universal/decision?X-Plex-Platform=Generic&X-Plex-Client-Platform=Generic&X-Plex-Client-Profile-Name=Generic&X-Plex-Platform=Generic&X-Plex-Token=fMPYzXMy_w_h1YgmHqps&X-Plex-Client-Profile-Extra=add-transcode-target(type%3DvideoProfile%26protocol%3Dhttp%26container%3Dmpegts%26videoCodec%3Dh264%2Chevc%2Cmpeg2video%26audioCodec%3Dac3%26subtitleCodec%3D%26context%3Dstreaming%26replace%3Dtrue)%2Badd-transcode-target-settings(type%3DvideoProfile%26context%3Dstreaming%26protocol%3Dhttp%26CopyMatroskaAttachments%3Dtrue)%2Badd-transcode-target-settings(type%3DvideoProfile%26context%3Dstreaming%26protocol%3Dhttp%26BreakNonKeyframes%3Dtrue)%2Badd-limitation(scope%3DvideoCodec%26scopeName%3D*%26type%3DupperBound%26name%3Dvideo.width%26value%3D1920)%2Badd-limitation(scope%3DvideoCodec%26scopeName%3D*%26type%3DupperBound%26name%3Dvideo.height%26value%3D1080)%2Badd-transcode-target-audio-codec(type%3DvideoProfile%26context%3Dstreaming%26protocol%3Dhttp%26audioCodec%3Dac3)%2Badd-limitation(scope%3DvideoAudioCodec%26scopeName%3Dac3%26type%3DupperBound%26name%3Daudio.channels%26value%3D2)&protocol=http&Connection=keep-alive&hasMDE=1&path=/library/metadata/35664&mediaIndex=0&partIndex=0&fastSeek=1&directPlay=0&directStream=1&directStreamAudio=1&copyts=1&audioBoost=100&mediaBufferSize=1000&session=cb43d8e8-413a-4f2c-9080-03ad6f252c1a&offset=436.539&subtitles=none&subtitleSize=100&maxVideoBitrate=40000&videoQuality=100&videoResolution=1920x1080&lang=en',,
    method: 'get',,
    headers: { Accept: 'application/json', 'User-Agent': 'axios/0.19.2' },,
    transformRequest: [ [Function: transformRequest] ],,
    transformResponse: [ [Function: transformResponse] ],,
    timeout: 0,,
    adapter: [Function: httpAdapter],,
    xsrfCookieName: 'XSRF-TOKEN',,
    xsrfHeaderName: 'X-XSRF-TOKEN',,
    maxContentLength: -1,,
    validateStatus: [Function: validateStatus],,
    data: undefined,
  },,
  request: Writable {,
    _writableState: WritableState {,
      objectMode: false,,
      highWaterMark: 16384,,
      finalCalled: false,,
      needDrain: false,,
      ending: false,,
      ended: false,,
      finished: false,,
      destroyed: false,,
      decodeStrings: true,,
      defaultEncoding: 'utf8',,
      length: 0,,
      writing: false,,
      corked: 0,,
      sync: true,,
      bufferProcessing: false,,
      onwrite: [Function: bound onwrite],,
      writecb: null,,
      writelen: 0,,
      afterWriteTickInfo: null,,
      bufferedRequest: null,,
      lastBufferedRequest: null,,
      pendingcb: 0,,
      prefinished: false,,
      errorEmitted: false,,
      emitClose: true,,
      autoDestroy: false,,
      bufferedRequestCount: 0,,
      corkedRequestsFree: [Object],
    },,
    writable: true,,
    _events: [Object: null prototype] {,
      response: [Function: handleResponse],,
      error: [Function: handleRequestError],
    },,
    _eventsCount: 2,,
    _maxListeners: undefined,,
    _options: {,
      protocol: 'https:',,
      maxRedirects: 21,,
      maxBodyLength: 10485760,,
      path: '/video/:/transcode/universal/decision?X-Plex-Platform=Generic&X-Plex-Client-Platform=Generic&X-Plex-Client-Profile-Name=Generic&X-Plex-Platform=Generic&X-Plex-Token=fMPYzXMy_w_h1YgmHqps&X-Plex-Client-Profile-Extra=add-transcode-target(type%3DvideoProfile%26protocol%3Dhttp%26container%3Dmpegts%26videoCodec%3Dh264%2Chevc%2Cmpeg2video%26audioCodec%3Dac3%26subtitleCodec%3D%26context%3Dstreaming%26replace%3Dtrue)%2Badd-transcode-target-settings(type%3DvideoProfile%26context%3Dstreaming%26protocol%3Dhttp%26CopyMatroskaAttachments%3Dtrue)%2Badd-transcode-target-settings(type%3DvideoProfile%26context%3Dstreaming%26protocol%3Dhttp%26BreakNonKeyframes%3Dtrue)%2Badd-limitation(scope%3DvideoCodec%26scopeName%3D*%26type%3DupperBound%26name%3Dvideo.width%26value%3D1920)%2Badd-limitation(scope%3DvideoCodec%26scopeName%3D*%26type%3DupperBound%26name%3Dvideo.height%26value%3D1080)%2Badd-transcode-target-audio-codec(type%3DvideoProfile%26context%3Dstreaming%26protocol%3Dhttp%26audioCodec%3Dac3)%2Badd-limitation(scope%3DvideoAudioCodec%26scopeName%3Dac3%26type%3DupperBound%26name%3Daudio.channels%26value%3D2)&protocol=http&Connection=keep-alive&hasMDE=1&path=/library/metadata/35664&mediaIndex=0&partIndex=0&fastSeek=1&directPlay=0&directStream=1&directStreamAudio=1&copyts=1&audioBoost=100&mediaBufferSize=1000&session=cb43d8e8-413a-4f2c-9080-03ad6f252c1a&offset=436.539&subtitles=none&subtitleSize=100&maxVideoBitrate=40000&videoQuality=100&videoResolution=1920x1080&lang=en',,
      method: 'GET',,
      headers: [Object],,
      agent: undefined,,
      agents: [Object],,
      auth: undefined,,
      hostname: 'xxx-xxx-xxx-xx.78e7563cf4584b2bbf81ebf5d19ab72f.plex.direct',,
      port: '32400',,
      nativeProtocols: [Object],,
      pathname: '/video/:/transcode/universal/decision',,
      search: '?X-Plex-Platform=Generic&X-Plex-Client-Platform=Generic&X-Plex-Client-Profile-Name=Generic&X-Plex-Platform=Generic&X-Plex-Token=fMPYzXMy_w_h1YgmHqps&X-Plex-Client-Profile-Extra=add-transcode-target(type%3DvideoProfile%26protocol%3Dhttp%26container%3Dmpegts%26videoCodec%3Dh264%2Chevc%2Cmpeg2video%26audioCodec%3Dac3%26subtitleCodec%3D%26context%3Dstreaming%26replace%3Dtrue)%2Badd-transcode-target-settings(type%3DvideoProfile%26context%3Dstreaming%26protocol%3Dhttp%26CopyMatroskaAttachments%3Dtrue)%2Badd-transcode-target-settings(type%3DvideoProfile%26context%3Dstreaming%26protocol%3Dhttp%26BreakNonKeyframes%3Dtrue)%2Badd-limitation(scope%3DvideoCodec%26scopeName%3D*%26type%3DupperBound%26name%3Dvideo.width%26value%3D1920)%2Badd-limitation(scope%3DvideoCodec%26scopeName%3D*%26type%3DupperBound%26name%3Dvideo.height%26value%3D1080)%2Badd-transcode-target-audio-codec(type%3DvideoProfile%26context%3Dstreaming%26protocol%3Dhttp%26audioCodec%3Dac3)%2Badd-limitation(scope%3DvideoAudioCodec%26scopeName%3Dac3%26type%3DupperBound%26name%3Daudio.channels%26value%3D2)&protocol=http&Connection=keep-alive&hasMDE=1&path=/library/metadata/35664&mediaIndex=0&partIndex=0&fastSeek=1&directPlay=0&directStream=1&directStreamAudio=1&copyts=1&audioBoost=100&mediaBufferSize=1000&session=cb43d8e8-413a-4f2c-9080-03ad6f252c1a&offset=436.539&subtitles=none&subtitleSize=100&maxVideoBitrate=40000&videoQuality=100&videoResolution=1920x1080&lang=en',
    },,
    _redirectCount: 0,,
    _redirects: [],,
    _requestBodyLength: 0,,
    _requestBodyBuffers: [],,
    _onNativeResponse: [Function],,
    _currentRequest: ClientRequest {,
      _events: [Object: null prototype],,
      _eventsCount: 6,,
      _maxListeners: undefined,,
      outputData: [],,
      outputSize: 0,,
      writable: true,,
      _last: true,,
      chunkedEncoding: false,,
      shouldKeepAlive: false,,
      useChunkedEncodingByDefault: false,,
      sendDate: false,,
      _removedConnection: false,,
      _removedContLen: false,,
      _removedTE: false,,
      _contentLength: 0,,
      _hasBody: true,,
      _trailer: '',,
      finished: true,,
      _headerSent: true,,
      socket: [TLSSocket],,
      connection: [TLSSocket],,
      _header: 'GET /video/:/transcode/universal/decision?X-Plex-Platform=Generic&X-Plex-Client-Platform=Generic&X-Plex-Client-Profile-Name=Generic&X-Plex-Platform=Generic&X-Plex-Token=fMPYzXMy_w_h1YgmHqps&X-Plex-Client-Profile-Extra=add-transcode-target(type%3DvideoProfile%26protocol%3Dhttp%26container%3Dmpegts%26videoCodec%3Dh264%2Chevc%2Cmpeg2video%26audioCodec%3Dac3%26subtitleCodec%3D%26context%3Dstreaming%26replace%3Dtrue)%2Badd-transcode-target-settings(type%3DvideoProfile%26context%3Dstreaming%26protocol%3Dhttp%26CopyMatroskaAttachments%3Dtrue)%2Badd-transcode-target-settings(type%3DvideoProfile%26context%3Dstreaming%26protocol%3Dhttp%26BreakNonKeyframes%3Dtrue)%2Badd-limitation(scope%3DvideoCodec%26scopeName%3D*%26type%3DupperBound%26name%3Dvideo.width%26value%3D1920)%2Badd-limitation(scope%3DvideoCodec%26scopeName%3D*%26type%3DupperBound%26name%3Dvideo.height%26value%3D1080)%2Badd-transcode-target-audio-codec(type%3DvideoProfile%26context%3Dstreaming%26protocol%3Dhttp%26audioCodec%3Dac3)%2Badd-limitation(scope%3DvideoAudioCodec%26scopeName%3Dac3%26type%3DupperBound%26name%3Daudio.channels%26value%3D2)&protocol=http&Connection=keep-alive&hasMDE=1&path=/library/metadata/35664&mediaIndex=0&partIndex=0&fastSeek=1&directPlay=0&directStream=1&directStreamAudio=1&copyts=1&audioBoost=100&mediaBufferSize=1000&session=cb43d8e8-413a-4f2c-9080-03ad6f252c1a&offset=436.539&subtitles=none&subtitleSize=100&maxVideoBitrate=40000&videoQuality=100&videoResolution=1920x1080&lang=en HTTP/1.1\r\n' +,
        'Accept: application/json\r\n' +,
        'User-Agent: axios/0.19.2\r\n' +,
        'Host: xxx-xxx-xxx-xx.78e7563cf4584b2bbf81ebf5d19ab72f.plex.direct:32400\r\n' +,
        'Connection: close\r\n' +,
        '\r\n',,
      _onPendingData: [Function: noopPendingOutput],,
      agent: [Agent],,
      socketPath: undefined,,
      method: 'GET',,
      insecureHTTPParser: undefined,,
      path: '/video/:/transcode/universal/decision?X-Plex-Platform=Generic&X-Plex-Client-Platform=Generic&X-Plex-Client-Profile-Name=Generic&X-Plex-Platform=Generic&X-Plex-Token=fMPYzXMy_w_h1YgmHqps&X-Plex-Client-Profile-Extra=add-transcode-target(type%3DvideoProfile%26protocol%3Dhttp%26container%3Dmpegts%26videoCodec%3Dh264%2Chevc%2Cmpeg2video%26audioCodec%3Dac3%26subtitleCodec%3D%26context%3Dstreaming%26replace%3Dtrue)%2Badd-transcode-target-settings(type%3DvideoProfile%26context%3Dstreaming%26protocol%3Dhttp%26CopyMatroskaAttachments%3Dtrue)%2Badd-transcode-target-settings(type%3DvideoProfile%26context%3Dstreaming%26protocol%3Dhttp%26BreakNonKeyframes%3Dtrue)%2Badd-limitation(scope%3DvideoCodec%26scopeName%3D*%26type%3DupperBound%26name%3Dvideo.width%26value%3D1920)%2Badd-limitation(scope%3DvideoCodec%26scopeName%3D*%26type%3DupperBound%26name%3Dvideo.height%26value%3D1080)%2Badd-transcode-target-audio-codec(type%3DvideoProfile%26context%3Dstreaming%26protocol%3Dhttp%26audioCodec%3Dac3)%2Badd-limitation(scope%3DvideoAudioCodec%26scopeName%3Dac3%26type%3DupperBound%26name%3Daudio.channels%26value%3D2)&protocol=http&Connection=keep-alive&hasMDE=1&path=/library/metadata/35664&mediaIndex=0&partIndex=0&fastSeek=1&directPlay=0&directStream=1&directStreamAudio=1&copyts=1&audioBoost=100&mediaBufferSize=1000&session=cb43d8e8-413a-4f2c-9080-03ad6f252c1a&offset=436.539&subtitles=none&subtitleSize=100&maxVideoBitrate=40000&videoQuality=100&videoResolution=1920x1080&lang=en',,
      _ended: false,,
      res: null,,
      aborted: false,,
      timeoutCb: null,,
      upgradeOrConnect: false,,
      parser: null,,
      maxHeadersCount: null,,
      reusedSocket: false,,
      _redirectable: [Circular],,
      [Symbol(kCapture)]: false,,
      [Symbol(kNeedDrain)]: false,,
      [Symbol(corked)]: 0,,
      [Symbol(kOutHeaders)]: [Object: null prototype],
    },,
    _currentUrl: 'https://xxx-xxx-xxx-xx.78e7563cf4584b2bbf81ebf5d19ab72f.plex.direct:32400/video/:/transcode/universal/decision?X-Plex-Platform=Generic&X-Plex-Client-Platform=Generic&X-Plex-Client-Profile-Name=Generic&X-Plex-Platform=Generic&X-Plex-Token=fMPYzXMy_w_h1YgmHqps&X-Plex-Client-Profile-Extra=add-transcode-target(type%3DvideoProfile%26protocol%3Dhttp%26container%3Dmpegts%26videoCodec%3Dh264%2Chevc%2Cmpeg2video%26audioCodec%3Dac3%26subtitleCodec%3D%26context%3Dstreaming%26replace%3Dtrue)%2Badd-transcode-target-settings(type%3DvideoProfile%26context%3Dstreaming%26protocol%3Dhttp%26CopyMatroskaAttachments%3Dtrue)%2Badd-transcode-target-settings(type%3DvideoProfile%26context%3Dstreaming%26protocol%3Dhttp%26BreakNonKeyframes%3Dtrue)%2Badd-limitation(scope%3DvideoCodec%26scopeName%3D*%26type%3DupperBound%26name%3Dvideo.width%26value%3D1920)%2Badd-limitation(scope%3DvideoCodec%26scopeName%3D*%26type%3DupperBound%26name%3Dvideo.height%26value%3D1080)%2Badd-transcode-target-audio-codec(type%3DvideoProfile%26context%3Dstreaming%26protocol%3Dhttp%26audioCodec%3Dac3)%2Badd-limitation(scope%3DvideoAudioCodec%26scopeName%3Dac3%26type%3DupperBound%26name%3Daudio.channels%26value%3D2)&protocol=http&Connection=keep-alive&hasMDE=1&path=/library/metadata/35664&mediaIndex=0&partIndex=0&fastSeek=1&directPlay=0&directStream=1&directStreamAudio=1&copyts=1&audioBoost=100&mediaBufferSize=1000&session=cb43d8e8-413a-4f2c-9080-03ad6f252c1a&offset=436.539&subtitles=none&subtitleSize=100&maxVideoBitrate=40000&videoQuality=100&videoResolution=1920x1080&lang=en',,
    [Symbol(kCapture)]: false,
  },,
  response: undefined,,
  isAxiosError: true,,
  toJSON: [Function],
},
Error at decision:TypeError: Cannot read property 'MediaContainer' of undefined,
Current video stats:,
{},
Error at decision:TypeError: Cannot read property 'MediaContainer' of undefined,
Current video stats:,
{},
Decision: File can direct play,

Logs:. https://pastebin.com/QkurWjZE

Plex:. Docker (LinuxServer.IO) Latest Pseudo:. Docker :dev tag

ReenigneArcher commented 3 years ago

@CyberPoison were you able to solve this? I'm having a similar problem with psuedotv crashing whenever I try to start a stream. I think it may be the /:/ in the url which doesn't seem to exist and returns a 404 error.