MCEBuddy Custom Cuts and Subtitles

Great! Thank you for your assistance. I have provided the files for your review here:!AgSt7TEEAf8En7Iw5bedZw2Xjl4D7A?e=VAJvqg

Please let me know if there is any further information or articles you require to further troubleshoot/debug this issue.

I’m a little confused here. According to the log file you attached above, it shows a TS file converted to M4V and there was no subtitle tracks embedded into the final M4V file as I pointed out from the logs above.

However, the M4V file you’ve uploaded has a subtitle track embedded and I can play it back. So, what file did you upload?

Apologies for the delay here, @RBoy. I was out of town and got back in yesterday, and was able to upload more information for you this morning.

To reiterate, there are two conversions occurring within the scenario we’re discussing here:

  1. (Referenced as First) .ts -> .m4v. MCEBuddy performs this conversion either when Plex performs post-processing or by adding a .ts file directly to MCEBuddy’s queue. Each time this particular conversion occurs, it works exactly as expected: the file gets converted and subtitles are embedded within the resulting .m4v file. Note that Extract closed captions and subtitles was not needed for this to work as such. FWIW, when I say “embedded” subtitles, I mean that they are in the resulting .m4v file and I can see them if I copy this .m4v file into a new directory altogether and probe it via Handbrake:
  2. (Referenced as Second) .mv4 -> .mv4 With this conversion, I am taking the output of the First conversion (which has embedded subtitles within it), using Custom Cuts to create the .edl file, and then further using Process with MCEBuddy to send it to MCEBuddy’s queue. While the input from First does have embedded subtitles, these subtitles never make it into the output of this Second conversion task, whether using Extract closed captions and subtitles or not.

As mentioned earlier, I have uploaded an additional example of this scenario created from scratch into the shared folder above (in addition to archiving the previous example). In the shared folder above, there should now be a total of three folders:

  1. .Archive has the files from before. You can ignore this as it only exists for history purposes.
  2. First contains the input (.ts), outputs (.m4v) as well as the .log file from the First conversion described above. That is, this is the .ts -> .m4v conversion that works as expected, resulting in embedded subtitles. The outputs from this conversion were then copied into a new folder and utilized as inputs for the next (Second) conversion task:
  3. Second contains the outputs of the Second conversion outlined above. That is, this is the .m4v -> .m4v conversion along with its .log file as a result of using Custom Cuts. This folder contains the resulting .m4v file that is encountering the issue of subtitles not being embedded at all.

All told, you should see that First\NFL Football - S2019E2069 - Kansas City Chiefs at Detroit Lions.m4v contains embedded subtitles, whereas Second\NFL Football - S2019E2069 - Kansas City Chiefs at Detroit Lions.m4v does not.

Please let me know if there is any further information I can provide to further assist.

I wanted to check in with this issue. Please let me know if there is any further information that I can provide to assist towards diagnosing and/or solving it. It would also be valuable to know if the information I have provided is useful and/or you have been able to reproduce the issue on your end with the provided data. Thank you!

I see from the logs that it failed to add the subtitles to your file:

–> Process exited with code -1073741515

When I tried to replicate it here with your settings and original M4V file, it worked just fine:

2019-10-16T13:53:27 MCEBuddy.AppWrapper.MP4Box --> ISO File Writing: |====================| (100/100)
2019-10-16T13:56:29 MCEBuddy.AppWrapper.MP4Box -->
–> Process exited with code 0
2019-10-16T13:56:38 MCEBuddy.Engine.ConversionJob --> Finished adding subtitles and chapters to file, file size [KB] 10,283,663.00

There’s some issue with your setup which is preventing MP4Box from adding the subtitles. I see that you have enough space so I don’t really know. All I can say is try a different hard drive for your temp folder or a different computer.

OK cool thank you for your assistance and reply, @RBoy… I’m still trying to understand the different settings here, so please bear with me. In the First conversion task I also see this same error code by MP4Box but it happens to embed the subtitles as expected in this task.

I was also under the impression that Handbrake is used to embed subtitles as well, so not 100% certain that MP4Box is the culprit here (or at least do not understand it as of yet). A lot of moving pieces here for sure. :sweat_smile:

Handbrake is used to burn subtitles (not embed).

MP4Box is the last step in the process to embed the subtitles, the logs show there is no subtitle in the file after it finishes, so that’s where the issue lies. I’m not sure why, like I said your file and profile works fine here. You can try a different hard disk/computer and see if that helps.

I had another look at your logs, in the first case the subtitles were part of the TS stream stored as closed captions. You were using a custom profile which instructed handbrake to use those built in closed captions and preserve them, which is why it worked:

2019-09-27T08:19:21 MCEBuddy.AppWrapper.Handbrake --> + subtitle tracks:
2019-09-27T08:19:21 MCEBuddy.AppWrapper.Handbrake --> + 1, español, Closed Caption [CC608]

One thing you can try is, enable the Skip remuxing option in the expert settings which will allow handbrake to work directly on the original M4V file instead of the remuxed TS file in the second case, it may detect the built in subtitles and work with it.

