Jump to content

Movie runtime data question


Recommended Posts

TomTiddler
Posted

I recently went thru my Blurays and re-ripped them to .mkv's in order to simplify some issues with replay on multiple devices. In doing so, I came across a couple of mysteries :-)

 

1) The "date added" field doesn't seem to reflect the actual date I did the rip. Where exactly does this data item come from? It seems to match the "date created" field associated with the folder containing each movie. My folder structure for the library is ...

 

...Blurays->

...................Movie name 1 ->

...............................................Movie name.mkv

...................Movie name 2 ->

...............................................Movie name.mkv

 

etc.

 

 

2) The "runtime" field associated with the movies is not always present. Again, where does this item come from, as in who determines it?

 

I've attached a "report" file for the library in question in .CSV format. All files were ripped from BluRays using CloneBD; all rips are 1920x1080, all are H264; the audio (as shown) is either AC3 or AAC. There seems to be no rhyme or reason as to what causes the "no runtime" phenomenon. All the files play just fine, although the lack of a runtime causes some issues with Roku playback (for instance fast forward, and "play from scene" simply don't work).

 

As always, any help would be much appreciated.

ReportExport of BluRay movie rips.txt

Happy2Play
Posted

1) What is your setting in Library-Advanced-Date added behavior for new content

 

2) Runtime comes from when ffmpeg gets all the media info.

Posted

Good day,

 

Regarding run time matters, maybe this thread can give some head up matters:

 

https://emby.media/community/index.php?/topic/44139-edit-runtime-metadata/

 

Regarding creation it the time you convert the bluray to mkv with whatever app you use. If you want to control or edit the creation time for a media use something like:

 

Attribute Changer

 

Or any other free util, also make sure you select the right option at the emby dash:

 

Library - Advanced.

 

My best

TomTiddler
Posted

Replies to all, in sequence ..

 

@@Happy2Play - 1) "Date scanned into library"

                           2) And when does ffmpeg get that info? Is it part of the library scan? What might cause ffmpeg to not extract run-time correctly?

 

@@Abobader - 1) This sounds like a good solution, I'm guessing if I removed the library, and recreated it with "complete" movies, all would work correctly? I'll give it a try.

                       2) It looks very much like it's using the "Date modified" field of the folder containing the movie, not the "Date modified" of the actual .mkv file. When I re-rip an existing movie, the folder structure​ doesn't change, so the "Date modified" doesn't change for the folder, nor does "Date created". The contents of the .mkv file do change, so the "Date modified" changes for the file, but the "Date created" doesn't. This is why I always specify "Date scanned into library", and do regular library scans. And yes, this seems to be an issue with Windows file systems in a whole load of places, not just Emby :-)

 

 

As always, many thanx for the rapid responses and good suggestions, one day I might end up being the guy that helps others, instead of always asking for advice.

TomTiddler
Posted

OK, so I removed the library, ran "Clean Database" task, and then added the library again (with no "incomplete" movie files). Still got lots of no-run-time movies. How can I a) find out what causes ffprobe to fail, and B) fix it?

TomTiddler
Posted

Luke, I didn't include server logs becuse they don't contain anything obvious except a whole bunch of  "Stopping chapter extract for ... because a chapter was found with an endpoint greater than the runtime". Not really surprising, since this occurs only for movies that don't have a run time!! presumably because ffprobe didn't provide one. Also, there are no transcode logs generated from the library scan, and no "invocation" entries for ffprobe in the server logs. Should I be enabling debug logs?

Happy2Play
Posted

Have you tried Refreshing a movie missing runtime?  This should reprocess the file and you should see any errors in the log when you do the Refresh.

TomTiddler
Posted

Just tried that, I've attached the last section of the server log. The movie was "Boyhood", there's no sign of attempting to invoke ffprobe, and no transcode log produced (probably correct?). As expected, the only seemingly related line is "chapter extraction stopping for Boyhood .........". Oh, and the runtime value didn't change.

Happy2Play
Posted

No attachment.

Posted

