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
  #181  
Old 02-21-2011, 01:38 PM
nyplayer nyplayer is offline
SageTVaholic
 
Join Date: Sep 2005
Posts: 4,997
EP,

Another thing to consider on your next release... I noticed that you do a copy from the workfolder to the destination file. If you do a move it will save bandwidth, if you are not using a central workfolder. Plus a move happens right away less chance of failure.
__________________
Channels DVR UBUNTU Server 2 Primes 3 Connects TVE SageTV Docker with input from Channels DVR XMLTV and M3U VIA Opendct.
Reply With Quote
  #182  
Old 03-13-2011, 08:52 PM
Korny Korny is offline
Sage Advanced User
 
Join Date: Nov 2010
Location: Minnesota
Posts: 87
Does Mediashrink have the ability to detect which audio track is largest(typically english) and use it by default. I'm working on a Linux bash script that will do a lot of the same things as mediashrink using Linux command line and WINE for comskip but the biggest problem I'm having is one of my TV channels can't decide which channel to put the english audio track on. So sometimes in ffmpeg I can do map 0:0 and map 0:1 which will result in the first file its not always the english file if that makes sense.
Reply With Quote
  #183  
Old 04-05-2011, 02:03 PM
Biggen Biggen is offline
Sage Advanced User
 
Join Date: Sep 2010
Posts: 248
How do I use the /inPlace command if I want to use the "drag & drop" method? Is there any specific way it needs to be added to the .bat file?
Reply With Quote
  #184  
Old 04-14-2011, 02:12 AM
pingmustard pingmustard is offline
Sage User
 
Join Date: Nov 2008
Posts: 52
Encoded Media sometimes don't playback?

A few of my encoded videos can't be played back. I used the default MediaShrink to re-encode my dvd. Some of them play back fine, others don't... anyone else have this problem?
__________________
QuadCore Windows 7 64bit, 6GB RAM, ATI HD Radeon 5570, HDHR
SageTV 7 + Playon, Diamond, ComSkip/Playback, Shark007
Reply With Quote
  #185  
Old 04-28-2011, 08:09 AM
Thron Thron is offline
Sage User
 
Join Date: Apr 2005
Location: Orange County, Ca
Posts: 32
How do I get it to keep the same resolution as the source? Im having a hell of a time with it. The source will be 720x480, but after it goes through it will go to 640x358. Basically all of the videos are letter box.
I'm using batch mode with the following settings

start "MediaShrink" /B /LOW /WAIT mediaShrink.exe F:\temp\%NEW_FILE% /centralworkfolder f:\temp\ /handbrakeProfile "High Profile" /container mp4 /twopass /acodec ac3 /vprofile HQ /vbitrate 2500 /cutComm /tee

Any suggestions?
Reply With Quote
  #186  
Old 05-18-2011, 06:26 PM
phelme's Avatar
phelme phelme is offline
Sage Icon
 
Join Date: Dec 2006
Posts: 1,151
Anyone else having issues with NBC shows (recorded via DirecTV and an HD-PVR) having all the audio shifted to the right channel by MediaShrink? Happening to all my Community and Celebrity Apprentice shows lately.
__________________
Server: AMD 9600 Phenom on XP, Gigabyte GA-MA78GPM, 2GB RAM, 320+250+500 GB SATA drives, HDHomeRun Prime, HD-PVR x.5.1, Paterson serial
Client/Encoder:AMD 3800+ X2, 512 MB RAM, ATI X1650 XT, nMediaPC case, Hauppauge HD-PVR, Cyberlink/ArcSoft decoders, USB-UIRT
Client/Encoder: AMD 3800+ X2, 512 MB RAM, 6150 graphics, nMediaPC case, ArcSoft decoders
Client: HD300, Asus Pundit P1-AH1, AMD 3800+ X2 CPU, 1 GB RAM, 6150 graphics, ArcSoft decoders
Backup: Synology
SageTV version: FINAL
Reply With Quote
  #187  
Old 08-28-2011, 10:16 AM
BKeadle BKeadle is offline
Sage Advanced User
 