Ah, so to make sure I understand, are you saying that the logs are saying the subtitles are not embedded, but they actually are in the resulting file? I can open First\NFL Football - S2019E2069 - Kansas City Chiefs at Detroit Lions.m4v in either Handbrake or VLC and see the subtitles embedded there as a result of the first conversion task. Again, the log file for this task contains the same error code found in that log file as with Second that you mentioned earlier.

Unfortunately, I do not have another machine/environment readily available to try this out on so will have to see if I can get it working with the current configuration if at all possible.

In the first conversion, your original file is a TS file which contains closed captions. MCEBuddy extracts those closed captions as a SRT file but it fails to embed them since MP4Box fails.

However you have a custom profile and in your profile you instruct handbrake to look for closed captions while converting, it finds those muxed closed captions in the TS stream and automatically converted them into an embedded SRT file.

During the second conversion you start with a M4V file which the embedded SRT file, MCEBuddy extracts the SRT file and remuxes the M4V to a TS format for processing (which doesn’t contain any subtitles or closed captions), hence when it reaches handbrake it doesn’t detect anything and when mcebuddy tries to eventually put those subtitles back into the container it’s failing on your setup.

You have three options:

  1. Try a different computer where MP4Box doesn’t fail (it’s working here on Windows 10, 64bit)
  2. Enable the Skip remuxing option for your second conversion task (this way MCEBuddy won’t remuxed the M4V into TS and when handbrake gets the original M4V it may be able to detect the embedded SRT file and preserve it)
  3. Modify your profile for the second conversion to instruct handbrake to use the SRT file that’s extracted by MCEBuddy along with the remuxed TS file in the temp folder and embed it into your converted M4V. Try adding --srt-file <source_without_ext>.srt to your profile handbrake-video line. See inserting special commands for details on how <source_without_ext> works.
1 Like

Ok! That makes sense to me now, @RBoy. Thank you for taking the time and having the patience to explain this to me. I believe I have enough now to take the next steps. I will try seeing if I can get the --srt-file command working, and if not, see if I can figure out what’s going on with the machine spitting out the MP4Box error.

Thanks again to you and everyone there for your great work with this product and – even more importantly – for supporting it! :+1:

1 Like

You’re welcome, take a minute to help us spread the word

1 Like

So funny thing along the way to trying things out here. :sweat_smile: I was reviewing this thread and it seems I have missed your earlier post, and this subsequent suggestion.

I did try creating a new conversion task with SkipRemux=True. When I attempt to run it on the .m4v from the first task, it does seem that the subtitles are exported correctly, horray! However, it doesn’t seem to respect the .edl that was created from Custom Cuts, boo.

So, I wanted to see if there is anything obvious to consider here. What I like about this approach is that I can turn off the Extract closed captions and subtitles option and save myself an extra file hanging around with each conversion.

Check that ad detection is NOT set to none in your conversion task. You can search for EDL in the logs to see what’s going on.

Ahhhh… hello darkness my old friend.

INFORMATION> 2019-10-22T14:10:04 MCEBuddy.CommercialScan.Remover --> MP4Box: Cutting commercials from video - segment 0
2019-10-22T14:10:04 MCEBuddy.AppWrapper.MP4Box --> Launching process C:\Program Files\MCEBuddy2x\mp4Box\mp4box.exe
2019-10-22T14:10:04 MCEBuddy.AppWrapper.MP4Box --> Process arguments  -keep-all -keep-sys -splitx 0:404.185 -out "C:\Program Files\MCEBuddy2x\working0\NFL Football - S2019E2111 - Minnesota Vikings at Detroit Lions_0_404.m4v" "C:\Program Files\MCEBuddy2x\working0\NFL Football - S2019E2111 - Minnesota Vikings at Detroit Lions.m4v"
2019-10-22T14:10:04 MCEBuddy.AppWrapper.MP4Box --> UI Session Admin Process : False
2019-10-22T14:10:04 MCEBuddy.AppWrapper.MP4Box --> Setting process priority to Normal
--> Process exited with code -1073741515

Looks like I am going to need to figure out my ol’ nemesis -1073741515 here on my side regardless. I will update accordingly if I can defeat this beast.

Thanks again for your helpful guidance. :+1:

Looks like I needed to install some missing dependencies.

There’s this puppy here:

And then this one from GPAC’s version of MP4Box:

Is there a reason these dependencies are not installed by MCEBuddy by default? FWIW I uninstalled my previous version of MCEBuddy and upgraded to the latest version (October 19th) and was still unable to run MP4Box until I installed the above.

Thank you for any consideration.

1 Like

Will look into it.

1 Like

Great! Thanks you much. FWIW I did finally get SkipRemux=True working. While the -converted.mp4 in the temporary working0 folder did get subtitles, the resulting, final .m4v did not. :disappointed:

However, now that MP4Box works as expected on my machine, I am able to use the .srt as expected now, without the use of the --srt-file paramater (but still useful to know about just in case).

So, problem solved. Finally. :laughing:

FWIW I finally got around to it:

As an aspiring app/service developer myself, I fully respect the work you put into this thing. Envious, even. :blush:

This has been addressed in today’s build, it’ll install the VC 2015 dependency during setup.

1 Like