SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Github Development

Notices

SageTV Github Development Discussion related to SageTV Open Source Development. Use this forum for development topics about the Open Source versions of SageTV, hosted on Github.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 12-16-2020, 03:48 PM
jvl711's Avatar
jvl711 jvl711 is offline
Sage Fanatic
 
Join Date: Jan 2004
Posts: 825
Smile SageTVTranscoder Plugin

This plugin is an updated version of the "CORE" SageTVTranscoder.exe that comes with SageTV. This version is based off of FFmpeg version 4.3.1. The project is being maintained as a fork to the FFmpeg project, so hopefully it will make it easier to upgrade to future versions.


Known Issues:
  1. Some of the built in transcoding profiles in SageTV use deprecated/removed command line arguments. You will need to add your own custom profiles at this time for the transcoding profiles that are not working.

Transcoding Profiles:

Some transcoding profiles that nyplayer posted. These will copy all audio and subtitles but transcode the video. The slower the encode the better the quality. You will need to shutdown SageTV server, and add these to the sage properties file.

Code:
transcoder/formats/MKV-H264\superfast\ MKV=f\=matroska;MCompressionDetails\=-c copy -preset superfast -c:v libx264;]
transcoder/formats/MKV-H264\veryfast\ MKV=f\=matroska;MCompressionDetails\=-c copy -preset veryfast -c:v libx264;]
transcoder/formats/MKV-H264\faster\ MKV=f\=matroska;MCompressionDetails\=-c copy -preset faster -c:v libx264;]
transcoder/formats/MKV-H264\fast\ MKV=f\=matroska;MCompressionDetails\=-c copy -preset fast -c:v libx264;]
transcoder/formats/MKV-H264\Medium\ MKV=f\=matroska;MCompressionDetails\=-c copy -preset medium -c:v libx264;]
transcoder/formats/MKV-H264\slow\ MKV=f\=matroska;MCompressionDetails\=-c copy -preset slow -c:v libx264;]
transcoder/formats/MKV-H264\slower\ MKV=f\=matroska;MCompressionDetails\=-c copy -preset slower -c:v libx264;]
transcoder/formats/MKV-H264\veryslow\ MKV=f\=matroska;MCompressionDetails\=-c copy -preset veryslow -c:v libx264;]
transcoder/formats/MKV-Remux\ MKV=f\=matroska;MCompressionDetails\=-c copy;]
FAQ:

Q: What does the SageTVTranscoder do in SageTV?
A: It is responsible for a number of different tasks:
  1. Realtime transcoding of video files that are either in an unsupported format, or because of bandwidth limitations
  2. Thumbnail generation of media files. This is how SageTV creates the thumbnail image for recordings
  3. Conversion of recordings/library content to different formats
  4. Media format detection for formats that require the external format detector. I believe that is every except for .ts/.ps, and mp3 files.

Q: Why should I care about this? Seems like this does the same thing as the original SageTVTranscoder.exe?
A: Good question, there are a number of enhancements from using the newer version of FFmpeg:
  1. Support for transcoding and encoding into h265 and other newere codecs
  2. Support for identifying newer codecs and containers
  3. Potential performance increases in all the areas SageTV utilizes the SageTVTranscoder
  4. Stability improvements because of years of bugfixes and enhancements made by the FFmpeg team

Q: How do I install this?
A: It is available under as a SageTV plugin under General. It is called SageTVTranscoder (FFmpeg) Windows x64/x32. Pick the version that is appropriate to your system.

Q: What do I do if I find an issue/bug, or have an enhancement request?
A: You are free to bring up, or discuss any issues/bugs or potential enhancements here, but I would like it if you would please enter an issue into the github repo for tracking purposes. You can do that here under issues: https://github.com/jvl711/SageTVTranscoder-FFmpeg

Q: Can I contribute to this project?
A: Why yes you can! The project is a fork of FFmpeg, and is written in C. I could use help maintaining this, and there is definitely some code I do not understand and could use assistance with. You can fork the repo and submit pull requests. You can reach out to me on the forums, patreon or github. If you are not a programmer I am sure you could help with guides and general support.

Github Link: https://github.com/jvl711/SageTVTranscoder-FFmpeg