Join Date: Mar 2010
Location: Illinois
Posts: 175
Quote:
Originally Posted by evilpenguin View Post
Absolutely! Hopefully i'll have some time to look at it this weekend.
Hey EP - you posted this back in January. Is v3.0.4 still the latest version (what I could find from the DOWNLOAD link at the beginning of this thread)? Perusing here seems like there were various issues (with handbrake?) - I'm wondering if they've been resolved and if it's safe to use the latestest version.

Also, can .MKV be converted to .MP4?
(EDITED:yes, .MKV *can* be converted to .MP4 - cool)

Last edited by BKeadle; 09-04-2011 at 04:38 PM.
Reply With Quote
  #188  
Old 08-28-2011, 11:46 AM
BKeadle BKeadle is offline
Sage Advanced User
 
Join Date: Mar 2010
Location: Illinois
Posts: 175
Quote:
Originally Posted by BKeadle View Post
I'm processing a home video, and I'm getting this over and over at the end of the log:
Code:
Encoding: task 1 of 1, 100.00 %Encoding: task 1 of 1, 100.00 %Encoding: task 1 of 1, 100.00 %Encoding: task 1 of 1, 100.00 %
*** libdvdread: CHECK_VALUE failed in nav_read.c:264 ***
*** for dsi->dsi_gi.zero1 == 0 ***
I'm doing a DVD\VIDEO_TS conversion and noticed the .MP4 file continued to grow beyond 6GB - the .VOB is less than 2GB, so I figured something was awry. Tailing the 6MB log file, I see the above entry over and over again - so presumably this would continue until the disk was full! Searching this forum for that output, reveals that I posted this same thing on 5/2010 (over a year ago). So, any idea what the problem is here?
Reply With Quote
  #189  
Old 08-28-2011, 05:52 PM
BKeadle BKeadle is offline
Sage Advanced User
 
Join Date: Mar 2010
Location: Illinois
Posts: 175
Quote:
Originally Posted by nyplayer View Post
PS Also make sure in details customized "Automatically add converted videos to database" is set to YES
Where is this "details" that you mention?
Reply With Quote
  #190  
Old 09-03-2011, 03:30 PM
BKeadle BKeadle is offline
Sage Advanced User
 
Join Date: Mar 2010
Location: Illinois
Posts: 175
Quote:
Originally Posted by BKeadle View Post
Hey EP - you posted this back in January. Is v3.0.4 still the latest version (what I could find from the DOWNLOAD link at the beginning of this thread)? Perusing here seems like there were various issues (with handbrake?) - I'm wondering if they've been resolved and if it's safe to use the latestest version.

Also, can .MKV be converted to .MP4?
...BUMP...

EP, are doing any more work with MediaShrink? Specifically, incorporating HandBrake 9.5?
Reply With Quote
  #191  
Old 09-08-2011, 06:52 PM
BKeadle BKeadle is offline
Sage Advanced User
 
Join Date: Mar 2010
Location: Illinois
Posts: 175
I converted a video to .MP4 only to find that there is no audio when trying to play on my iPad. I think I understand that the iPad requires AAC audio codec instead of MP3? So I thought I could reconvert the .MP4 to .MP4 with AAC, but I get this result:
Code:
  + Adding per run options: (/inputFile "V:\Videos\LietoMe-KillerApp-1194186-0.mp4" /profile )(/inputFile "V:\Videos\LietoMe-KillerApp-1194186-0.mp4" /profile )
    + Parsing switches
      - optionsString: /inputFile "V:\Videos\LietoMe-KillerApp-1194186-0.mp4" /profile 
        - Replacing quote0: V:\Videos\LietoMe-KillerApp-1194186-0.mp4
      - Adding to to options Hash
        + Key: inputFile ()
        + Value: V:\Videos\LietoMe-KillerApp-1194186-0.mp4
      - Adding to to options Hash
        + Key: profile ()
  + Processing: inputFile = LietoMe-KillerApp-1194186-0
  + Looking for profile: 
