jellyfin / jellyfin-ffmpeg

FFmpeg for Jellyfin
https://jellyfin.org
Other
479 stars 127 forks source link

Videos are crashing before end #286

Open Aidan647 opened 12 months ago

Aidan647 commented 12 months ago

Describe The Bug My videos are crashing 1-2 minutes before video end.

Steps To Reproduce

  1. Play file
  2. Watch till end
  3. Video can crash near end showing Backdrop image

Expected Behavior not to crash

System:

MediaInfo

General
Unique ID                                : 29701480525933173465176384360821029803 (0x16584C0D0685399A7C76310C4E6FFBAB)
Complete name                            : R:\jellyfin\Shows\Star Trek Deep Space Nine (1993)\S02\S02E09.mkv
Format                                   : Matroska
Format version                           : Version 4
File size                                : 637 MiB
Duration                                 : 45 min 44 s
Overall bit rate                         : 1 947 kb/s
Frame rate                               : 24.113 FPS
Movie name                               : Second Sight
Encoded date                             : 2023-09-28 21:40:34 UTC
Writing application                      : HandBrake 1.6.1 2023012300
Writing library                          : Lavf59.27.100
ErrorDetectionType                       : Per level 1

Video
ID                                       : 1
Format                                   : HEVC
Format/Info                              : High Efficiency Video Coding
Format profile                           : Main@L4@Main
Codec ID                                 : V_MPEGH/ISO/HEVC
Duration                                 : 45 min 30 s
Bit rate                                 : 1 408 kb/s
Width                                    : 1 280 pixels
Height                                   : 960 pixels
Display aspect ratio                     : 4:3
Frame rate mode                          : Variable
Frame rate                               : 24.113 FPS
Original frame rate                      : 23.810 FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Bits/(Pixel*Frame)                       : 0.048
Stream size                              : 458 MiB (72%)
Default                                  : Yes
Forced                                   : No
Color range                              : Limited
Color primaries                          : BT.709
Transfer characteristics                 : BT.709
Matrix coefficients                      : BT.709

Audio #1
ID                                       : 2
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Commercial name                          : Dolby Digital
Codec ID                                 : A_AC3
Duration                                 : 45 min 30 s
Bit rate mode                            : Constant
Bit rate                                 : 448 kb/s
Channel(s)                               : 6 channels
Channel layout                           : L R C LFE Ls Rs
Sampling rate                            : 48.0 kHz
Frame rate                               : 31.250 FPS (1536 SPF)
Compression mode                         : Lossy
Stream size                              : 146 MiB (23%)
Title                                    : Main Feature AC3 5.1ch 448 kbps
Language                                 : English
Service kind                             : Complete Main
Default                                  : Yes
Forced                                   : No

Audio #2
ID                                       : 3
Format                                   : AAC LC SBR
Format/Info                              : Advanced Audio Codec Low Complexity with Spectral Band Replication
Commercial name                          : HE-AAC
Format settings                          : Explicit
Codec ID                                 : A_AAC-2
Duration                                 : 45 min 43 s
Bit rate                                 : 96.0 kb/s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 48.0 kHz
Frame rate                               : 23.438 FPS (2048 SPF)
Compression mode                         : Lossy
Delay relative to video                  : 1 s 0 ms
Stream size                              : 31.0 MiB (5%)
Title                                    : AAC, 48.0 kHz, 2.0, 96 kpbs, Russian, MVO (SDI Media)
Language                                 : Russian
Default                                  : No
Forced                                   : No

Text #1
ID                                       : 4
Format                                   : ASS
Codec ID                                 : S_TEXT/ASS
Codec ID/Info                            : Advanced Sub Station Alpha
Duration                                 : 43 min 59 s
Bit rate                                 : 127 b/s
Frame rate                               : 0.303 FPS
Count of elements                        : 801
Compression mode                         : Lossless
Stream size                              : 41.0 KiB (0%)
Language                                 : English
Default                                  : No
Forced                                   : No

Text #2
ID                                       : 5
Format                                   : ASS
Codec ID                                 : S_TEXT/ASS
Codec ID/Info                            : Advanced Sub Station Alpha
Duration                                 : 43 min 58 s
Bit rate                                 : 148 b/s
Frame rate                               : 0.194 FPS
Count of elements                        : 511
Compression mode                         : Lossless
Stream size                              : 47.8 KiB (0%)
Language                                 : Russian
Default                                  : No
Forced                                   : No

Menu
00:00:00.000                             : Keep Going
00:07:28.002                             : Broken Routing
00:12:32.723                             : She Was Wearing Red
00:18:46.096                             : Eminently Qualified
00:23:39.640                             : Looking For You
00:29:19.646                             : Something Special
00:34:36.546                             : Nidell's Dream
00:39:36.304                             : Just Like You

FFmpeg Logs original ffmpeg.log: https://hastebin.com/share/eqologinez.bash second ffmpeg.log: https://hastebin.com/share/edokasefox.bash relatable jellyfin.log: https://hastebin.com/share/kaxugoyufa.bash

Additional Context

Aidan647 commented 12 months ago

I noticed that video crashes when chrome requests last blocks of video. starting from (911.ts)

Aidan647 commented 12 months ago

I was encoding video with NVEnc with rc-lookahead=60

Gigglequad commented 10 months ago

I'm having the same issue. 👎 And it's not on every episode or movie either, just some. Also encoded with Nvenc.

Shadowghost commented 9 months ago

Does this happen outside of Jellyfin too? If not this might be caused by having tracks of different length inside the source file.