Versions:
v1.0.0 - Initial feature complete (Beta) release
v1.0.1 - Added x32 windows build
v1.0.2 - Fixed an issue with thumbnail generation on client machine. "stv://127.0.0.1/" translated to locally accessible path.
v1.0.3 - Fixed an issue with live tv transcoding and transitioning to a new program.
v1.0.4 - Added libx265 support
__________________
Projects I am currently maintaining
SageTV Andoid Client
Media Format Parser Plugin
JavaFFmpegLibrary
SageTVTranscoder

If you like the work I am doing and would like to support it you can become a Patreon member.

Last edited by jvl711; 07-18-2021 at 06:09 PM.
Reply With Quote
  #2  
Old 12-17-2020, 11:25 AM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,413
A question regarding thumbnail generation - I believe that the thumbnail is created at an interval of something like 30 seconds after the start of the recording. Is that the case? And can this thumbnail time offset be changed by the user? In an ideal world it would be good to have the offset time be confifurable based on Show Title, just like the custom skip times plugin. For example, for sporting events you may want the thumbnail to be at 900 seconds into the recording.
__________________
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
  #3  
Old 12-17-2020, 12:43 PM
jvl711's Avatar
jvl711 jvl711 is offline
Sage Fanatic
 
Join Date: Jan 2004
Posts: 825
Quote:
Originally Posted by wayner View Post
A question regarding thumbnail generation - I believe that the thumbnail is created at an interval of something like 30 seconds after the start of the recording. Is that the case? And can this thumbnail time offset be changed by the user? In an ideal world it would be good to have the offset time be confifurable based on Show Title, just like the custom skip times plugin. For example, for sporting events you may want the thumbnail to be at 900 seconds into the recording.
Hi Wayner,

It will behave the way that SageTV does currently with thumbnail generation. I think there is a setting that you can choose the time for how far by default into a show the thumbnail is created. Any option you can configure in SageTV today should be supported...

This is attempting to be a one to one replacement of the current SageTVTranscoder, so all current functions "should" work the same.

I think it may makes sense to add something like this to the core SageTV to possibly allow the configuration on a favorite. I will tell you in my own system, that I do not even use the ones that come from SageTV. I actually pull them down from TMDB. They seem to be picked by the user base, and are a much better representation of the show.

Thanks,
Josh
__________________
Projects I am currently maintaining
SageTV Andoid Client
Media Format Parser Plugin
JavaFFmpegLibrary
SageTVTranscoder

If you like the work I am doing and would like to support it you can become a Patreon member.
Reply With Quote
  #4  
Old 12-17-2020, 02:33 PM
nyplayer nyplayer is offline
SageTVaholic
 
Join Date: Sep 2005
Posts: 4,908
I still get bad audio when testing to always transcode locally on all my devices ... It cracks and is distorted.... also when watching Comcast H264 with transcoding get no video.

Maybe somebody that has a FireTV can also test this.... see if they too suffer from distorted audio.
__________________
Windows 10 I3 Dual Core 3.0 Server, SageTV9... OpenDCT with 2 HDHRPrimes and 4 HDHRconnects for a total of 14 Tuners.

Last edited by nyplayer; 12-17-2020 at 02:54 PM.
Reply With Quote
  #5  
Old 12-17-2020, 05:07 PM
jvl711's Avatar
jvl711 jvl711 is offline
Sage Fanatic
 
Join Date: Jan 2004
Posts: 825
Quote:
Originally Posted by nyplayer View Post
I still get bad audio when testing to always transcode locally on all my devices ... It cracks and is distorted.... also when watching Comcast H264 with transcoding get no video.

Maybe somebody that has a FireTV can also test this.... see if they too suffer from distorted audio.
I just ran thru this on my server, and it seems to be working fine. Can you confirm that you have the right version of the Sage.jar. The HD fixed transcoding will only work with my patched jar file.

From reviewing the logs you sent me, it looked like SageTV was not passing the correct options.

Thanks,
Josh
__________________
Projects I am currently maintaining
SageTV Andoid Client
Media Format Parser Plugin
JavaFFmpegLibrary
SageTVTranscoder

If you like the work I am doing and would like to support it you can become a Patreon member.
Reply With Quote
  #6  
Old 12-18-2020, 08:39 AM
nyplayer nyplayer is offline
SageTVaholic
 
Join Date: Sep 2005
Posts: 4,908
Quote:
Originally Posted by jvl711 View Post
I just ran thru this on my server, and it seems to be working fine. Can you confirm that you have the right version of the Sage.jar. The HD fixed transcoding will only work with my patched jar file.

