vexorian / dizquetv

Create live TV channels from your own media. Access the streams using the simulated HDHomerun tuner or the generated M3U URl.
zlib License
1.45k stars 93 forks source link

FFMPEG Exited with code 4294967274 #472

Open theasdfguy555 opened 7 months ago

theasdfguy555 commented 7 months ago

Hey, so I was having a lot of issues with getting the Docker version of DizqueTV to recognize it's own FFMPEG binary (kept exiting with code 1), so I decided to run it natively on Windows so I could know exactly where FFMPEG.exe was.

All seemed well and good until FFMPEG exited with 4294967274. This is a dump of the entire log. While the only thing I think is relevant is the exit code, I could be mistaken. I've tried the most recent builds of both the GyanDev and BtbN builds of FFMPEG. I keep looking for something I might've missed. For some reason, it also thinks Direct Play isn't available despite being run on the very same system as my server.

         \
   dizqueTV 1.5.3
.------------.
|:::///### o |
|:::///###   |
':::///### o |
'------------'

Successfully connected to : .dizquetv
DB Version correct: 803
HTTP server running on port: http://*:8000
Channel : 1 is not playing...
Program Play Time Cache loaded in 37 milliseconds.
Push event: Started building tv-guide at = Mon Feb 26 2024 00:48:10 GMT-0800 (Pacific Standard Time)
Internal TV Guide data refreshed at 2/26/2024, 12:48:10 AM
XMLTV Updated at  2/26/2024, 12:48:10 AM
Push event: XMLTV updated at server time Mon Feb 26 2024 00:48:10 GMT-0800 (Pacific Standard Time)
Push event: Server Started
Open event channel.
Push event: Plex configuration updated.

Stream starting. Channel: 1 (Ghibli)
/stream audioOnly=false
Decision Latency: (1)ms
=========================================================
! Start playback
! Channel: Ghibli (1)
! Title: Loading Screen
! From : 0 to: 420
=========================================================
About to play loading stream
Channel is being played: 1

Video and Audio are being transcoded by ffmpeg
Player Latency: (8)ms
Stream FFMPEG exited normally.
Played video for: 644 ms
Stream FFMPEG RECEIVED kill() command
Stream FFMPEG this.ffmpeg.kill()
Played video for: 650 ms
Client Closed
/stream audioOnly=false
Decision Latency: (19)ms
=========================================================
! Start playback
! Channel: Ghibli (1)
! Title: Nausicaä of the Valley of the Wind
! From : 2961163 to: 7022022
=========================================================
About to play plex stream
Plex transcoder initiated
Debug logging enabled
Getting stream
  deinterlace:     true
  streamPath:      plex
