SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Customizations
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV Customizations This forums is for discussing and sharing user-created modifications for the SageTV application created by using the SageTV Studio or through the use of external plugins. Use this forum to discuss customizations for SageTV version 6 and earlier, or for the SageTV3 UI.

Reply
 
Thread Tools Search this Thread Display Modes
  #221  
Old 02-07-2014, 08:42 AM
nyplayer nyplayer is offline
SageTVaholic
 
Join Date: Sep 2005
Posts: 4,997
Quote:
Originally Posted by coppit View Post
Questions:
- that's equivalent to using the "rescan imported media" menu item under setup, right?
- it also requires that I install jetty or one of the other plugins, right?

I manually did the "rescan imported media" and still ended up with my encoded recordings moved from the recordings section to the videos section.

I think I figured it out. I did an experiment where I did this:
- I copied the file, changed the extension to mkv, then used "touch" to make sure it had the same timestamp.
- I copied the file, changed the extension to mkv, used "touch" to make sure it had the same timestamp, removed the show ID, and inserted spaces between the words in the name.
- I put the letter "s" in the middle of the show ID in name of the original mpg file.

All three worked, so apparently the timestamp is what SageTV uses to identify the recording.
The timestamp is not what Sage uses to Identify a recording it use the ID of the file. By touching it or changing the name what you did was force Sage to rescan the file.

Here is a batchjob that I use I make sure that the CMT plugin has created a properties file. It has never failed me. What I did was download the latest HandBrake which uses constant quality which is better than bitrate. I copied the Handbrake files into "%shrinkpath%\mediaEngineBins\HandBrake 9.4"

Code:
set shrinkpath=C:\MediaShrink

if exist "%~d1%~p1%~n1.tmp" copy "%~f1.properties" "%~d1%~p1%~n1.mkv.properties"
if exist "%~d1%~p1%~n1.tmp" del "%~f1"
if not exist "%~f1" if exist "%~d1%~p1%~n1.tmp" move "%~d1%~p1%~n1.tmp" "%~d1%~p1%~n1.mkv"
if exist "%~d1%~p1%~n1.tmp" exit 1
if exist "%~d1%~p1%~n1.mkv" exit 0
move "%~f1" "%~d1%~p1"
set checkuse=%ERRORLEVEL%
if %checkuse% NEQ 0 exit 1
if exist "%~f1.properties" findstr.exe /I /C:"CMT Metadata" "%~f1.properties"
set CMTERR=%ERRORLEVEL%
if %CMTERR% NEQ 0 exit 1
if not exist "c:\temp" md "c:\temp"
if exist "%~d1%~p1tmpEncode\%~n1.encoded.mkv" del "%~d1%~p1tmpEncode\%~n1.encoded.mkv"
md "%~d1%~p1tmpEncode"
cd "%shrinkpath%\mediaEngineBins\HandBrake 9.4"
c:
start /BELOWNORMAL /I /B /W HandBrakeCLI.exe -i "%~f1" -o "%~d1%~p1tmpEncode\%~n1.encoded.mkv"  --preset "Normal" -w 720
set shrinklevel=%ERRORLEVEL%
if %shrinklevel% NEQ 0 DEL "%~d1%~p1tmpEncode\%~n1.encoded.mkv"
if %shrinklevel% NEQ 0 EXIT %shrinklevel%
if %shrinklevel% EQU 0 if exist "%~d1%~p1tmpEncode\%~n1.encoded.mkv" move "%~d1%~p1tmpEncode\%~n1.encoded.mkv" "%~d1%~p1tmpEncode\%~n1.mkv"
if %shrinklevel% EQU 0 if exist "%~d1%~p1tmpEncode\%~n1.mkv" "%shrinkpath%\mediaEngineBins\touch.exe"  -r "%~f1" "%~d1%~p1tmpEncode\%~n1.mkv"
if %shrinklevel% EQU 0 move "%~d1%~p1tmpEncode\%~n1.mkv" "%~d1%~p1"
if %shrinklevel% EQU 0 if exist "%~d1%~p1%~n1.mkv" copy "%~f1.properties" "%~d1%~p1%~n1.mkv.properties"
if %shrinklevel% EQU 0 if exist "%~d1%~p1%~n1.mkv" DEL "%~f1"
if exist "%~f1" move "%~d1%~p1%~n1.mkv" "%~d1%~p1%~n1.tmp"
if exist "%~f1" exit 1
"%shrinkpath%\mediaEngineBins\wget.exe" --delete-after --tries=3 --directory-prefix="C:\MediaShrink\mediaEngineBins" "http://user:password@servername:8080/sage/GlobalCommand?command=UpdateMediaLibrary"
if exist "%~d1%~p1%~n1.mkv" exit 0
__________________
Channels DVR UBUNTU Server 2 Primes 3 Connects TVE SageTV Docker with input from Channels DVR XMLTV and M3U VIA Opendct.

Last edited by nyplayer; 02-07-2014 at 08:48 AM.
Reply With Quote
  #222  
Old 02-10-2014, 08:45 AM
coppit coppit is offline
Sage Advanced User
 
