Jellyfin Forum
firestick freezes (audio continues) - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+--- Thread: firestick freezes (audio continues) (/t-firestick-freezes-audio-continues)



firestick freezes (audio continues) - misterprimus - 2023-11-01

Got an i7 PC running a jellyfin server and trying to play them on firestick. Some movies play fine, but others freeze, crash, skip, etc... For example, one movie always freezes at the exact same frame and the audio continues. I tried Kodi, Jellyfin (with different players), Jellyfin plugin for Kodi, and even VLC over Samba. It's always almost the same problem.

On the other hand, playing the movie on VLC on a desktop computer over Samba works perfectly fine. Playing in the browser on the same computer works as well.

I'm not very knowledgeable when it comes to jellyfin, but I think it must be a firestick problem. The codec is probably one that is supposed to play natively on the firestick, so regardless of what program I use on the firestick, the server just feeds me the raw file and the video processing is done on the firestick where it fails to work properly. So I was wondering: is it possible to force the jellyfin server to always transcode or set it up so the firestick always requests transcoded video to prevent the bad transcoding on the firestick?

Only other thing I can think of is manually converting each file via handbrake to something that is more compatible and friendly, but I'd rather avoid that if possible.


RE: firestick freezes (audio continues) - Deleted User - 2023-11-01

to force transcoding open the settings on jellyfin-androidtv (the app) and lower the bandwidth below the video bitrate

i.e. if the video bitrate is 20M then set the client to 18M


however if the same file in all those players freezes at the same spot it is probably a bad file and transcoding may fail as well

it would be recommendable to check the file itself

you could also provide the output of mediainfo so we could see exact codec and bitrate information


RE: firestick freezes (audio continues) - misterprimus - 2023-11-01

(2023-11-01, 02:45 AM)000 Wrote: to force transcoding open the settings on jellyfin-androidtv (the app) and lower the bandwidth below the video bitrate

i.e. if the video bitrate is 20M then set the client to 18M


however if the same file in all those players freezes at the same spot it is probably a bad file and transcoding may fail as well

it would be recommendable to check the file itself

you could also provide the output of mediainfo so we could see exact codec and bitrate information

Yes, I think you're right. While waiting for a response here, I figured I'd try to convert the file using handbrake, but it failed. I then tried with ffmpeg and it, too, gave an error sometime that appears to be around the time when the problem occurs during playback.

Code:
  Metadata:
    major_brand    : isom
    minor_version  : 1
    compatible_brands: isomavc1
    creation_time  : 2013-05-13T16:31:52.000000Z
  Duration: 01:35:38.79, start: 0.000000, bitrate: 2158 kb/s
  Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1920x1040, 2059 kb/s, 23.98 fps, 23.98 tbr, 24k tbn (default)
    Metadata:
      creation_time  : 2013-05-13T16:31:52.000000Z
      handler_name    : video.264#trackID=1:fps=23.976 - Imported with GPAC 0.5.0-rev
      vendor_id      : [0][0][0][0]
  Stream #0:1[0x2](eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 95 kb/s (default)
    Metadata:
      creation_time  : 2013-05-13T16:32:00.000000Z
      handler_name    : GPAC ISO Audio Handler
      vendor_id      : [0][0][0][0]
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[libx264 @ 000002057413b580] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 000002057413b580] profile High, level 4.0, 4:2:0, 8-bit
[libx264 @ 000002057413b580] 264 - core 164 - H.264/MPEG-4 AVC codec - Copyleft 2003-2023 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=23 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'Z:\movies\movies\out.mp4':
  Metadata:
    major_brand    : isom
    minor_version  : 1
    compatible_brands: isomavc1
    encoder        : Lavf60.9.100
  Stream #0:0(und): Video: h264 (avc1 / 0x31637661), yuv420p(progressive), 1920x1040, q=2-31, 23.98 fps, 24k tbn (default)
    Metadata:
      creation_time  : 2013-05-13T16:31:52.000000Z
      handler_name    : video.264#trackID=1:fps=23.976 - Imported with GPAC 0.5.0-rev
      vendor_id      : [0][0][0][0]
      encoder        : Lavc60.21.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
  Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 95 kb/s (default)
    Metadata:
      creation_time  : 2013-05-13T16:32:00.000000Z
      handler_name    : GPAC ISO Audio Handler
      vendor_id      : [0][0][0][0]
