• 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 Post Processing DVR shows is losing metadata

     
    • 0 Vote(s) - 0 Average

    Post Processing DVR shows is losing metadata

    finicky6457
    Offline

    Junior Member

    Posts: 29
    Threads: 5
    Joined: 2024 Oct
    Reputation: 1
    Country:United States
    #1
    2024-12-16, 08:39 PM
    I'm using Jellyfin to DVR shows which are saved in the "Recordings" library. I'm using the post processing feature to run a script that reencodes the .ts files to .mkv containers and then runs comskip to form a new video file. The script outputs the files to a new directory in the same structure (Show name, season, etc). The problem is that the conversion is losing some of the metadata like Season, Episode, and Description. I've tried copying the .nfo files from the Recordings directory to the new processed directory but the metadata is still lost. Any ideas on how to get the metadata to load or to change my process for recording/converting shows?
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,375
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #2
    2024-12-16, 10:54 PM
    What are you using to convert TS to MKV? ffmpeg?
    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]
    finicky6457
    Offline

    Junior Member

    Posts: 29
    Threads: 5
    Joined: 2024 Oct
    Reputation: 1
    Country:United States
    #3
    2024-12-16, 11:57 PM (This post was last modified: 2024-12-16, 11:58 PM by finicky6457. Edited 1 time in total.)
    ffmpeg... i even tried adding "-movflags use_metadata_tags" but didn't do anything... the new files are formated like: original_filename.ts.mkv and the nfo filenames are original_filename.nfo. i even tried original_filename.ts.nfo.
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,375
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #4
    2024-12-17, 01:48 AM
    The NFO doesn't need the extension of the file. It should just match the file name of the video, except the extension. You may need to "replace all metadata" perhaps?

    Does this show have a TMDB entry? Skip the NFO altogether?
    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]
    finicky6457
    Offline

    Junior Member

    Posts: 29
    Threads: 5
    Joined: 2024 Oct
    Reputation: 1
    Country:United States
    #5
    2024-12-18, 12:41 AM
    (2024-12-17, 01:48 AM)TheDreadPirate Wrote: The NFO doesn't need the extension of the file.  It should just match the file name of the video, except the extension.  You may need to "replace all metadata" perhaps?

    Does this show have a TMDB entry?  Skip the NFO altogether?

    The show has an IMDB and TMDB entry. The metadata for the show seems to be included. What is lost however is the episode metadata. "Replace all metadata" did not fix the problem.

    Here is an example:

    https://imgur.com/AtV0v88 - Original Recording
    https://imgur.com/LWUkuPF - Processed
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,375
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #6
    2024-12-18, 02:13 PM
    Can you share your post processing script?  I double checked my recordings and they maintain their metadata.  An example NFO.

    Code:
    <?xml version="1.0" encoding="utf-8" standalone="yes"?>
    <episodedetails>
      <title>A Midnight Soba Shop in Akita</title>
      <aired>2024-09-09</aired>
      <dateadded>2024-09-09 22:25:00</dateadded>
      <plot>There's a soba joint in Akita City that opens late at night until lunch the next day. All kinds of people come for drinks and food. Amidst the late March snow, we document this midnight soba shop.</plot>
      <genre>documentary</genre>
      <genre>News</genre>
    </episodedetails>

    The files in the folder.

    Code:
    chris@rat-trap:/media/library/liveTV/series$ tree Document\ 72\ Hours/
    Document 72 Hours/
    ├── Document 72 Hours 2024_09_09_22_30_00 - A Midnight Soba Shop in Akita.mp4
    ├── Document 72 Hours 2024_09_09_22_30_00 - A Midnight Soba Shop in Akita.nfo
    ├── Document 72 Hours 2024_09_09_22_30_00 - A Midnight Soba Shop in Akita-thumb.jpg
    ├── Document 72 Hours 2024_10_01_03_30_00 - Fresh Starts at a Yokohama Electronics Store.mp4
    ├── Document 72 Hours 2024_10_01_03_30_00 - Fresh Starts at a Yokohama Electronics Store.nfo
    ├── Document 72 Hours 2024_10_01_03_30_00 - Fresh Starts at a Yokohama Electronics Store-thumb.jpg
    ├── Document 72 Hours 2024_10_22_03_30_00 - Nature's Bounty at an Okayama Community Garden.mp4
    ├── Document 72 Hours 2024_10_22_03_30_00 - Nature's Bounty at an Okayama Community Garden.nfo
    ├── Document 72 Hours 2024_10_22_03_30_00 - Nature's Bounty at an Okayama Community Garden-thumb.jpg
    ├── Document 72 Hours 2024_11_01_04_30_00 - A Low-priced Gas Station in Wakayama.mp4
    ├── Document 72 Hours 2024_11_01_04_30_00 - A Low-priced Gas Station in Wakayama.nfo
    ├── Document 72 Hours 2024_11_01_04_30_00 - A Low-priced Gas Station in Wakayama-thumb.jpg
    ├── Document 72 Hours 2024_11_04_21_30_00 - The Convenience Store in a Midwinter Hokkaido Village.mp4
    ├── Document 72 Hours 2024_11_04_21_30_00 - The Convenience Store in a Midwinter Hokkaido Village.nfo
    ├── Document 72 Hours 2024_11_04_21_30_00 - The Convenience Store in a Midwinter Hokkaido Village-thumb.jpg
    ├── Document 72 Hours 2024_11_11_21_30_00 - Lives Inside a Huge  Danchi  Housing Complex.mp4
    ├── Document 72 Hours 2024_11_11_21_30_00 - Lives Inside a Huge  Danchi  Housing Complex.nfo
    ├── Document 72 Hours 2024_11_11_21_30_00 - Lives Inside a Huge  Danchi  Housing Complex-thumb.jpg
    ├── Document 72 Hours 2024_11_18_21_30_00 - Kerosene Delivery Service in Snowy Sapporo.mp4
    ├── Document 72 Hours 2024_11_18_21_30_00 - Kerosene Delivery Service in Snowy Sapporo.nfo
    ├── Document 72 Hours 2024_11_18_21_30_00 - Kerosene Delivery Service in Snowy Sapporo-thumb.jpg
    ├── Document 72 Hours 2024_11_25_21_30_00 - Ueno  A Discount Women's Clothing Store.mp4
    ├── Document 72 Hours 2024_11_25_21_30_00 - Ueno  A Discount Women's Clothing Store.nfo
    ├── Document 72 Hours 2024_11_25_21_30_00 - Ueno  A Discount Women's Clothing Store-thumb.jpg
    ├── Document 72 Hours 2024_12_02_21_30_00 - University Art Festival  Portrait of Campus Days.mp4
    ├── Document 72 Hours 2024_12_02_21_30_00 - University Art Festival  Portrait of Campus Days.nfo
    ├── Document 72 Hours 2024_12_02_21_30_00 - University Art Festival  Portrait of Campus Days-thumb.jpg
    ├── Document 72 Hours 2024_12_09_21_30_00 - A Local Penny Candy Shop in Tokyo.mp4
    ├── Document 72 Hours 2024_12_09_21_30_00 - A Local Penny Candy Shop in Tokyo.nfo
    ├── Document 72 Hours 2024_12_09_21_30_00 - A Local Penny Candy Shop in Tokyo-thumb.jpg
    ├── Document 72 Hours 2024_12_16_21_30_00 - At a Small Kobe Okonomiyaki Shop.mp4
    ├── Document 72 Hours 2024_12_16_21_30_00 - At a Small Kobe Okonomiyaki Shop.nfo
    ├── Document 72 Hours 2024_12_16_21_30_00 - At a Small Kobe Okonomiyaki Shop-thumb.jpg
    └── tvshow.nfo

    My post processing script.

    Code:
    #!/bin/bash
    INPUTFILE=$1
    NEWFILE=$(echo "$INPUTFILE" | sed 's/\.ts/\.mp4/g')
    /usr/lib/jellyfin-ffmpeg/ffmpeg -y -fflags +genpts+igndts -i "$INPUTFILE" -map 0 -codec copy -max_muxing_queue_size 2048 -avoid_negative_ts make_zero -max_interleave_delta 0 "$NEWFILE"
    rm -f "$INPUTFILE"
    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]
    finicky6457
    Offline

    Junior Member

    Posts: 29
    Threads: 5
    Joined: 2024 Oct
    Reputation: 1
    Country:United States
    #7
    2024-12-19, 02:32 AM (This post was last modified: 2024-12-19, 02:33 AM by finicky6457. Edited 1 time in total.)
    This is my script: https://github.com/redaters/Jellyfin-Pos...eencode.sh

    I have two different .nfo files, one in the recordings directory that looks like this:

    Code:
    <movie>
      <title>Jimmy Fallon's Holiday Seasoning Spectacular</title>
      <dateadded>2024-12-19 00:57:00</dateadded>
      <plot>Jimmy Fallon and a lineup of celebrity guests celebrate the season with performances from Fallon's new album, ``Holiday Seasoning``; featuring Meghan Trainor, Cara Delevingne, Dolly Parton, the Jonas Brothers, Justin Timberlake and more.</plot>
      <genre>Special</genre>
      <genre>Entertainment</genre>
      <genre>Comedy</genre>
      <genre>Special</genre>
      <lockdata>true</lockdata>
    </movie>

    The other in the processed directory that looks like this:

    Code:
    <episodedetails>
      <plot />
      <lockdata>false</lockdata>
      <dateadded>2024-12-19 02:15:23</dateadded>
      <title>Jimmy Fallon's Holiday Seasoning Spectacular</title>
      <year>2024</year>
      <runtime>40</runtime>
      <art>
        <poster>/config/metadata/library/0b/0b37303c97d669101ab29f32071e3996/poster.jpg</poster>
      </art>
      <showtitle>Jimmy Fallon's Holiday Seasoning Spectacular</showtitle>
      <season>1</season>
      <aired>2024-12-19</aired>
      <fileinfo>
        <streamdetails>
          <video>
            <codec>mpeg2video</codec>
    ....

        </streamdetails>
      </fileinfo>
    </episodedetails>


    it seems like the first .nfo was created from metadata from the guide while the second was created from the file only. I also had some success copying the .nfo file from the recordings directory to the processed directory just after the video file was processed (before it was seen by Jellyfin). Jellyfin now has the full metadata for that video, but if I copy them after the file was seen by Jellyfin the metadata is not getting update.
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,375
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #8
    2024-12-19, 02:42 PM (This post was last modified: 2024-12-19, 02:43 PM by TheDreadPirate. Edited 1 time in total.)
    I noticed that the first NFO says it is a movie. I'm assuming the second is the NFO that Jellyfin creates with NFO saver after you've moved it. If you are placing the first NFO in a shows library after processing it, I'm not sure that Jellyfin would pick it up.

    If you replaced the <movie> tags with <episodedetails> I think it would work. You should also disable NFO saver in the destination library to ensure that Jellyfin does not overwrite the existing NFO generated from the guide.
    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]
    finicky6457
    Offline

    Junior Member

    Posts: 29
    Threads: 5
    Joined: 2024 Oct
    Reputation: 1
    Country:United States
    #9
    2024-12-20, 11:16 AM (This post was last modified: 2024-12-20, 11:17 AM by finicky6457. Edited 1 time in total.)
    I think I found an easy workaround. I added a few lines to the reprocessing script that copies the .nfo file from the recording directory to the processed directory after the reencoding but before the comskip. It also renames it from original_name.nfo to original_name.ts.nfo (including the filename and extension of the original filename). This seems to get the .nfo file in the directory before Jellyfin sees it and therefore loads the metadata from the .nfo file instead of building a new one from the file metadata.

    I'm wondering if some of the problem stems from the recent Schedules Direct guide issue (https://forum.jellyfin.org/t-schedulesdi...contact-me). The shows are recording without Season information, so perhaps Jellyfin sees the files and assumes they are movies, not shows.
    « 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