From reviewing the logs you sent me, it looked like SageTV was not passing the correct options.

Thanks,
Josh
I think that might be it I rebuilt it and did not get your Sage.jar maybe you should post your jar on the first page. There is no mention about the new jar.


Edit that was it ... maybe update your instructions that a new jar is needed and post where it can be downloaded.
__________________
Windows 10 I3 Dual Core 3.0 Server, SageTV9... OpenDCT with 2 HDHRPrimes and 4 HDHRconnects for a total of 14 Tuners.

Last edited by nyplayer; 12-18-2020 at 09:12 AM.
Reply With Quote
  #7  
Old 09-04-2021, 07:04 PM
Malfunction Malfunction is offline
Sage Aficionado
 
Join Date: Sep 2004
Location: Willoughby, Ohio
Posts: 396
Can I make entries to the transcoder list to change 480p 4:3 to 16:9? The local Comet TV has been shipping us 16:9 material in 4:3. I've told them about this several times. I'm thinking both compression and non-compression command lines.

I know I can just watch it in the right aspect ratio.
__________________
ASRock B450M Pro4 AM4 MB, Ryzen 5 2600 3.4ghz, Crucial Ballistix Gaming 32GB (2 x 16GB) DDR4-3200, EVGA GT 1030SC, WD Black NVMe SSD 250GB, 1x WD120EFAX 12TB, 1x WD80EFAX 8TB, 1x WDBH2D0040HNC 4TB, USB-UIRT, Colossus 2, WinTV-DualHD USB, Windows 11 64bit
Reply With Quote
  #8  
Old 09-05-2021, 10:57 AM
phelme's Avatar
phelme phelme is offline
Sage Icon
 
Join Date: Dec 2006
Posts: 1,143
I tried an H.265 MKV the other day through my HD300 and while it definitely was being transcoded through the plugin (x64) , the quality wasn't great and was very pixelated. The server is a 4-core AMD so should be able to handle it.

Is there something I maybe need to configure that I haven't?

I'm not sure which version I'm using so I'll have to double check that.
Reply With Quote
  #9  
Old 10-28-2021, 06:47 AM
jvl711's Avatar
jvl711 jvl711 is offline
Sage Fanatic
 
Join Date: Jan 2004
Posts: 825
Quote:
Originally Posted by phelme View Post
I tried an H.265 MKV the other day through my HD300 and while it definitely was being transcoded through the plugin (x64) , the quality wasn't great and was very pixelated. The server is a 4-core AMD so should be able to handle it.

Is there something I maybe need to configure that I haven't?

I'm not sure which version I'm using so I'll have to double check that.
I think the Server handles the transcoding for the HD300. I think it will dynamically adjust the rate based on bandwidth. I have not used the HD300 in some time since moving to 4k/h.265. Maybe someone else would have an better idea.

It is awesome to hear it is actually working. I put a lot of work trying to get to that point . I never actually tested it because I am using all android clients.
__________________
Projects I am currently maintaining
SageTV Andoid Client
Media Format Parser Plugin
JavaFFmpegLibrary
SageTVTranscoder

If you like the work I am doing and would like to support it you can become a Patreon member.
Reply With Quote
  #10  
Old 10-28-2021, 04:30 PM
KryptoNyte's Avatar
KryptoNyte KryptoNyte is offline
SageTVaholic
 
Join Date: Dec 2006
Posts: 2,719
Hmmmm. Maybe I'm going to have to start testing the HD300 at my other place, remotely, and see how it goes. I've never actually been able to get an HD300 connected remotely, so this might be interesting.
Reply With Quote
  #11  
Old 10-30-2021, 06:29 PM
pjpjpjpj pjpjpjpj is offline
Sage Icon
 
Join Date: Feb 2008
Posts: 2,159
I've been very sporadic in following this thread (life, sigh...) and I see some stuff on the prior page but not *exactly* my question...

I record OTA via HDHR (raw MPEG-2). I know this has historically caused all sorts of issues with transcoding and remote clients, and I believe somewhere I read that a solution is using OpenDCT, but I haven't followed that enough to jump into it. I believe some say it requires IJK (maybe?) but ExoPlayer is what everyone "wants" to use. I've been very busy and not able to spend a lot of time so I'd love it if this were the old-school Sage plugin compatibility of "install the plugin and it just works".

Long story short, will this plugin allow me to transcode an OTA recording from a HDHR in real time to MKV and send it to a remote client?