Couldn't find encode profile:
Is this illegal? Anything more I need to know about converting videos so that they can both play on my SageTV and my iPad?
Reply With Quote
  #192  
Old 09-08-2011, 08:43 PM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,491
I think you can use the iPhone profile in the built-in Sage TV transcoder. I also have used Handbrake and I kick off the process with SJQ.
__________________
New Server - Sage9 on unRAID 2xHD-PVR, HDHR for OTA
Old Server - Sage7 on Win7Pro-i660CPU with 4.6TB, HD-PVR, HDHR OTA, HVR-1850 OTA
Clients - 2xHD-300, 8xHD-200 Extenders, Client+2xPlaceshifter and a WHS which acts as a backup Sage server
Reply With Quote
  #193  
Old 09-09-2011, 05:35 PM
BKeadle BKeadle is offline
Sage Advanced User
 
Join Date: Mar 2010
Location: Illinois
Posts: 175
Quote:
Originally Posted by wayner View Post
I think you can use the iPhone profile in the built-in Sage TV transcoder. I also have used Handbrake and I kick off the process with SJQ.
What's your source video? MP4? I think iPhone would be low resolution for my iPad.
Reply With Quote
  #194  
Old 09-09-2011, 07:26 PM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,491
True but this is changeable in the sage.properties file. Here is what I have for iDevices:

Code:
transcoder/formats/iPhone-Standard=f\=mp4;MCompressionDetails\=-coder 0 -flags +loop -cmp +chroma -partitions +parti8x8+parti4x4+partp8x8+partb8x8 -me_method umh -subq 8 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -b_strategy 2 -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -bf 0 -refs 5 -directpred 3 -trellis 1 -flags2 -wpred-dct8x8 -wpredp 0 -rc_lookahead 50 -level 13 -maxrate 768000 -bufsize 3000000 -async 50;[bf\=vid;f\=h264;br\=640000;fps\=29.97;w\=480;h\=368;arn\=4;ard\=3;][bf\=aud;f\=aac;sr\=48000;ch\=2;br\=128000;]
transcoder/formats/iPhone-Widescreen=f\=mp4;MCompressionDetails\=-coder 0 -flags +loop -cmp +chroma -partitions +parti8x8+parti4x4+partp8x8+partb8x8 -me_method umh -subq 8 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -b_strategy 2 -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -bf 0 -refs 5 -directpred 3 -trellis 1 -flags2 -wpred-dct8x8 -wpredp 0 -rc_lookahead 50 -level 13 -maxrate 768000 -bufsize 3000000 -async 50;[bf\=vid;f\=h264;br\=640000;fps\=29.97;w\=480;h\=272;arn\=16;ard\=9;][bf\=aud;f\=aac;sr\=48000;ch\=2;br\=128000;]
transcoder/formats/iPod-Fair\ Quality=f\=mp4;MCompressionDetails\=-bufsize 33554432 -g 300;[bf\=vid;f\=mpeg4;br\=500000;fps\=29.97;w\=512;h\=384;arn\=4;ard\=3;][bf\=aud;f\=aac;sr\=44100;ch\=2;br\=64000;]
transcoder/formats/iPod-Good\ Quality=f\=mp4;MCompressionDetails\=-maxrate 1250000 -bufsize 33554432 -g 300;[bf\=vid;f\=mpeg4;br\=1000000;fps\=29.97;w\=512;h\=384;arn\=4;ard\=3;][bf\=aud;f\=aac;sr\=44100;ch\=2;br\=96000;]
transcoder/formats/iPod-High\ Quality=f\=mp4;MCompressionDetails\=-maxrate 2500000 -qmin 3 -qmax 5 -bufsize 33554432 -g 300;[bf\=vid;f\=mpeg4;br\=1800000;fps\=29.97;w\=512;h\=384;arn\=4;ard\=3;][bf\=aud;f\=aac;sr\=44100;ch\=2;br\=128000;]
Change the settings to a different resolution, and create a new line called iPad and you are good to go.
__________________
New Server - Sage9 on unRAID 2xHD-PVR, HDHR for OTA
Old Server - Sage7 on Win7Pro-i660CPU with 4.6TB, HD-PVR, HDHR OTA, HVR-1850 OTA
Clients - 2xHD-300, 8xHD-200 Extenders, Client+2xPlaceshifter and a WHS which acts as a backup Sage server
Reply With Quote
  #195  