Try to detect audio only:
Setting transcoding parameters
Received transcode decision:
{
  MediaContainer: {
    size: 1,
    allowSync: '1',
    directPlayDecisionCode: 3000,
    directPlayDecisionText: 'App cannot direct play this item. Direct play is disabled.',
    generalDecisionCode: 1001,
    generalDecisionText: 'Direct play not available; Conversion OK.',
    identifier: 'com.plexapp.plugins.library',
    librarySectionID: '1',
    librarySectionTitle: 'Movies',
    librarySectionUUID: 'ad0b0a9f-1aeb-4a91-9398-491328686c38',
    mediaTagPrefix: '/system/bundle/media/flags/',
    mediaTagVersion: '1707852334',
    resourceSession: 'b4dbbfe8d8974a02-org-dizquetv-win32-0',
    transcodeDecisionCode: 1001,
    transcodeDecisionText: 'Direct play not available; Conversion OK.',
    Metadata: [ [Object] ]
  }
}
Current video stats:
{
  duration: 7022022,
  anamorphic: false,
  pixelP: 1,
  pixelQ: 1,
  videoCodec: 'h264',
  videoWidth: 1920,
  videoHeight: 1080,
  videoFramerate: 24,
  videoDecision: 'copy',
  videoScanType: 'progressive',
  audioChannels: 2,
  audioCodec: 'ac3',
  audioDecision: 'copy'
}
Current video stats:
{
  duration: 7022022,
  anamorphic: false,
  pixelP: 1,
  pixelQ: 1,
  videoCodec: 'h264',
  videoWidth: 1920,
  videoHeight: 1080,
  videoFramerate: 24,
  videoDecision: 'copy',
  videoScanType: 'progressive',
  audioChannels: 2,
  audioCodec: 'ac3',
  audioDecision: 'copy'
}
Current video stats:
{
  duration: 7022022,
  anamorphic: false,
  pixelP: 1,
  pixelQ: 1,
  videoCodec: 'h264',
  videoWidth: 1920,
  videoHeight: 1080,
  videoFramerate: 24,
  videoDecision: 'copy',
  videoScanType: 'progressive',
  audioChannels: 2,
  audioCodec: 'ac3',
  audioDecision: 'copy'
}
Direct play forced or native paths enabled
Received transcode decision:
{
  MediaContainer: {
    size: 1,
    allowSync: '1',
    identifier: 'com.plexapp.plugins.library',
    librarySectionID: '1',
    librarySectionTitle: 'Movies',
    librarySectionUUID: 'ad0b0a9f-1aeb-4a91-9398-491328686c38',
    mdeDecisionCode: 1000,
    mdeDecisionText: 'Direct play OK.',
    mediaTagPrefix: '/system/bundle/media/flags/',
    mediaTagVersion: '1707852334',
    resourceSession: 'b4dbbfe8d8974a02-org-dizquetv-win32-0',
    Metadata: [ [Object] ]
  }
}
mde decision code 1000, so it's all right?
Current video stats:
{
  duration: 7022022,
  anamorphic: false,
  pixelP: 1,
  pixelQ: 1,
  videoCodec: 'h264',
  videoWidth: 1920,
  videoHeight: 1080,
  videoFramerate: 24,
  videoDecision: 'copy',
  videoScanType: 'progressive',
  audioChannels: 2,
  audioCodec: 'ac3',
  audioDecision: 'copy'
}
{
  MediaContainer: {
    size: 1,
    allowSync: true,
    identifier: 'com.plexapp.plugins.library',
    librarySectionID: 1,
    librarySectionTitle: 'Movies',
    librarySectionUUID: 'ad0b0a9f-1aeb-4a91-9398-491328686c38',
    mediaTagPrefix: '/system/bundle/media/flags/',
    mediaTagVersion: 1707852334,
    Metadata: [ [Object] ]
  }
}
Found audio index: 2
{
  directPlay: true,
  streamUrl: 'https://10-0-0-253.1929c60ce7e944bfa195245b4dc6bd0d.plex.direct:32400/library/parts/10110/1588897271/file.mkv?X-Plex-Token=pizzUs2HYp4KqMXq7CpL',
  streamStats: {
    duration: 7022022,
    anamorphic: false,
    pixelP: 1,
    pixelQ: 1,
    videoCodec: 'h264',
    videoWidth: 1920,
    videoHeight: 1080,
    videoFramerate: 24,
    videoDecision: 'copy',
    videoScanType: 'progressive',
    audioChannels: 2,
    audioCodec: 'ac3',
    audioDecision: 'copy',
    audioIndex: 2
  }
}

Video and Audio are being transcoded by ffmpeg
Player Latency: (179)ms
Stream FFMPEG exited with code 4294967274.
Replacing failed stream with error stream

Video and Audio are being transcoded by ffmpeg

Stream ended. Channel: 1 (Ghibli)
Concat FFMPEG RECEIVED kill() command
Concat FFMPEG this.ffmpeg.kill()
Played video for: 13546 ms
Client Closed
Stream FFMPEG RECEIVED kill() command
Stream FFMPEG this.ffmpeg.kill()
Concat FFMPEG exited due to signal: SIGKILL as expected.
Register that channel is no longer being played: 1
Channel : 1 is not playing...
Remove event channel.
timelf123 commented 5 months ago

turn on ffmpeg logging to see exactly what is happening.

it is hard to find (or build) an ffmpeg binary for windows that doesn't fail. in my case it was something related to font loading for text rendering overlay not liking paths that contained : like C:\whatever.ttf

My system has 32 copies of ffmpeg on it (lol) from various software and many of them didn't work. I even compiled a build myself but must have missed something, because it also failed. The version that worked for me was from an app called stemroller. I have an old version, 2.0.1

For now, I am running WSL Debian and it just works with the apt version of ffmpeg

EDIT: looks like stemroller installs from https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-essentials.zip

Good luck

Keysersose12 commented 2 months ago

Did you find any solution for this?, have same error myself.