Hi, as mentioned in my link in post #6, please make sure to always attach complete log files as opposed to fragments. thanks !

TomTiddler
Posted

Got it Luke, however in this case (and maybe only in this case), the piece preceeding the fragment consisted of endless repetitions of me restarting the server, Didn't think you'd find that interesting, my bad.

 

My relatively simple questions are still hanging out there, viz: 1) At what point is the movie runtime determined?, 2) Can I force a recomputation of the runtime? 3) and if so, how?

 

Re-reading this it sounds a little pissy, not intended I assure you, just trying to be brief :-)

Happy2Play
Posted

Do you have Debug logging enabled?  It appears you don't see ffprobe unless it is enabled.  Once you enable it you have to restart the server.

 

A Refresh forces a re-probe.  Are you performing a library scan to reflect the changes a Refresh would have made?

 

If you are not seeing an update, you will have to provide specific examples of the wrong information.

TomTiddler
Posted

Happy2Play: Thanx for that, no I didn't have Debug log enabled, plus I've been out of town all day. I'll try again tonite and post the log. For the record I've tried refresh on the whole library; refresh on a single movie; library scan; clean database followed by library scan; and lastly - remove library then add library. None of these produced valid runtimes on all movies.

 

Stay tune, and thanx for the help.

TomTiddler
Posted

OK - enabled debug logs, restarted server, triggered refresh on Jack Reacher Never Look Back. Full log attached.

server-63621656046.txt

TomTiddler
Posted

Just so you know where I'm at - I enabled debug log, restarted server, removed library, added library. Checked the log and extracted the ffprobe calls for a "successful" probe, and an "unsuccessful" probe (i.e. one resulting in a runtime, and one without), and then ran these commands manually. Looks like I will need to talk to the CloneBD guys :-). Sorry to have quizzed everyone here for this, but at least once I get the answer, I'll post it back here for anyone else using CloneBD.

 

Thanx for all the help and pointers.

Posted

I'm curious, what did the manual runs of ffprobe produce?

TomTiddler
Posted

Sorry Luke, I should have included the runs, they're attached. In the fail case, Duration and bitrate are both "N/A", I don't know why, but it's clearly a result of CloneBD's output, so I'll talk to those guys.

fail.txt

succeed.txt

Posted

Ah yes thanks. maybe it writes bad headers.

TomTiddler
Posted

Just a quick follow up - So, I did a couple of experiments, and it turns out @@Happy2Play was (of course) right again. The real key appears to be 1) Disable real-time monitoring, and 2) have CloneBD (or whatever you use to copy) process to a non-library directory, then move the whole file/directory to the library, then 3) Scan Library. This is working 100% of the time.

 

Now to the interesting part, if a library scan is done on a partially copied file (in the case of MKV), then not only does the resulting file have a zero duration/run length, but (maybe more importantly) nothing I was able to do within Emby could force it to change that value! I tried refreshing the movie, refreshing the library, new library scan, clean database followed by library scan. I even tried move the file out of the library; reboot the whole machine; clean the database; move the file back to the library; then scan library. Nope! This strongly suggests that "something" was placed in the file during the scan attempt, which confuses any subsequent attempt to extract a duration/run length. I confess that I'm a little surprised that the file is not locked by CloneBD while open for write, or that Emby (or ffmpeg) does not check if the file is already open for write. Maybe worth a small amount of investigation? Either way, I now have a process that works reliably, so I'm happy.

Posted

Hi, refreshing from the detail screen will force a refresh. A library scan won't because it's only looking for changes based on file timestamps. Thanks for reporting back.

TomTiddler
Posted

Luke thanx for the clarifaction, I hadn't realized the distinction. I, of course, tried both and neither worked. :) 

Posted

I'm guessing it probably hadn't completed yet. 

TomTiddler
Posted

No, the ffprobe command will always fail after whatever happens to a file if it is scanned/probed/refreshed while it is still being created. Since it's avoidable, it's not too bad, just one of those little things that bothers my OCD :) 

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...