Old 09-10-2011, 05:02 PM
BKeadle BKeadle is offline
Sage Advanced User
 
Join Date: Mar 2010
Location: Illinois
Posts: 175
Excellent - thank you Wayner.

As for my "Couldn't find encode profile", actually it looks like this is for any video now. I'm not sure what broke. What does this mean? I'm unable to process via SJQ nor drag video to MediaShrink.bat or MediaShrink.exe. This is my mediaShrink.defaults.txt:
Code:
/batch /inPlace /container mp4 /saveLog /onePass /findFileRegEx "avi|mpg|mkv|mp4|mpeg|VIDEO_TS|ts|ogm|divx|mpts|dvr-ms"
Reply With Quote
  #196  
Old 09-10-2011, 08:32 PM
nyplayer nyplayer is offline
SageTVaholic
 
Join Date: Sep 2005
Posts: 4,997
This is what the original looks like. You really do not need to change the default ... all your substitutions should be done in SJQ or create a new batch job. Changing the defaults only leads to trouble as you see you removed the default profile.

Code:
/batch /onlyWhenVprj /saveLog /defaultProfile autoEncode /findFileRegEx "avi|mpg|mkv|mp4|mpeg|VIDEO_TS|ts|ogm|divx|mpts|dvr-ms"
__________________
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; 09-10-2011 at 08:40 PM.
Reply With Quote
  #197  
Old 09-11-2011, 04:28 PM
BKeadle BKeadle is offline
Sage Advanced User
 
Join Date: Mar 2010
Location: Illinois
Posts: 175
Thank you. I get confused about editing the defaults vs. passing the parameters and which takes precedence. Passed paramters take precedence over what in defaults - especially where conflict occurs?

If I create a new .bat file, where would I put my "hardcode" preferences:
Code:
 /handbrakeProfile "Universal" /container mp4
Should that go on the .EXE line, after the /tee?

Last edited by BKeadle; 09-11-2011 at 04:35 PM.
Reply With Quote
  #198  
Old 09-11-2011, 04:33 PM
BKeadle BKeadle is offline
Sage Advanced User
 
Join Date: Mar 2010
Location: Illinois
Posts: 175
Quote:
Originally Posted by BKeadle View Post
...BUMP...

EP, are doing any more work with MediaShrink? Specifically, incorporating HandBrake 9.5?
Well, I took a leap and just replace HandBrake 9.4 with HandBrake 9.5 and I see MediaShrink picks it up and uses it without incident - sa-weet!

Anyone aware of a reason *NOT* to do this?
Reply With Quote
  #199  
Old 10-11-2011, 09:22 AM
DVBtCi DVBtCi is offline
Sage User
 
Join Date: Nov 2006
Posts: 7
Request solution : Issue with conversion

Hi all,
I'm trying to convert a recording from HD-PVR (file is *.TS) to a MKV format.

When i play it with GOM or WinMediaPlayer, in action scenes, the moving object/portion of the image with have lines just as in a low quality movie.

In the conversion process, i do not want to reduce the size of the TS file but only convert it to an other format and MediaShrink does a great job. I always had problems using other tools to convert TS files.

Here are the specs of the original file (HD) :

Seems stream 0 codec frame rate differs from container frame rate: 59.94 (60000/1001) -> 29.97 (30000/1001)
Input #0, mpegts, from 'C:\Users\y\Videos\HDArthur3guerre2010-Arthur3Laguerredesdeuxmondes.ts':
Duration: 01:41:04.39, start: 0.166656, bitrate: 4615 kb/s
Program 1
Stream #0.0[0x1011], 1/90000: Video: h264, yuv420p, 720x480, 1001/30000, AR: 4:3, interlaced, 29.97 fps
Stream #0.1[0x1100](eng), 1/90000: Audio: ac3, 48000 Hz, stereo, s16, 384 kb/s

