Hawkwinter 11 Posted July 29, 2022 Posted July 29, 2022 So - a search turning up old threads seems to suggest this did not used to be possible unless I go through and start merging files - which would be highly impractical to do across an entire pre-existing video collection. I figured I would ask if there's a good way to do this now that isn't editing a ton of files. Setup: I have a (largely old TV) media collection It's not uncomon for me to do rerun-shuffling Many shows have "Part 1" "Part 2" "Part 3" or even "Part 4" continuations. I would really like to set it up so that when I shuffle a TV show (or a library, or a genre, or whatever), if it hits one of the multi-part episodes, it plays through all the parts sequentially like it was one long video - always starting with Part 1, without me needing to go through and edit every multi-episode plot in my collection to merge the files. I'm good with renaming some files or manually editing my NFO files after scraping the normal episode data to make it happen. But while I don't mind renaming a few hundred files to make it happen across my library as I could do that on a couple days I'm not busy, drawing it out to one every hour or something while my computer processes videos for months would be an insurmountable barrier to doing it. So like: https://thetvdb.com/series/stargate-atlantis/seasons/official/1 If I go to shuffle Stargate Atlantis, as I often do - Emby would ideally treat "Rising" 1 & 2 as just "Rising" (in playlists, in playback, in season view), and then I could just use the metadata from "Rising (1)". Is there a way to do that through Emby in 2022, or is that still unsupported?
pwhodges 1717 Posted July 29, 2022 Posted July 29, 2022 But those are defined as separate episodes, so Emby's multi-part facilities (such as they are) would be inappropriate. The way that will work is to join the two episodes (a matter of moments using MKVToolNix) and rename them (in this case) s01e01-e02 which will also tell Emby to pull in the full metadata. You could also call the combined episode just s01e01 if you then specify DVD ordering (which in TVDB has those episodes as one), but then you'd need to renumber the whole series, which would be more trouble for you. If joining the two parts is not what you want to do, then I'm sorry - but I think you'll find you're swimming against the tide... Paul
Hawkwinter 11 Posted July 31, 2022 Author Posted July 31, 2022 (edited) On 7/29/2022 at 10:01 AM, pwhodges said: But those are defined as separate episodes What do you mean by this? Defined as separate episodes how? The filename? I could rename it to "s01e01-e02A" and "s01e01-e02B" or something, if Emby has some file-naming convention by which it will figure it out on its own. On 7/29/2022 at 10:01 AM, pwhodges said: The way that will work is to join the two episodes (a matter of moments using MKVToolNix) and rename them (in this case) s01e01-e02 which will also tell Emby to pull in the full metadata. Last time I tried to join two videos the software re-encoded the whole video, which, if I need to queue it up manually and wait, several dozen times, would be impractically time consuming. If I use MKVToolnix so do it, it can do it without ReEncoding them? On 7/29/2022 at 10:01 AM, pwhodges said: If joining the two parts is not what you want to do, then I'm sorry - but I think you'll find you're swimming against the tide... Paul I would *prefer* to not have to edit the video files, given that it's not a 1-off, and would involve changing many videos across many folders, but I would be okay with it so long as I dont have to wait for videos to re-encode and be at my machine waiting to start the next one and the like. Can MKVToolnix also merge the SRT files in the same folder? Most of my files that would need merging don't have SRTs, but some of them do. If it can do it in a way that isn't a long drawn out process, I'd be willing to use MKVToolNix even though it merging a ton of files wouldn't be my preference. Edited July 31, 2022 by Hawkwinter
Hawkwinter 11 Posted July 31, 2022 Author Posted July 31, 2022 On 7/29/2022 at 10:01 AM, pwhodges said: The way that will work is to join the two episodes (a matter of moments using MKVToolNix) and rename them (in this case) s01e01-e02 which will also tell Emby to pull in the full metadata. When the multi-parter is say - 2 at the end of a season, and 1 at the beginning of the next season, or 1 and 1, or 2 and 2, (a common setup in Stargate) is there a way to get it to scrape all that metadata, or would that be a "edit that metadata manually" situation?
Hawkwinter 11 Posted July 31, 2022 Author Posted July 31, 2022 Followup: Just tested toolnix on a few of my Stargate Atlantis episodes. Took like 15 minutes and threw warnings "The codec's private data does not match. Both have the same length (41) but different content." and the resulting video has a bunch of visual garbage not present in the original videos. Apparently my x264 encoding didnt all use the same settings, making things not append together nicely. But it does have a job queue, so I could do a ton of them. However, I would be concerned about having a bunch of hidden garbage files waiting to fail on me when I go to watch them as a result. Looks like there might be a fix without reencoding everything if I process it all with ffmpeg first. I'll have to try it with a couple and see how troublesome it is. A Quick and straightforward concatenation this is does not seem like it will be. But if I can figure out how to process them in a batch file (and skip any that are already done if I need to resume the batch file on another day) - that could still be doable. On 7/29/2022 at 10:01 AM, pwhodges said: If joining the two parts is not what you want to do, then I'm sorry - but I think you'll find you're swimming against the tide... Paul Joining the various parts across an entire preexisting video library and troubleshooting any errors that come up does sound like it will be a big pain in the ass, with perhaps the least irritating option (if this FFMPEG command doesnt work) being to reencode them all merged. Which is the big pain in the ass I was originally hoping to avoid. On 7/29/2022 at 10:01 AM, pwhodges said: I think you'll find you're swimming against the tide... Paul I would be surprised if there are very many people who are very keen to reencode large numbers of their videos to merge them (there are certainly a lot of threads on this forum that suggest people want their multi-part videos to play without altering the files themselves) - particularly since the simple mkvtoolnix concatenate often doesnt work. I think I recall getting the same problem a year or two ago when I tried to get other episodes merged in Plex. I doubt I'm the only one who hears that suggestion, hits the same errors and broken files, comes across the same advice to fix it of "re-encode all your multipart episodes to merge them" and wonders if it'll be worth the effort. If the FFMPEG command works (I'll try it on those same three videos tonight - it's currently claiming the files don't exist right now, I'm wondering if it doesn't like my long paths...) - If it does work, it'll still be a nuisance, but perhaps a smaller one than full reencodes.
FrostByte 5185 Posted July 31, 2022 Posted July 31, 2022 What is the source of these files? You're going to have a hard time if you are trying to combine files from different sources. If by different private data you mean things like different codecs, etc then yes it isn't going to be able to handle that.
Hawkwinter 11 Posted July 31, 2022 Author Posted July 31, 2022 (edited) 4 minutes ago, FrostByte said: What is the source of these files? You're going to have a hard time if you are trying to combine files from different sources. If by different private data you mean things like different codecs, etc then yes it isn't going to be able to handle that. Just BluRays ripped to mkv and encoded in x264. This is the explanation I've come across that I think is why this happened. Quote "And if you are now wondering why you ended up with different CodecPrivate despite "identical settings": You probably relied on x264 (either directly or via some front-end). x264 adapts itself to its input: If x264 is given interlaced input (or input it believes to be interlaced -- it just reads some flags), it uses interlaced encoding mode; if not, it uses non-interlaced encoding mode even if you entered the same things into the commandline (or whatever GUI you use to control the encoding). Different crf values can also change the PPS. (There is a command --stitchable to deactivate the optimization of the PPS based upon the crf value, but this doesn't help you when you have already encoded the files.)" - https://gitlab.com/mbunkus/mkvtoolnix/-/issues/2390 Edited July 31, 2022 by Hawkwinter 1
FrostByte 5185 Posted July 31, 2022 Posted July 31, 2022 I would rip with something like Makemkv then take the two remuxes and merge them with mkvtoolnix. Then if you want to reencode with x264 do it after they're combined. Sounds like reencoding with x264 before may be causing an issue if what you found is what's causing the issue. 1
Hawkwinter 11 Posted July 31, 2022 Author Posted July 31, 2022 (edited) 1 hour ago, FrostByte said: I would rip with something like Makemkv then take the two remuxes and merge them with mkvtoolnix. Then if you want to reencode with x264 do it after they're combined. Sounds like reencoding with x264 before may be causing an issue if what you found is what's causing the issue. That's definitely what I'll do going forward. I don't know if I want to go back and re-rip stuff I put on my server going back to like 2010 that way (obviously not all of which is in x264) - maybe some of it though. It would be convenient if Emby would combine files at playback if you set up their filenames properly - disappointed that's not an option. But I guess I will weigh my options and the related hassles with my old stuff. Whether that will mean re-ripping from the original discs, or (perhaps easier, this FFMPEG Re-Processing that will save my x264 settings on each keyframe rather than only at the beginning), or just saying 'screw it' and leaving it as-is with separate parts that don't play nicely with 'shuffle'. Thanks Edited July 31, 2022 by Hawkwinter
Hawkwinter 11 Posted July 31, 2022 Author Posted July 31, 2022 (edited) 2 hours ago, FrostByte said: I would rip with something like Makemkv then take the two remuxes and merge them with mkvtoolnix. Then if you want to reencode with x264 do it after they're combined. Sounds like reencoding with x264 before may be causing an issue if what you found is what's causing the issue. Side note: sometimes, I could see wanting to watch the parts separately when watching them in order. Maybe we want to stop after the first one. But on a 'shuffle' I would always want multi-parters to play back to back. But - neither merging the videos (with multiple sets of openings and credits) nor leaving them separate would give me 'both'. A sort of 'Smart Shuffle' like you might get in a better channel in syndication would be better than just pure random, and then you wouldn't need to edit together your multipart episodes, and you could watch them separately when watching in order. Edited July 31, 2022 by Hawkwinter
pwhodges 1717 Posted July 31, 2022 Posted July 31, 2022 8 hours ago, Hawkwinter said: What do you mean by this? Defined as separate episodes how? I simply mean the division specified by the metadata provider. 8 hours ago, Hawkwinter said: Last time I tried to join two videos the software re-encoded the whole video, which, if I need to queue it up manually and wait, several dozen times, would be impractically time consuming. If I use MKVToolnix so do it, it can do it without ReEncoding them? MKVToolNix does not - cannot - reencode. 8 hours ago, Hawkwinter said: Can MKVToolnix also merge the SRT files in the same folder? Most of my files that would need merging don't have SRTs, but some of them do. Yes, it can join subtitles of any supported type, as part of merging them into a stream in the video file; it can't join them while keeping them separate. 8 hours ago, Hawkwinter said: When the multi-parter is say - 2 at the end of a season, and 1 at the beginning of the next season, or 1 and 1, or 2 and 2, (a common setup in Stargate) is there a way to get it to scrape all that metadata, or would that be a "edit that metadata manually" situation? I'm a bit bemused at the idea that episodes from different seasons should be considered as one split episode (though I note that it happened once); mind you, I'm also bemused at the idea of shuffling the episodes of a story at all... 7 hours ago, Hawkwinter said: Took like 15 minutes and threw warnings "The codec's private data does not match. Both have the same length (41) but different content." and the resulting video has a bunch of visual garbage not present in the original videos. I suspect that many of us have been through the pain of discovering the importance of consistency when ripping stuff; I certainly have, and re-ripping was the fastest way to solve it. If a single (pair of?) files took 15 minutes for MKVToolNix to get through, I'd be looking at my disk performance - there's virtually no actual processing going on, so the time is entirely determined by the I/O speed. Paul
dseg30 5 Posted December 19, 2022 Posted December 19, 2022 I too would be interested in this but my use case is slightly different. My files have external srt files so doing a merge is... a bit inconvenient. I'm guessing this still isn't a thing huh? Hahaha I don't know what to do - thetvdb and wikipedia says its 6 epis but MBC/TV version, have 6 episodes. VIU/WEB version has 21 episodes. Any thoughts?
Happy2Play 9079 Posted December 19, 2022 Posted December 19, 2022 @dseg30 All we have is what TVDB/TMBD/OMDB provide us from an automated provider standpoint. If your media is in a different structure, you will more than likely have to manually create metadata and lock it. But specific examples are needed.
Luke 38528 Posted December 19, 2022 Posted December 19, 2022 @dseg30 can you please show us a specific example? Thanks.
dseg30 5 Posted December 20, 2022 Posted December 20, 2022 So https://thetvdb.com/series/queen-of-the-ring shows as just 6 episodes. https://mydramalist.com/21312-queen-of-the-ring/episodes Shows it as 21 episodes. The place that I got had it as the 21 episodes. It's like the tvdb is putting the first 3 together as one episode. it's fine. i just figured if there was an easier way then to have to convert. its fine. I just didn't know if this was a feature that was being worked on before I start going through the pain hahaha
Happy2Play 9079 Posted December 20, 2022 Posted December 20, 2022 @dseg30 No easy answer here as all provider list as 6 episodes (TVDB, TMDB, TVMAZE) Only TVMAZE gives you the merges episodes numbers. Queen of the Ring - Episode List | TVmaze In the end you would have to manually curate metadata for 21 episodes version. Or someone would have to add this additional order to TVDB or TMDB but still an issue as Emby still currently does not support Alternate order from TVDB or additional orders on TMDB. 1
Luke 38528 Posted January 9, 2023 Posted January 9, 2023 16 minutes ago, dseg30 said: yeah I figured I was screwed. Hahaha. thanks! Has this helped you resolve it?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now