Join Date: Mar 2003
Posts: 176
Thanks nyplayer, but that's not working for me. I wonder if it's because my recordings are on a network drive that's Linux underneath?

Anyway, MediaShrink does the right thing (somehow), so I guess I'll stick with that.

Question: My bat file command has these options:

Code:
start "MediaShrink" /B /LOW /WAIT mediaShrink.exe %COMMAND% /handbrakeProfile "Normal" /inPlace /vProfile HQ /xRes 1280 /decomb /autoCrop /acodec lame /cutComm
However, my videos are still coming out 1920x1080, interlaced, with AAC audio. Does anyone know what the issue might be? I replaced the handbrakecli.exe binary, if that matters.

I've attached part of an autoencode log for an encoding that's going on right now. I don't see options being passed to handbrake.
Reply With Quote
  #223  
Old 02-10-2014, 10:38 AM
nyplayer nyplayer is offline
SageTVaholic
 
Join Date: Sep 2005
Posts: 4,997
Quote:
Originally Posted by coppit View Post
Thanks nyplayer, but that's not working for me. I wonder if it's because my recordings are on a network drive that's Linux underneath?

Anyway, MediaShrink does the right thing (somehow), so I guess I'll stick with that.

Question: My bat file command has these options:

Code:
start "MediaShrink" /B /LOW /WAIT mediaShrink.exe %COMMAND% /handbrakeProfile "Normal" /inPlace /vProfile HQ /xRes 1280 /decomb /autoCrop /acodec lame /cutComm
However, my videos are still coming out 1920x1080, interlaced, with AAC audio. Does anyone know what the issue might be? I replaced the handbrakecli.exe binary, if that matters.

I've attached part of an autoencode log for an encoding that's going on right now. I don't see options being passed to handbrake.
In my testing I had problems with /handbrakeProfile "Normal" I just removed it for some reason it would disable all the other commands. By default it should use the normal.

PS if you updated to the latest HandBrakeCli you need to make the change in the post below.
http://forums.sagetv.com/forums/show...&postcount=204
__________________
Channels DVR UBUNTU Server 2 Primes 3 Connects TVE SageTV Docker with input from Channels DVR XMLTV and M3U VIA Opendct.

Last edited by nyplayer; 02-10-2014 at 10:41 AM.
Reply With Quote
  #224  
Old 09-14-2016, 09:07 AM
DarkWolf77 DarkWolf77 is offline
Sage Advanced User
 
Join Date: Dec 2006
Posts: 169
So I have a new tuner (the HD Homerun), and found that the recordings, though they look great, are huge files, so I decided to start using mediashrink again to get them shrunken down to a more manageable size and let it play more nicely with my streaming devices as an added bonus. However, for some reason with Sage v9, I found that Sage deletes the transcoded files for some reason if I use mediashrink with the /inplace option. It sees the old file is gone then decides to delete the new one as well. Here are the logs:

Code:
Mon 8/1 14:37:00.747 [PluginEventQueue@13a4530] CD: sageEvent: MediaFile cleanup successful Channel 10-1
Mon 8/1 14:37:11.162 [ThreadMonitor@a614a4] Top 10 Cumulative CPU(sec) PooledThread:24 16197998@qtp-27218321-2:22 13425866@qtp-27218321-7:12 XcodeStderrConsumer:10 main:5 PooledThread:2 Timer-4:1 Seeker:1 LuceneShowTransactionTask:1 LucenePersonTransactionTask:1
Mon 8/1 14:37:11.163 [ThreadMonitor@a614a4] Top 10 %CPU (last 300s) 16197998@qtp-27218321-2:2% XcodeStderrConsumer:1%
WARN - File deleted: E:\SageTV\20495_10-1_0801_1431-0.aspects
WARN - File deleted: E:\SageTV\20495_10-1_0801_1431-0.autoEncode.(1).log
WARN - File deleted: E:\SageTV\20495_10-1_0801_1431-0.edl
WARN - File deleted: E:\SageTV\20495_10-1_0801_1431-0.log
WARN - File deleted: E:\SageTV\20495_10-1_0801_1431-0.logo.txt
WARN - File deleted: E:\SageTV\20495_10-1_0801_1431-0.mp4
Any ideas for workarounds for this?
Reply With Quote
  #225  
Old 09-14-2016, 03:51 PM
BobPhoenix BobPhoenix is offline
SageTVaholic
 
Join Date: Oct 2004
Posts: 3,152
Quote:
Originally Posted by DarkWolf77 View Post
So I have a new tuner (the HD Homerun), and found that the recordings, though they look great, are huge files, so I decided to start using mediashrink again to get them shrunken down to a more manageable size and let it play more nicely with my streaming devices as an added bonus. However, for some reason with Sage v9, I found that Sage deletes the transcoded files for some reason if I use mediashrink with the /inplace option. It sees the old file is gone then decides to delete the new one as well. Here are the logs:

Code:
Mon 8/1 14:37:00.747 [PluginEventQueue@13a4530] CD: sageEvent: MediaFile cleanup successful Channel 10-1
Mon 8/1 14:37:11.162 [ThreadMonitor@a614a4] Top 10 Cumulative CPU(sec) PooledThread:24 16197998@qtp-27218321-2:22 13425866@qtp-27218321-7:12 XcodeStderrConsumer:10 main:5 PooledThread:2 Timer-4:1 Seeker:1 LuceneShowTransactionTask:1 LucenePersonTransactionTask:1
Mon 8/1 14:37:11.163 [ThreadMonitor@a614a4] Top 10 %CPU (last 300s) 16197998@qtp-27218321-2:2% XcodeStderrConsumer:1%
WARN - File deleted: E:\SageTV\20495_10-1_0801_1431-0.aspects
WARN - File deleted: E:\SageTV\20495_10-1_0801_1431-0.autoEncode.(1).log
WARN - File deleted: E:\SageTV\20495_10-1_0801_1431-0.edl
WARN - File deleted: E:\SageTV\20495_10-1_0801_1431-0.log
WARN - File deleted: E:\SageTV\20495_10-1_0801_1431-0.logo.txt
WARN - File deleted: E:\SageTV\20495_10-1_0801_1431-0.mp4
Any ideas for workarounds for this?
Based on the files deleted it looks like you have Commercial Detector setup and that is deleting your files. When you use MediaShrink you could disable it and then enable it after your done with MediaShrink as a work around. Also check that you have .mp4 configured in Commercial Detector as a media file it looks like you don't and just correcting that may fix your problem. At least I think that is a configurable option in Commercial Detector anyway.
__________________
"Keep your goals away from the trolls"
Reply With Quote
  #226  
Old 09-15-2016, 09:00 AM
DarkWolf77 DarkWolf77 is offline
Sage Advanced User
 
Join Date: Dec 2006
Posts: 169
Yeah that was my first thought too, so I ran it by tmiranda, and he said that it looked like something in the Sage core was doing it, and not CD. (Refer:
Comskip Detector deleting converted recordings)
Reply With Quote
  #227  
Old 09-15-2016, 03:23 PM
BobPhoenix BobPhoenix is offline
SageTVaholic
 
Join Date: Oct 2004
Posts: 3,152
Quote:
Originally Posted by DarkWolf77 View Post
Yeah that was my first thought too, so I ran it by tmiranda, and he said that it looked like something in the Sage core was doing it, and not CD. (Refer:
Comskip Detector deleting converted recordings)
Sage does NOT delete anything but media files as far as I know. Now Sage could have deleted the media file and then CD deleted the now orphaned other files but based on the order in your post the media file MP4 was the last file to be deleted. So unless you have something else (maybe mediashink itself) deleting files other than the media file it has to be CD doing the non media files at least.

Is this being done on files in a recording folder? If so I would move them to an imported folder FIRST before trying to shrink them. Then the media files should be safe from anything in the core. It only deletes things from recording folders - again as far as I know.
__________________
"Keep your goals away from the trolls"
Reply With Quote
  #228  
Old 09-26-2016, 01:13 PM
DarkWolf77 DarkWolf77 is offline
Sage Advanced User
 
Join Date: Dec 2006
Posts: 169
Quote:
Originally Posted by BobPhoenix View Post
Sage does NOT delete anything but media files as far as I know. Now Sage could have deleted the media file and then CD deleted the now orphaned other files but based on the order in your post the media file MP4 was the last file to be deleted. So unless you have something else (maybe mediashink itself) deleting files other than the media file it has to be CD doing the non media files at least.

Is this being done on files in a recording folder? If so I would move them to an imported folder FIRST before trying to shrink them. Then the media files should be safe from anything in the core. It only deletes things from recording folders - again as far as I know.
Yeah, the recordings folder. Strangely, I remember it worked fine a while ago then started doing this at some point after moving to v9, but who knows what actually caused it since a lot has changed on the system since then. (v9 isn't the only change).
Reply With Quote
  #229  
Old 10-05-2016, 07:05 PM
phelme's Avatar
phelme phelme is offline
Sage Icon
 
Join Date: Dec 2006
Posts: 1,151
I'm still using MediaShrink along with SJQ. I happened to look in my MediaShrink folder today and I found thousands of files that have names that start with OCL. Something like this:

OCL4EB2.tmp
OCL2B30.tmp
OCLE82A.tmp

etc.

There appears to be one created for each time I run MediaShrink (I have SJQ compress all new recordings ever night just because). These files are all 0 bytes in size. Based on file dates this started happening back in March of this year. I don't remember changing anything myself to cause this.

Any idea what's creating these? OCL seems very specific to something. Thx.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Utility: Web Radio and TV Encoder michaeldjcox SageTV Customizations 858 02-27-2021 10:26 PM
(Old) MediaShrink - An HTPC focused encoder evilpenguin SageTV Customizations 603 04-26-2010 08:05 PM
Bring focused item to front and call fanart PLUCKYHD SageTV Studio 0 04-08-2009 07:38 AM
Get currently focused widget? cncb SageTV Studio 3 05-01-2008 12:22 PM
God does not want me to have HTPC, more problems - network encoder stryker SageTV Software 2 02-03-2008 08:54 AM


All times are GMT -6. The time now is 06:25 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.