(to be clear, if the answer is "no" or "not yet", that's cool, just asking. )
__________________
Server: AMD Athlon II x4 635 2.9GHz, 8 Gb RAM, Win 10 x64, Java 8, Gigabit network
Drives: Several TB of internal SATA and external USB drives, no NAS or RAID or such...
Software: SageTV v9x64, stock STV with ADM.
Tuners: 4 tuners via (2) HDHomeruns (100% OTA, DIY antennas in the attic).
Clients: Several HD300s, HD200s, even an old HD100, all on wired LAN. Latest firmware for each.
Reply With Quote
  #12  
Old 12-12-2021, 10:03 PM
CptKirk CptKirk is offline
Sage Aficionado
 
Join Date: Sep 2010
Posts: 266
Transcoding files problem

I've got the transcoding and detector plugins installed and have nplayer's mkv formats added. I use the MKV Fast setting to change most tv recordings from .ts to .mkv.

I looked at the Video Conversions a bit ago and notice a few Converted, a whole bunch of failed and another whole bunch of waiting.

I've got the following loaded up in Notepad++: Sage.properties, SageTVTranscoder.log, sagetv_0.txt, sagetv_1.txt, sagetv_1.txt, sagetv_1.txt

If I search for Converted files and Failed files I cannot really see anything in the SageTVTranscoder.log file that shows/tells why one converted and one failed.

Right now it has a whole bunch sitting in the Waiting status with the one on top showing "Converting - 0%".

If I look at the Task Manager, SageTVTranscoder.exe *32 is at a constant 30% CPU utilization and 179,664K memory usage.

Is there a way to try and debug why I am seeing so many failures?
__________________
SageTV running on: Win10 21H2
SageTV 9.2.6.976 (64 bit)
Java 1.8.0 311 (64 bit)
OpenDCT 0.5.32 (64 bit)
Clients: HD300 (x2)
HDHR3-CC Prime 20220822 (Comcast CableCard) - 3 Tuners
HDFX-4K Flex 20220822 (OTA) - 4 Tuners
Reply With Quote
  #13  
Old 12-13-2021, 10:50 AM
jvl711's Avatar
jvl711 jvl711 is offline
Sage Fanatic
 
Join Date: Jan 2004
Posts: 825
Quote:
Originally Posted by CptKirk View Post
I've got the transcoding and detector plugins installed and have nplayer's mkv formats added. I use the MKV Fast setting to change most tv recordings from .ts to .mkv.

I looked at the Video Conversions a bit ago and notice a few Converted, a whole bunch of failed and another whole bunch of waiting.

I've got the following loaded up in Notepad++: Sage.properties, SageTVTranscoder.log, sagetv_0.txt, sagetv_1.txt, sagetv_1.txt, sagetv_1.txt

If I search for Converted files and Failed files I cannot really see anything in the SageTVTranscoder.log file that shows/tells why one converted and one failed.

Right now it has a whole bunch sitting in the Waiting status with the one on top showing "Converting - 0%".

If I look at the Task Manager, SageTVTranscoder.exe *32 is at a constant 30% CPU utilization and 179,664K memory usage.

Is there a way to try and debug why I am seeing so many failures?
I am not sure if the progress works with the new transcoder. SageTV is reading the STDOUT of the process and I think it is looking for a certain output for the percentage. This is something I need to look into at some point. So 0% progress does not really mean there was a failure. I would first look at the SageTV log files and see if there is any error from the transcode to go after. That is where I would start.

Josh
__________________
Projects I am currently maintaining
SageTV Andoid Client
Media Format Parser Plugin
JavaFFmpegLibrary
SageTVTranscoder

If you like the work I am doing and would like to support it you can become a Patreon member.
Reply With Quote
Reply


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

Advanced Search
Display Modes

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
SageTVTranscoder.exe from 6.5.14 Stuntman SageTV Beta Test Software 2 05-13-2009 08:17 AM
What does SageTVtranscoder.exe do? autoboy SageTV Software 5 04-23-2008 01:55 PM
sagetvtranscoder.exe always at 50% showson1 SageTV Software 3 03-30-2008 01:46 AM
SageTVTranscoder.exe jgsouthard SageTV Beta Test Software 40 11-03-2007 01:13 PM
SageTvTranscoder.exe ?? mike_15 SageTV Software 4 10-21-2007 09:42 PM


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


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