Very much loving ErsatzTV, but am unfortunately running into this for a decent chunk of files as well. Seems like it may be related to the negative value of some Index fields for different streams in a file?
I'm on the latest docker tag for what it's worth.
File Info:
{
"Id": 1997,
"Kind": "JellyfinMovie",
"LibraryKind": "JellyfinLibrary",
"ServerName": "linserv",
"LibraryName": "Movies",
"State": "Normal",
"Duration": "02:05:51.0071296",
"SampleAspectRatio": "1:1",
"DisplayAspectRatio": "2.40:1",
"RFrameRate": "23.97603",
"VideoScanKind": "Progressive",
"Width": 1920,
"Height": 800,
"Streams": [
{
"Index": -6,
"Kind": "Video",
"Codec": "hevc",
"Profile": "main 10",
"Default": true,
"PixelFormat": "yuv420p10le",
"ColorRange": "",
"ColorSpace": "",
"ColorTransfer": "",
"ColorPrimaries": ""
},
{
"Index": -5,
"Kind": "Audio",
"Title": "",
"Codec": "aac",
"Profile": "he-aac",
"Language": "eng",
"Channels": 6
},
{
"Index": -4,
"Kind": "Subtitle",
"Codec": "subrip",
"Language": "eng",
"Default": true,
"IsExtracted": false
},
{
"Index": -3,
"Kind": "Subtitle",
"Codec": "subrip",
"Language": "eng",
"IsExtracted": false
},
{
"Index": 100004,
"Kind": "ExternalSubtitle",
"Codec": "srt",
"Language": "spa"
},
{
"Index": 100005,
"Kind": "ExternalSubtitle",
"Codec": "srt",
"Language": "ita"
}
],
"Chapters": [
{
"Title": "Chapter 01",
"StartTime": "00:00:00",
"EndTime": "00:09:08.0890000"
},
{
"Title": "Chapter 02",
"StartTime": "00:09:08.0890000",
"EndTime": "00:17:30.5080000"
},
{
"Title": "Chapter 03",
"StartTime": "00:17:30.5080000",
"EndTime": "00:22:03.9060000"
},
{
"Title": "Chapter 04",
"StartTime": "00:22:03.9060000",
"EndTime": "00:30:27.4090000"
},
{
"Title": "Chapter 05",
"StartTime": "00:30:27.4090000",
"EndTime": "00:39:22.4020000"
},
{
"Title": "Chapter 06",
"StartTime": "00:39:22.4020000",
"EndTime": "00:48:15.2260000"
},
{
"Title": "Chapter 07",
"StartTime": "00:48:15.2260000",
"EndTime": "00:53:39.5500000"
},
{
"Title": "Chapter 08",
"StartTime": "00:53:39.5500000",
"EndTime": "01:00:09.3560000"
},
{
"Title": "Chapter 09",
"StartTime": "01:00:09.3560000",
"EndTime": "01:04:54.0570000"
},
{
"Title": "Chapter 10",
"StartTime": "01:04:54.0570000",
"EndTime": "01:10:15.0440000"
},
{
"Title": "Chapter 11",
"StartTime": "01:10:15.0440000",
"EndTime": "01:16:16.2380000"
},
{
"Title": "Chapter 12",
"StartTime": "01:16:16.2380000",
"EndTime": "01:20:26.7800000"
},
{
"Title": "Chapter 13",
"StartTime": "01:20:26.7800000",
"EndTime": "01:26:08.8300000"
},
{
"Title": "Chapter 14",
"StartTime": "01:26:08.8300000",
"EndTime": "01:32:42.6820000"
},
{
"Title": "Chapter 15",
"StartTime": "01:32:42.6820000",
"EndTime": "01:39:39.4740000"
},
{
"Title": "Chapter 16",
"StartTime": "01:39:39.4740000",
"EndTime": "01:45:14.2250000"
},
{
"Title": "Chapter 17",
"StartTime": "01:45:14.2250000",
"EndTime": "01:49:59.1760000"
},
{
"Title": "Chapter 18",
"StartTime": "01:49:59.1760000",
"EndTime": "01:54:50.2170000"
},
{
"Title": "Chapter 19",
"StartTime": "01:54:50.2170000",
"EndTime": "01:58:43.4910000"
},
{
"Title": "Chapter 20",
"StartTime": "01:58:43.4910000",
"EndTime": "02:05:51.0071296"
}
]
}
Logs:
9/5/2024 11:43:56 PM -05:00 Debug Session is already active; returning multi-variant playlist for channel 1
9/5/2024 11:43:56 PM -05:00 Debug Maybe starting ffmpeg session for channel 1, mode segmenter
9/5/2024 11:43:28 PM -05:00 Information Terminating HLS session for channel 2
9/5/2024 11:42:34 PM -05:00 Debug Session started; returning multi-variant playlist for channel 1
9/5/2024 11:42:34 PM -05:00 Debug Playlist exists
9/5/2024 11:42:34 PM -05:00 Debug WaitForPlaylistSegments took "00:00:09.1885723"
9/5/2024 11:42:25 PM -05:00 Debug FFmpeg pipeline ["NoStandardInputOption","HideBannerOption","NoStatsOption","LoglevelErrorOption","StandardFormatFlags","NoDemuxDecodeDelayOutputOption","FastStartOutputOption","ClosedGopOutputOption","NoBFramesOutputOption","NoSceneDetectOutputOption","TimeLimitOutputOption","FrameRateOutputOption","VideoTrackTimescaleOutputOption","VideoBitrateOutputOption","VideoBufferSizeOutputOption","EncoderLibx264","PixelFormatOutputOption","EncoderAac","AudioChannelsOutputOption","AudioBitrateOutputOption","AudioBufferSizeOutputOption","AudioSampleRateOutputOption","DoNotMapMetadataOutputOption","MetadataServiceProviderOutputOption","MetadataServiceNameOutputOption","OutputFormatHls","ComplexFilter"], ["AudioFirstPtsFilter"], ["LoopFilter","RealtimeFilter","SubtitlesFilter","EncoderLibx264"]
9/5/2024 11:42:25 PM -05:00 Debug ffmpeg hls error arguments -nostdin -hide_banner -nostats -loglevel error -fflags +genpts+discardcorrupt+igndts -copyts -i /root/.local/share/ersatztv/cache/resources/background.png -f lavfi -i anullsrc -filter_complex [1:0]aresample=async=1:first_pts=0[a];[0:0]loop=-1:1,realtime,subtitles=/root/.local/share/ersatztv/temp-pool/subtitle_0:fontsdir=/root/.local/share/ersatztv/cache/streams/fonts[v] -map [v] -map [a] -muxdelay 0 -muxpreload 0 -movflags +faststart -flags cgop -bf 0 -sc_threshold 0 -t 01:23:18.7983510 -r 24 -vsync cfr -video_track_timescale 90000 -b:v 2000k -maxrate:v 2000k -bufsize:v 4000k -c:v libx264 -profile:v high -pix_fmt yuv420p -c:a aac -ac 2 -b:a 192k -maxrate:a 192k -bufsize:a 384k -ar 48k -map_metadata -1 -metadata "service_provider=\"ErsatzTV\"" -metadata "service_name=\"Test\"" -g 96 -keyint_min 96 -force_key_frames expr:gte(t,n_forced*4) -f hls -hls_time 4 -hls_list_size 0 -segment_list_flags +live -hls_segment_filename /transcode/1/live%06d.ts -hls_flags program_date_time+append_list+omit_endlist+independent_segments /transcode/1/live.m3u8
9/5/2024 11:42:25 PM -05:00 Debug Format ["unknown"] doesn't equal yuv420p
9/5/2024 11:42:25 PM -05:00 Debug HW accel mode: "None"
9/5/2024 11:42:25 PM -05:00 Debug FFmpeg desired error state FrameState { Realtime = True, InfiniteLoop = False, VideoFormat = h264, VideoProfile = Some(high), VideoPreset = Some(), AllowBFrames = False, PixelFormat = Some(ErsatzTV.FFmpeg.Format.PixelFormatYuv420P), ScaledSize = FrameSize { Width = 1920, Height = 1080 }, PaddedSize = FrameSize { Width = 1920, Height = 1080 }, CroppedSize = None, IsAnamorphic = False, FrameRate = Some(24), VideoBitrate = Some(2000), VideoBufferSize = Some(4000), VideoTrackTimeScale = Some(90000), Deinterlaced = False, FrameDataLocation = Unknown, FFmpegAspectRatio = 16/9, BitDepth = 8 }
9/5/2024 11:42:25 PM -05:00 Error HLS process for channel 1 has terminated unsuccessfully with exit code 234: [matroska,webm @ 0x5a763fc60f00] Invalid stream specifier: -5.
9/5/2024 11:42:25 PM -05:00 Debug Format ["p010le"] doesn't equal yuv420p
9/5/2024 11:42:25 PM -05:00 Debug FFmpeg pipeline ["ThreadCountOption","NoStandardInputOption","HideBannerOption","NoStatsOption","LoglevelErrorOption","StandardFormatFlags","NoDemuxDecodeDelayOutputOption","FastStartOutputOption","ClosedGopOutputOption","NoBFramesOutputOption","NoSceneDetectOutputOption","TimeLimitOutputOption","VideoTrackTimescaleOutputOption","VideoBitrateOutputOption","VideoBufferSizeOutputOption","EncoderLibx264","PixelFormatOutputOption","EncoderAac","AudioChannelsOutputOption","AudioBitrateOutputOption","AudioBufferSizeOutputOption","AudioSampleRateOutputOption","DoNotMapMetadataOutputOption","MetadataServiceProviderOutputOption","MetadataServiceNameOutputOption","MetadataAudioLanguageOutputOption","OutputFormatHls","ComplexFilter"], ["AudioFirstPtsFilter","AudioPadFilter"], ["PadFilter","EncoderLibx264"]
9/5/2024 11:42:25 PM -05:00 Debug Playlist does not exist at expected location /transcode/1/live.m3u8
9/5/2024 11:42:25 PM -05:00 Debug ffmpeg hls arguments -threads 1 -nostdin -hide_banner -nostats -loglevel error -fflags +genpts+discardcorrupt+igndts -ss 00:42:32.2087786 -c:v hevc -readrate 1.0 -i "/media/share/Media/testmovie.mkv" -filter_complex [0:-5]aresample=async=1:first_pts=0,apad[a];[0:-6]pad=1920:1080:-1:-1:color=black[v];[v]setparams=range=tv:colorspace=bt709:color_trc=bt709:color_primaries=bt709[vpf] -map [vpf] -map [a] -muxdelay 0 -muxpreload 0 -movflags +faststart -flags cgop -bf 0 -sc_threshold 0 -t 01:23:18.7983510 -video_track_timescale 90000 -b:v 2000k -maxrate:v 2000k -bufsize:v 4000k -c:v libx264 -profile:v high -pix_fmt yuv420p -c:a aac -ac 2 -b:a 192k -maxrate:a 192k -bufsize:a 384k -ar 48k -map_metadata -1 -metadata "service_provider=\"ErsatzTV\"" -metadata "service_name=\"Test\"" -metadata:s:a:0 language=eng -g 96 -keyint_min 96 -force_key_frames expr:gte(t,n_forced*4) -f hls -hls_time 4 -hls_list_size 0 -segment_list_flags +live -hls_segment_filename /transcode/1/live%06d.ts -hls_flags program_date_time+append_list+omit_endlist+independent_segments /transcode/1/live.m3u8
9/5/2024 11:42:25 PM -05:00 Debug Forcing 1 ffmpeg thread due to buggy combination of stream seek and realtime output
9/5/2024 11:42:25 PM -05:00 Debug Waiting for playlist segments...
9/5/2024 11:42:25 PM -05:00 Debug Waiting for playlist to exist
9/5/2024 11:42:25 PM -05:00 Debug FFmpeg desired state FrameState { Realtime = True, InfiniteLoop = False, VideoFormat = h264, VideoProfile = Some(high), VideoPreset = None, AllowBFrames = False, PixelFormat = Some(ErsatzTV.FFmpeg.Format.PixelFormatYuv420P), ScaledSize = FrameSize { Width = 1920, Height = 800 }, PaddedSize = FrameSize { Width = 1920, Height = 1080 }, CroppedSize = None, IsAnamorphic = False, FrameRate = None, VideoBitrate = Some(2000), VideoBufferSize = Some(4000), VideoTrackTimeScale = Some(90000), Deinterlaced = False, FrameDataLocation = Unknown, FFmpegAspectRatio = 16/9, BitDepth = 8 }
9/5/2024 11:42:25 PM -05:00 Debug Found playout item Test Movie with path /media/share/Media/testmovie.mkv
9/5/2024 11:42:25 PM -05:00 Debug HLS segmenter will NOT work ahead for channel 1
9/5/2024 11:42:25 PM -05:00 Debug HLS session state: "SeekAndRealtime"
9/5/2024 11:42:25 PM -05:00 Information Starting HLS session for channel 1
9/5/2024 11:42:25 PM -05:00 Debug Maybe starting ffmpeg session for channel 1, mode segmenter
9/5/2024 11:42:25 PM -05:00 Debug Preparing transcode folder /transcode/1
9/5/2024 11:42:25 PM -05:00 Debug FFmpeg pipeline ["NoStandardInputOption","ThreadCountOption","HideBannerOption","LoglevelErrorOption","NoStatsOption","StandardFormatFlags","MapAllStreamsOutputOption","EncoderCopyAll","MetadataServiceProviderOutputOption","MetadataServiceNameOutputOption","OutputFormatMpegTs","PipeProtocol"], [], []
9/5/2024 11:42:25 PM -05:00 Information Starting ts stream for channel 1
9/5/2024 11:42:25 PM -05:00 Debug ffmpeg arguments -nostdin -threads 1 -hide_banner -loglevel error -nostats -fflags +genpts+discardcorrupt+igndts -readrate 1.0 -i http://localhost:8409/iptv/channel/1.m3u8?mode=segmenter -map 0 -c copy -metadata "service_provider=\"ErsatzTV\"" -metadata "service_name=\"Test\"" -f mpegts pipe:1