[vost#0:0/libx264 @ 000002057413b2c0] Error submitting a packet to the muxer: Invalid argument speed=1.78x
[out#0/mp4 @ 0000020572036480] Error muxing a packet
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000020572054280] Packet corrupt (stream = 0, dts = 19502483).rop=0 speed=1.71x
[NULL @ 0000020572057680] Invalid NAL unit size (9421 > 6623).
[NULL @ 0000020572057680] missing picture in access unit with size 6627
[in#0/mov,mp4,m4a,3gp,3g2,mj2 @ 0000020572027100] corrupt input packet in stream 0
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000020572054280] stream 0, offset 0xca1e9fb: partial file
[in#0/mov,mp4,m4a,3gp,3g2,mj2 @ 0000020572027100] Error during demuxing: Invalid argument
[out#0/mp4 @ 0000020572036480] Error writing trailer: Invalid argument
[out#0/mp4 @ 0000020572036480] Error closing file: Invalid argument
[out#0/mp4 @ 0000020572036480] video:242417kB audio:9520kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
frame=19418 fps= 41 q=-1.0 Lsize=  251648kB time=00:13:33.03 bitrate=2535.6kbits/s dup=2 drop=0 speed=1.71x
[libx264 @ 000002057413b580] frame I:206  Avg QP:18.38  size: 77437
[libx264 @ 000002057413b580] frame P:5314  Avg QP:20.90  size: 23685
[libx264 @ 000002057413b580] frame B:13955 Avg QP:22.58  size:  7674
[libx264 @ 000002057413b580] consecutive B-frames:  1.9%  4.9%  8.3% 84.9%
[libx264 @ 000002057413b580] mb I  I16..4: 12.8% 83.3%  3.9%
[libx264 @ 000002057413b580] mb P  I16..4:  3.1%  8.3%  0.2%  P16..4: 53.4%  7.8%  3.5%  0.0%  0.0%    skip:23.7%
[libx264 @ 000002057413b580] mb B  I16..4:  0.2%  0.5%  0.0%  B16..8: 43.1%  1.4%  0.1%  direct: 1.7%  skip:52.8%  L0:46.5% L1:52.2% BI: 1.3%
[libx264 @ 000002057413b580] 8x8 transform intra:74.3% inter:92.7%
[libx264 @ 000002057413b580] coded y,uvDC,uvAC intra: 47.8% 63.9% 11.2% inter: 8.9% 17.8% 0.1%
[libx264 @ 000002057413b580] i16 v,h,dc,p: 24% 17%  9% 50%
[libx264 @ 000002057413b580] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 21% 14% 23%  6%  8%  8%  7%  7%  6%
[libx264 @ 000002057413b580] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 30% 17% 12%  6% 10%  9%  7%  6%  3%
[libx264 @ 000002057413b580] i8c dc,h,v,p: 50% 19% 22%  8%
[libx264 @ 000002057413b580] Weighted P-Frames: Y:3.9% UV:3.2%
[libx264 @ 000002057413b580] ref P L0: 59.9%  9.3% 22.4%  8.2%  0.1%
[libx264 @ 000002057413b580] ref B L0: 85.1% 12.0%  2.8%
[libx264 @ 000002057413b580] ref B L1: 96.1%  3.9%
[libx264 @ 000002057413b580] kb/s:2451.40
Conversion failed!

I'm doing it now with
Code:
+discardcorrupt
and so far there is no error. I guess computer VLC simply blows past the error, while firestick VLC gets stuck? Is there a way to batch-check video files on a hard drive for errors so I know which ones need to be fixed? Am I fixing it the right way via ffmpeg?


RE: firestick freezes (audio continues) - Deleted User - 2023-11-01

yea i have noticed android is not forgiving on playback where desktops are, windows and linux will drop frames and continue but android will bomb

if you wanted to batch check your files it would be resource intensive but see the post here - https://superuser.com/questions/100288/how-can-i-check-the-integrity-of-a-video-file-avi-mpeg-mp4

lastly, i cannot answer whether or not you are repairing the file correctly as i have never attempted to repair one in the last 15 years, easier and faster to just re-copy the disc for me - in the case the disc is bad i would buy a new one


RE: firestick freezes (audio continues) - misterprimus - 2023-11-01

(2023-11-01, 05:18 AM)000 Wrote: yea i have noticed android is not forgiving on playback where desktops are, windows and linux will drop frames and continue but android will bomb

if you wanted to batch check your files it would be resource intensive but see the post here - https://superuser.com/questions/100288/how-can-i-check-the-integrity-of-a-video-file-avi-mpeg-mp4

lastly, i cannot answer whether or not you are repairing the file correctly as i have never attempted to repair one in the last 15 years, easier and faster to just re-copy the disc for me - in the case the disc is bad i would buy a new one

Is there some way to make firestick more forgiving like a PC and just skip over the bad frames?

(2023-11-01, 05:18 AM)000 Wrote: yea i have noticed android is not forgiving on playback where desktops are, windows and linux will drop frames and continue but android will bomb

if you wanted to batch check your files it would be resource intensive but see the post here - https://superuser.com/questions/100288/how-can-i-check-the-integrity-of-a-video-file-avi-mpeg-mp4

lastly, i cannot answer whether or not you are repairing the file correctly as i have never attempted to repair one in the last 15 years, easier and faster to just re-copy the disc for me - in the case the disc is bad i would buy a new one

Re: the error finder you mentioned, what would be the code to check all files with video extensions (.avi, .mkv, .mp4, etc...) on a hard drive searching in folders and subfolders as well?

Code:
ffmpeg -v error -i file.avi -f null - 2>error.log



RE: firestick freezes (audio continues) - Deleted User - 2023-11-01

(2023-11-01, 05:20 AM)misterprimus Wrote: Is there some way to make firestick more forgiving like a PC and just skip over the bad frames?

if there is a way it would be re-coding the player app and compiling the fix into it

(2023-11-01, 05:20 AM)misterprimus Wrote: Re: the error finder you mentioned, what would be the code to check all files with video extensions (.avi, .mkv, .mp4, etc...) on a hard drive searching in folders and subfolders as well?

Code:
ffmpeg -v error -i file.avi -f null - 2>error.log

in linux, for f in *; do ffmpeg... -i $f; done

you can substitute for f in find... as well

in windows, uhm, some other sort of batch scripting (i dont use windows)