• Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below
  • Forum
  • Website
  • GitHub
  • Status
  • Translation
  • Features
  • Team
  • Rules
  • Help
  • Feeds
User Links
  • Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below

    Useful Links Forum Website GitHub Status Translation Features Team Rules Help Feeds
    Jellyfin Forum Support Troubleshooting Lossless media edits causing playback issues in AndroidTV client

     
    • 0 Vote(s) - 0 Average

    Lossless media edits causing playback issues in AndroidTV client

    Plays fine on PC with VLC and in Plex
    Perseverant
    Offline

    Junior Member

    Posts: 42
    Threads: 12
    Joined: 2023 Jun
    Reputation: 4
    #1
    2024-06-19, 05:04 PM
    There is a program out there called AviDemux that will do lossless chops on I-frames.  I do some minor censoring of movies for my family sometimes, and will occasionally take out sections of a film that I'd rather the fam not see, using AviDemux to do it so that I don't have to have the quality loss associated with re-encoding it.

    My edited films play great in VLC on my PC, and my buddy (who also owns the same film) threw it on his Plex server and it played without issue, but Jellyfin is another matter...

    In the AndroidTV client, when exoplayer reaches the place in the movie where I chopped things, it fails, retries a few times, and then gives up.
    If I use VLClib to play it instead, playback won't hard-fail on an error like it does with exoplayer, but it shows some garbled frames for a second or two where I cut, then resumes playback, and it's jarring enough to totally take you out of the movie.

    I hope what I'm describing makes sense, but I have no idea what information I can offer to help you guys troubleshoot this issue.  Please let me know whatever info I can get you and I'll try to track it down.
    New to media handling?  Check out my guide: From Disc to Drive: A Beginner's Guide to Preparing Your Media for Jellyfin
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,375
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #2
    2024-06-19, 05:26 PM
    I'm not sure how AviDemux works in the background, but one thing you can try is to repackage the file.

    Code:
    /usr/lib/jellyfin-ffmpeg/ffmpeg -fflags genpts -i "/path/to/video.mkv" -map 0:v -map 0:a -map 0:s -map_chapters 0 -c:v copy -c:a copy -c:s copy outputFile.mkv

    This will copy the video, audio, and subs unmodified and just regenerate the packet time stamps. Jellyfin, and a lot of the players Jellyfin uses, are not very tolerant of faults and out of spec files.
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    1
    Perseverant
    Offline

    Junior Member

    Posts: 42
    Threads: 12
    Joined: 2023 Jun
    Reputation: 4
    #3
    2024-06-19, 06:17 PM
    (2024-06-19, 05:26 PM)TheDreadPirate Wrote: I'm not sure how AviDemux works in the background, but one thing you can try is to repackage the file.

    Code:
    /usr/lib/jellyfin-ffmpeg/ffmpeg -fflags genpts -i "/path/to/video.mkv" -map 0:v -map 0:a -map 0:s -map_chapters 0 -c:v copy -c:a copy -c:s copy outputFile.mkv

    This will copy the video, audio, and subs unmodified and just regenerate the packet time stamps.  Jellyfin, and a lot of the players Jellyfin uses, are not very tolerant of faults and out of spec files.

    Thank you.  I can take a crack at doing that, though I can't say I use ffmpeg command line much.  Would re-multiplexing the file in MKVtoolnix achieve the same end?  If so this workaround is probably a dead-end, but I'm willing to take a crack at it regardless.
    New to media handling?  Check out my guide: From Disc to Drive: A Beginner's Guide to Preparing Your Media for Jellyfin
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,375
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #4
    2024-06-19, 06:25 PM
    What we're doing is re-multiplexing, yes. How different the command I specified is from how MKVToolnix does things, I don't know.
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    Perseverant
    Offline

    Junior Member

    Posts: 42
    Threads: 12
    Joined: 2023 Jun
    Reputation: 4
    #5
    2024-06-19, 07:17 PM
    (2024-06-19, 06:25 PM)TheDreadPirate Wrote: What we're doing is re-multiplexing, yes.  How different the command I specified is from how MKVToolnix does things, I don't know.
    Unfortunately, it's a bust - same problem after re-multiplexing.  FFMPEG yielded a larger file that had the same issue (MKVtoolnix apparently has some optimizations that vanilla FFMPEG lacks).

    What would you recommend in terms of next steps?  I don't want to bug the developers, but it would be great if Jellyfin could be enhanced to handle whatever file-level issues are going on seamlessly like VLC and Plex do.
    New to media handling?  Check out my guide: From Disc to Drive: A Beginner's Guide to Preparing Your Media for Jellyfin
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,375
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #6
    2024-06-19, 07:29 PM
    Jellyfin doesn't make an in-house media engine. We use various open source engines like exoplayer or libVLC on Android/AndroidTV, whatever HTML video player is built in to your browser, MPV in Jellyfin Media Player, etc. So we have little control over fault tolerance or out of spec files.

    What happens when you force transcoding? Setting the quality to a bit rate lower than the video's native bit rate.

    As for next steps. I don't really have a good answer. If transcoding works, that kind of answers the question, though.
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    SethBacon
    Offline

    Member

    Posts: 51
    Threads: 3
    Joined: 2023 Nov
    Reputation: 5
    Country:Canada
    #7
    2024-06-19, 07:47 PM
    This is kinda fascinating. Could you possibly give some example titles/scenes you remove? Ive thought about adding further epilogue cards to older documentaries, so I guess I cant get on a horse about editing art but still, didn't Marge learn this lesson trying to censor itchy and scratchy circa 1991?     
    Perseverant
    Offline

    Junior Member

    Posts: 42
    Threads: 12
    Joined: 2023 Jun
    Reputation: 4
    #8
    2024-06-19, 07:51 PM
    (2024-06-19, 07:29 PM)TheDreadPirate Wrote: Jellyfin doesn't make an in-house media engine.  We use various open source engines like exoplayer or libVLC on Android/AndroidTV, whatever HTML video player is built in to your browser, MPV in Jellyfin Media Player, etc.  So we have little control over fault tolerance or out of spec files.

    What happens when you force transcoding?  Setting the quality to a bit rate lower than the video's native bit rate.

    As for next steps.  I don't really have a good answer.  If transcoding works, that kind of answers the question, though.

    That makes sense.  Bit of a bummer.  Since it plays perfectly in VLC I would think that libVLC would also play it properly, but there must be some internal differences between them.  I wonder if there is a newer version of libVLC that might work better.

    I disable transcoding since quality is a top priority for me (I encode prior to putting things on the server with "very slow" presets), but sounds like I might end up having to try re-encoding it and just take the quality hit.  Thanks for brainstorming.
    New to media handling?  Check out my guide: From Disc to Drive: A Beginner's Guide to Preparing Your Media for Jellyfin
    « Next Oldest | Next Newest »

    Users browsing this thread: 1 Guest(s)


    • View a Printable Version
    • Subscribe to this thread
    Forum Jump:

    Home · Team · Help · Contact
    © Designed by D&D - Powered by MyBB
    L


    Jellyfin

    The Free Software Media System

    Linear Mode
    Threaded Mode