HandBrake CLI options for Dirmon2 (monitoring a Windows Media Center recording folder)
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
-
- Posts: 5
- Joined: Mon Aug 10, 2015 12:28 am
HandBrake CLI options for Dirmon2 (monitoring a Windows Media Center recording folder)
I have a Windows 7 x64 system running Windows Media Center and I am wanting to compress the recordings to a more manageable size.
I am currently using Dirmon2 to pull subtitles out of these recordings ... Dirmon2 monitors the recording folder ("F:/Recorded TV") and after a recording is complete, Dirmon2 runs an instance of ccextractorwin.exe (which pulls out the subtitles and deposits an SRT file in the same directory as the original recording).
My thought was to then have Dirmon2 (which allows for command line options) to then run an instance of HandBrake to take the original .wtv file and shrink it into the default .mp4 format (the recordings are standard definition), but I'm unsure of the command line options to get this to work.
I just want to get the base functionality to work (i.e., "-i source -o destination") and then I will tweak the HandBrake settings/options as needed.
How might this work with my recording directory being "F:/Recorded TV" and then I would like to output the compressed files to "G:/Processed"?
(Not sure of the correct location for this question (Windows or CLI) so I am cross-posting. Hopefully this isn't an issue and my apologies if it is.)
I am currently using Dirmon2 to pull subtitles out of these recordings ... Dirmon2 monitors the recording folder ("F:/Recorded TV") and after a recording is complete, Dirmon2 runs an instance of ccextractorwin.exe (which pulls out the subtitles and deposits an SRT file in the same directory as the original recording).
My thought was to then have Dirmon2 (which allows for command line options) to then run an instance of HandBrake to take the original .wtv file and shrink it into the default .mp4 format (the recordings are standard definition), but I'm unsure of the command line options to get this to work.
I just want to get the base functionality to work (i.e., "-i source -o destination") and then I will tweak the HandBrake settings/options as needed.
How might this work with my recording directory being "F:/Recorded TV" and then I would like to output the compressed files to "G:/Processed"?
(Not sure of the correct location for this question (Windows or CLI) so I am cross-posting. Hopefully this isn't an issue and my apologies if it is.)
-
- Posts: 5
- Joined: Mon Aug 10, 2015 12:28 am
Re: HandBrake CLI options for Dirmon2 (monitoring a Windows Media Center recording folder)
Thanks for the response. As noted in the comment you responded to:
My apologies.
Should a CLI question only go in the CLI forum? Or should Windows-based questions that are about the CLI only go in the Windows forum? I checked the FAQ and read through the posting guidelines and didn't see this addressed. My intent wasn't to cause conflict with a double-post.(Not sure of the correct location for this question (Windows or CLI) so I am cross-posting. Hopefully this isn't an issue and my apologies if it is.)
My apologies.
Re: HandBrake CLI options for Dirmon2 (monitoring a Windows Media Center recording folder)
No worries, I locked the duplicate. In the future, just put it where you think it makes sense and if needed, a moderator can move it. This is better than duplicates. In this case, CLI is fine.
Re: HandBrake CLI options for Dirmon2 (monitoring a Windows Media Center recording folder)
If you're looking for HandBrake to add the SRT, you probably want something like:
There are additional SRT options such as --srt-codeset, --srt-lang, --srt-default, and --srt-burn. The first two control the character encoding and language, default controls whether the subs are displayed by default on playback, and burn makes the subs part of the video itself (no subtitle track). The CLI help has extended information on these options (--help).
For example: if your extractor uses UTF-8 encoding instead of latin1, your subtitles are in English, and you want them to display automatically (in players that support this):
Unless you employ some clever scripting, you'll probably end up with file names like name.wtv.mp4, which may be just fine.
Code: Select all
HandBrakeCli.exe -i "F:/Recorded TV/name" --srt-file="F:/Recorded TV/name.srt" -o "G:/Processed/name.mp4"
For example: if your extractor uses UTF-8 encoding instead of latin1, your subtitles are in English, and you want them to display automatically (in players that support this):
Code: Select all
HandBrakeCli.exe -i "F:/Recorded TV/name" --srt-file="F:/Recorded TV/name.srt" --srt-codeset="UTF-8" --srt-lang="eng" --srt-default -o "G:/Processed/name.mp4"
-
- Posts: 5
- Joined: Mon Aug 10, 2015 12:28 am
Re: HandBrake CLI options for Dirmon2 (monitoring a Windows Media Center recording folder)
Thanks for the response.
The current process I am using to pull out subtitles (running an instance of ccextractorwin.exe) is sufficient for now. I may eventually drop ccextractor and use HandBrake for subtitles too, but until I can get HandBrake to work, I need to keep ccextractor in the mix.
Once I can get HandBrake to produce smaller files that are more suitable for archival storage, then I can also use it for the subtitle piece.
But I'm not sure how to automatically call HandBrake from within Dirmon2 in a way that uses the original file name.
The current process I am using to pull out subtitles (running an instance of ccextractorwin.exe) is sufficient for now. I may eventually drop ccextractor and use HandBrake for subtitles too, but until I can get HandBrake to work, I need to keep ccextractor in the mix.
Once I can get HandBrake to produce smaller files that are more suitable for archival storage, then I can also use it for the subtitle piece.
Yes, this is one of the issues I'm having ... file names. I neglected to expound upon this in my initial post, but this is the crux of my issue. I would prefer to keep the file name of the original file but obviously it will now be smaller in size and carry a .mp4 extension. Dirmon2 will wait until a recording is complete and then it will run an instance of ccextractor (pulling out the subtitles) and then I want to run an instance of HandBrake for the making-the-file-smaller process (keeping the original file as I use them for a few weeks before eventually discarding the original for the compressed copy that is kept for long term storage).BradleyS wrote:Unless you employ some clever scripting, you'll probably end up with file names like name.wtv.mp4, which may be just fine.
But I'm not sure how to automatically call HandBrake from within Dirmon2 in a way that uses the original file name.
Re: HandBrake CLI options for Dirmon2 (monitoring a Windows Media Center recording folder)
That would be a question for the Dirmon2 support, not HB.
Re: HandBrake CLI options for Dirmon2 (monitoring a Windows Media Center recording folder)
I must have misunderstood your question. Are you not looking for help with subtitles? Or just general CLI help? Hopefully I've answered your questions; if not, please clarify and I'll try to help further.DoubleTroubleTriple wrote:The current process I am using to pull out subtitles (running an instance of ccextractorwin.exe) is sufficient for now. I may eventually drop ccextractor and use HandBrake for subtitles too, but until I can get HandBrake to work, I need to keep ccextractor in the mix.
See mduell's response.DoubleTroubleTriple wrote:I'm not sure how to automatically call HandBrake from within Dirmon2 in a way that uses the original file name.
-
- Posts: 5
- Joined: Mon Aug 10, 2015 12:28 am
Re: HandBrake CLI options for Dirmon2 (monitoring a Windows Media Center recording folder)
ccextractor doesn't require a file name element in the command line options of Dirmon2 ... whereas this is required for HandBrake, so that is why I was thinking this is something y'all might be able to help with.
This looks to be why someone created the MCEBuddy application as it does what I am ultimately after (monitors a Windows Media Center recording folder and then automatically runs HandBrake to compress the file as needed) -- but it is a bit of a clumsy solution on its own and I was hoping to get the same results through a Dirmon2/HandBrake solution directly.
Oh well. Thanks for the help.
This looks to be why someone created the MCEBuddy application as it does what I am ultimately after (monitors a Windows Media Center recording folder and then automatically runs HandBrake to compress the file as needed) -- but it is a bit of a clumsy solution on its own and I was hoping to get the same results through a Dirmon2/HandBrake solution directly.
Oh well. Thanks for the help.