I've tried increasing the bit rate with no success
I cannot set the FPS to 59.94 as in the original file
And i do not know what else can be change to set proper screen play !
What settings may i play with that would help ?

Yours,
Reply With Quote
  #200  
Old 02-08-2012, 07:32 PM
coppit coppit is offline
Sage Advanced User
 
Join Date: Mar 2003
Posts: 176
Limiting how long HandBrake can run

Below is a script that I posted in the SJQ4 thread. My problem was that HandBrake would sometimes get "stuck", causing the mediaShrink process to never return.

This script enforces a timeout while passing the output from mediaShrink through. The feature to pass the output through while the program runs and is being timed is what makes it a little complicated. Call it as:

C:\Windows\System32\cscript.exe "C:\path\to\script.vbs" "C:\path\to\file.mpeg"

Code:
' In seconds
timeout = 1 * 60 * 60
checkInterval = 60

command = """C:\Program Files (x86)\SageTV\SageTV\MediaShrink\MediaShrink.bat"" " & WScript.Arguments.Item(0)

Set fso = CreateObject("Scripting.FileSystemObject")
tempOutFilePath = fso.GetSpecialFolder(2) & "\" & fso.GetTempName
tempErrFilePath = fso.GetSpecialFolder(2) & "\" & fso.GetTempName

Set shell = CreateObject("WScript.Shell")

redirectedCommand = command & " >" & tempOutFilePath & " 2>" & tempErrFilePath
Set oExec = shell.Exec(redirectedCommand)

WScript.StdOut.Writeline "Process has PID " & oExec.ProcessID

' Sleep a little to give the process a time to create the output files
WScript.Sleep 100

' For checking the file size
Set tempOutSizeFile = fso.GetFile(tempOutFilePath)
Set tempErrSizeFile = fso.GetFile(tempErrFilePath)
' For reading the file
Set tempOutReadFile = fso.OpenTextfile(tempOutFilePath)
Set tempErrReadFile = fso.OpenTextfile(tempErrFilePath)

oldTempOutFileSize = 0
oldTempErrFileSize = 0
startTime = Timer
timeoutExpired = False

While oExec.Status = 0 and timeoutExpired = False
  if Timer - startTime > timeout then
'    WScript.StdOut.Writeline "Timeout of " & timeout & " exceeded. Killing process and all its children"

    shell.Run "taskkill /t /f /pid " & oExec.ProcessID, 0, True

    timeoutExpired = True
  end if

  if (tempOutSizeFile.Size > oldTempOutFileSize) then
'    WScript.StdOut.Writeline "Passing through " & (tempOutSizeFile.Size - oldTempOutFileSize) & " more bytes of STDOUT"
    Wscript.StdOut.Write(tempOutReadFile.Read(tempOutSizeFile.Size - oldTempOutFileSize))
    oldTempOutFileSize = tempOutSizeFile.Size
  end if

  if (tempErrSizeFile.Size > oldTempErrFileSize) then
'    WScript.StdOut.Writeline "Passing through " & (tempErrSizeFile.Size - oldTempErrFileSize) & " more bytes of STDERR"
    Wscript.StdErr.Write(tempErrReadFile.Read(tempErrSizeFile.Size - oldTempErrFileSize))
    oldTempErrFileSize = tempErrSizeFile.Size
  end if

'  WScript.StdOut.Writeline "Waiting " & checkInterval & " more seconds. " & (timeout - (Timer - startTime)) & _
'    " seconds remain."

  WScript.Sleep checkInterval * 1000
Wend

tempOutReadFile.Close
fso.DeleteFile tempOutFilePath

tempErrReadFile.Close
fso.DeleteFile tempErrFilePath

if timeoutExpired = True then
  WScript.Quit 1
else
  WScript.Quit oExec.ExitCode
end if
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 02:44 AM.


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