SageTV Community  

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

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
  #161  
Old 06-22-2022, 11:31 AM
nyplayer nyplayer is offline
SageTVaholic
 
Join Date: Sep 2005
Posts: 4,997
Quote:
Originally Posted by DarkWolf77 View Post
It fails immediately as soon as it's run, so I am having no difficulty with my patience. The installed version is 1.0.5, SageTVTranscoder (FFmpeg) Windows x64.


SageTVTranscoder.log
Code:
################################ SageTVTranscoder (FFmpeg) starting ################################
Arguments: C:\Program Files\SageTV\SageTV\SageTVTranscoder.exe -ss 390.0 -y -priority idle -skip_frame nokey -skip_idct nokey -skip_loop_filter nokey -i F:\SageTV\Nate and Jeremiah Save My House - S03E04 - 37798134-0.ts -f mjpeg -deinterlace -vf crop=0:8:0:0,scale=512:288 -vframes 1 -an -minpixvar 300 -minpixnumframes 150 -vsync 0 D:\PhoenixFanart\TV\Nate and Jeremiah Save My House\Season 3\Episodes\0004.png
Setting process priority
        Priority Argument: idle
Exiting for some other reason
################################ Exiting ################################
The log you posted is just the thumbnail creation ... they all work I tested all of them. Need to see the correct log.
__________________
Channels DVR UBUNTU Server 2 Primes 3 Connects TVE SageTV Docker with input from Channels DVR XMLTV and M3U VIA Opendct.
Reply With Quote
  #162  
Old 06-22-2022, 08:46 PM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,491
Quote:
Originally Posted by jhkoenig View Post
Thanks! I'm hoping that someone has a line to add to the profile. I'm failing completely on that task.
I am pretty sure that the transcoder automagically transcodes h.265 files to play back to SageTV extenders. I am just using the built in transcoding that runs automatically in the recent versions of SageTV for unRAID.
__________________
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
  #163  
Old 06-22-2022, 09:28 PM
jhkoenig's Avatar
jhkoenig jhkoenig is offline
Sage Advanced User
 
Join Date: Sep 2005
Location: Pleasanton, CA
Posts: 189
Quote:
Originally Posted by wayner View Post
I am pretty sure that the transcoder automagically transcodes h.265 files to play back to SageTV extenders. I am just using the built in transcoding that runs automatically in the recent versions of SageTV for unRAID.
My HD300s generate an error every time I try to play a h265 file, so something is not right about my configuration.

Ideas?
__________________
Win10@16GB RAM, 30TB Disk across 6 disks. 2 Prime tuner units
Sage v9 (64bit) using OpenDCT to control the Primes
2 HD-300s, an Android mini-client, and a Windows client
Reply With Quote
  #164  
Old 06-23-2022, 01:04 PM
DarkWolf77 DarkWolf77 is offline
Sage Advanced User
 
Join Date: Dec 2006
Posts: 169
Quote:
Originally Posted by nyplayer View Post
The log you posted is just the thumbnail creation ... they all work I tested all of them. Need to see the correct log.
So strangest thing... I obviously copied the wrong bit of log, so I went back just now to find it - it was gone. So I tried to make it happen again and it suddenly worked just fine on the same recording with the same settings... I guess it's ok now lol thanks!
Reply With Quote
  #165  
Old 06-23-2022, 01:58 PM
jvl711's Avatar
jvl711 jvl711 is offline
Sage Fanatic
 
Join Date: Jan 2004
Posts: 825
Quote:
Originally Posted by jhkoenig View Post
My HD300s generate an error every time I try to play a h265 file, so something is not right about my configuration.

Ideas?
Can you post the related log from SageTVTranscoder.log? I do not think I even tested this scenario. I would need to pull an HD300 out of storage to even test it.

EDIT: I went out to my garage and tested on a HD300 I have out there, and it worked flawlessly. It looks like it encodes to 720x480 in dvd format. Not sure if that can be increased or not. What OS are you running SageTV on? What version of this plugin are you using?

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.

Last edited by jvl711; 06-23-2022 at 02:11 PM.
Reply With Quote
  #166  
Old 06-23-2022, 02:44 PM
jhkoenig's Avatar
jhkoenig jhkoenig is offline
Sage Advanced User
 
Join Date: Sep 2005
Location: Pleasanton, CA
Posts: 189
Quote:
Originally Posted by jvl711 View Post
Can you post the related log from SageTVTranscoder.log? I do not think I even tested this scenario. I would need to pull an HD300 out of storage to even test it.

EDIT: I went out to my garage and tested on a HD300 I have out there, and it worked flawlessly. It looks like it encodes to 720x480 in dvd format. Not sure if that can be increased or not. What OS are you running SageTV on? What version of this plugin are you using?

Josh
Will do. This will take a minute, because I exhaustively transcoded all my h265 files to h264 with Handbrake. But happy for the help and will respond as soon as I can!
__________________
Win10@16GB RAM, 30TB Disk across 6 disks. 2 Prime tuner units
Sage v9 (64bit) using OpenDCT to control the Primes
2 HD-300s, an Android mini-client, and a Windows client
Reply With Quote
  #167  
Old 06-23-2022, 07:02 PM
nyplayer nyplayer is offline
SageTVaholic
 
Join Date: Sep 2005
Posts: 4,997
Quote:
Originally Posted by DarkWolf77 View Post
So strangest thing... I obviously copied the wrong bit of log, so I went back just now to find it - it was gone. So I tried to make it happen again and it suddenly worked just fine on the same recording with the same settings... I guess it's ok now lol thanks!
can you say Gremlins.???
__________________
Channels DVR UBUNTU Server 2 Primes 3 Connects TVE SageTV Docker with input from Channels DVR XMLTV and M3U VIA Opendct.
Reply With Quote
  #168  
Old 07-20-2022, 03:01 PM
CptKirk CptKirk is offline
Sage Aficionado
 
Join Date: Sep 2010
Posts: 268
Hi Josh,

Thanks for adding my Jan 2022 wish list item, Cuda (NVENC) support for Nvidia hardware, to the transcoder.

Now that I have 1.1.0 installed how do I go about testing with it?

Is there a command line we need to add to the transcoding profiles to enable it?
__________________
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
  #169  
Old 07-23-2022, 06:36 AM
jvl711's Avatar
jvl711 jvl711 is offline
Sage Fanatic
 
Join Date: Jan 2004
Posts: 825
Quote:
Originally Posted by CptKirk View Post
Hi Josh,

Thanks for adding my Jan 2022 wish list item, Cuda (NVENC) support for Nvidia hardware, to the transcoder.

Now that I have 1.1.0 installed how do I go about testing with it?

Is there a command line we need to add to the transcoding profiles to enable it?
Generally speaking, SageTVTranscoder is a modified version of ffmpeg. So you can call it directly from the command line like you would ffmpeg. So I would start by testing out the new settings on the command line, then building a profile for SageTV from those command line switches. Here is a link that should be helpful: https://developer.nvidia.com/blog/nv...%20processing.
__________________
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
  #170  
Old 07-23-2022, 12:21 PM
CptKirk CptKirk is offline
Sage Aficionado
 
Join Date: Sep 2010
Posts: 268
Sounds good, thanks.
__________________
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
  #171  
Old 07-24-2022, 10:56 AM
CptKirk CptKirk is offline
Sage Aficionado
 
Join Date: Sep 2010
Posts: 268
Initial NVENC testing...

I am testing with this file which had not yet been converted to MKV yet. I am using an NVidia GeForce RTX 2070 Super (8GB) desktop GPU.

FBI International - S01E17 - Uprooting - 1368600-0.ts

Renamed it Original.ts to make the command line easier. Only using the first 10 minutes to test with.

From the link you provide I put together a working command line and have started tweaking wanting to try the different presets

https://trac.ffmpeg.org/wiki/Encode/H.264

What I have found (only 3 work):

Quote:
ultrafast FAILED
superfast FAILED
veryfast FAILED
faster FAILED
fast
medium – default preset
slow
slower FAILED
veryslow FAILED
Command lines used:

Quote:
C:\SageTV64\SageTV\SageTVTranscoder.exe -hwaccel cuda -hwaccel_output_format cuda -t 00:10:00 -i J:\Original.ts -c:v h264_nvenc -preset ultrafast J:\1ultrafast.mp4
C:\SageTV64\SageTV\SageTVTranscoder.exe -hwaccel cuda -hwaccel_output_format cuda -t 00:10:00 -i J:\Original.ts -c:v h264_nvenc -preset superfast J:\2superfast.mp4
C:\SageTV64\SageTV\SageTVTranscoder.exe -hwaccel cuda -hwaccel_output_format cuda -t 00:10:00 -i J:\Original.ts -c:v h264_nvenc -preset veryfast J:\3veryfast.mp4
C:\SageTV64\SageTV\SageTVTranscoder.exe -hwaccel cuda -hwaccel_output_format cuda -t 00:10:00 -i J:\Original.ts -c:v h264_nvenc -preset faster J:\4faster.mp4
C:\SageTV64\SageTV\SageTVTranscoder.exe -hwaccel cuda -hwaccel_output_format cuda -t 00:10:00 -i J:\Original.ts -c:v h264_nvenc -preset fast J:\5fast.mp4
C:\SageTV64\SageTV\SageTVTranscoder.exe -hwaccel cuda -hwaccel_output_format cuda -t 00:10:00 -i J:\Original.ts -c:v h264_nvenc -preset medium J:\6medium.mp4
C:\SageTV64\SageTV\SageTVTranscoder.exe -hwaccel cuda -hwaccel_output_format cuda -t 00:10:00 -i J:\Original.ts -c:v h264_nvenc -preset slow J:\7slow.mp4
C:\SageTV64\SageTV\SageTVTranscoder.exe -hwaccel cuda -hwaccel_output_format cuda -t 00:10:00 -i J:\Original.ts -c:v h264_nvenc -preset slower J:\8slower.mp4
C:\SageTV64\SageTV\SageTVTranscoder.exe -hwaccel cuda -hwaccel_output_format cuda -t 00:10:00 -i J:\Original.ts -c:v h264_nvenc -preset veryslow J:\9veryslow.mp4
When I use one of the failing presets it shows:

Quote:
[h264_nvenc @ 00000000036d0d40] [Eval @ 00000000005fe360] Undefined constant or missing '(' in 'veryslow'
[h264_nvenc @ 00000000036d0d40] Unable to parse option value "veryslow"
[h264_nvenc @ 00000000036d0d40] Error setting option preset to value veryslow.
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
[aac @ 000000000278c6c0] Qavg: 190.254
[aac @ 000000000278c6c0] 2 frames left in the queue on closing
Conversion failed!
https://developer.nvidia.com/blog/in...dk-10-presets/ (Sorry, you might need an NVidia developer account to get to this page. Here's the important info from there)

Quote:
All NVIDIA GPUs starting with the Kepler generation support fully accelerated hardware video encoding, and all GPUs starting with the Fermi generation support fully accelerated hardware video decoding through the NVIDIA Video Codec SDK.

The NVIDIA NVENC presets design in Video Codec SDK 9.1 and earlier evolved based on various NVENC use cases, which have emerged over time. The presets exposed in the NVENCODE API currently are as follows:

Latency-sensitive encoding:
LOW_LATENCY_HP (Low latency high performance)
LOW_LATENCY_DEFAULT
LOW_LATENCY_HQ (Low latency high quality)

Latency-tolerant encoding:
HP
DEFAULT
HQ

Blu-ray-compatible encoding:
BD (Blu-ray-compatible)

Lossless:
LOSSLESS_HP
LOSSLESS_DEFAULT

These presets evolved over the years, with multiple hardware generations and encoder features getting introduced in each generation. Because NVENCODE API guarantees binary backward compatibility, it has been difficult to reorganize the presets. This has led to many problems:

A large number of presets—There are currently nine presets, but they often have an inadequate quality or performance tradeoff.

Non-uniform preset behavior for different resolutions—For example, a frames per second rate (FPS) improvement of 60% is achievable on Turing by just 2% BD-BR degradation from the Low Latency High Performance preset.

Quality compared to performance—The HQ preset doesn’t always provide the best quality with lower performance. Up to a 5% bitrate savings is achievable on some clips.
To address these issues and give you better control, new presets are being introduced in Video Codec SDK 10.

Preset design
The preset designs in Video Codec SDK 10 are built for better control and granularity over performance compared to the quality tradeoff for NVENC. This gives you more flexibility. The following major changes have been introduced for improved flexibility:

Tuning information—Specify the use scenario:
High quality
Low latency
Ultra-low latency
Lossless

Predefined presets— Choose from a set of seven predefined presets, from P1 (fastest, lowest quality) to P7 (slowest, highest quality). This determines the set of tools used for the encoding: for example, GOP structure, B frames, look-ahead encoding, and so on.

Simplified rate control modes—Choose VBR/CBR/constant-QP encoding and set the desired bitrate and mode (1-pass or 2-pass). If you are using the 2-pass rate control mode, you can choose whether to run the 1st pass in quarter resolution.
I also tried using the newer NVidia presets which should be in ffmpeg, P1 to P7, but they give similar errors.

https://gist.github.com/nico-lab/c2d...c1eafeb52a21c3

Found that page and it actually shows the integer values for the different presets. So I tried 12 for P1, but it gives an out of range error.

Quote:
[h264_nvenc @ 00000000036b0d40] Value 12.000000 for parameter 'preset' out of range [0 - 11]
[h264_nvenc @ 00000000036b0d40] Error setting option preset to value 12.
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
[aac @ 000000000276c6c0] Qavg: 190.254
[aac @ 000000000276c6c0] 2 frames left in the queue on closing
Conversion failed!
Based on that error it looks like what we have in place is the older SDK 9.1

Notice the following in your log file for every encode. The Peek and LastError lines continue until the encode is done.

Quote:
################################ SageTVTranscoder (FFmpeg) starting ################################
Arguments: C:\SageTV64\SageTV\SageTVTranscoder.exe -hwaccel cuda -hwaccel_output_format cuda -t 00:10:00 -i J:\Original.ts -c:v h264_nvenc -preset slow -tune 1 -rc-lookahead 5 J:\7slow.mp4
Peek on Named Pipe failed. Returning -1
LastError: 1
Peek on Named Pipe failed. Returning -1
LastError: 1
Peek on Named Pipe failed. Returning -1
LastError: 1
Peek on Named Pipe failed. Returning -1
LastError: 1
Peek on Named Pipe failed. Returning -1
LastError: 1
Peek on Named Pipe failed. Returning -1
LastError: 1
Peek on Named Pipe failed. Returning -1
LastError: 1
Here is a couple of other good links of info on NVidia encoding:
https://docs.nvidia.com/video-techno...configurations

https://docs.nvidia.com/video-techno...th-nvidia-gpu/

I had sent all of this to Josh and he mentioned he was going to see if he can include the newer version on the SDK in the build process.
__________________
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

Last edited by CptKirk; 07-24-2022 at 12:26 PM.
Reply With Quote
  #172  
Old 07-26-2022, 06:02 PM
jvl711's Avatar
jvl711 jvl711 is offline
Sage Fanatic
 
Join Date: Jan 2004
Posts: 825
Quote:
Originally Posted by CptKirk View Post
Initial NVENC testing...

I am testing with this file which had not yet been converted to MKV yet. I am using an NVidia GeForce RTX 2070 Super (8GB) desktop GPU.

FBI International - S01E17 - Uprooting - 1368600-0.ts

Renamed it Original.ts to make the command line easier. Only using the first 10 minutes to test with.

From the link you provide I put together a working command line and have started tweaking wanting to try the different presets

https://trac.ffmpeg.org/wiki/Encode/H.264

What I have found (only 3 work):



Command lines used:



When I use one of the failing presets it shows:



https://developer.nvidia.com/blog/in...dk-10-presets/ (Sorry, you might need an NVidia developer account to get to this page. Here's the important info from there)



I also tried using the newer NVidia presets which should be in ffmpeg, P1 to P7, but they give similar errors.

https://gist.github.com/nico-lab/c2d...c1eafeb52a21c3

Found that page and it actually shows the integer values for the different presets. So I tried 12 for P1, but it gives an out of range error.



Based on that error it looks like what we have in place is the older SDK 9.1

Notice the following in your log file for every encode. The Peek and LastError lines continue until the encode is done.



Here is a couple of other good links of info on NVidia encoding:
https://docs.nvidia.com/video-techno...configurations

https://docs.nvidia.com/video-techno...th-nvidia-gpu/

I had sent all of this to Josh and he mentioned he was going to see if he can include the newer version on the SDK in the build process.
I did some testing on my laptop, the only machine I have with a graphics card , and confirmed your findings. Hopefully this weekend I will get some time to play with the build a bit and see if I can get a newer SDK working.
__________________
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
  #173  
Old 07-27-2022, 02:48 PM
jvl711's Avatar
jvl711 jvl711 is offline
Sage Fanatic
 
Join Date: Jan 2004
Posts: 825
Quote:
Originally Posted by CptKirk View Post
Initial NVENC testing...

I am testing with this file which had not yet been converted to MKV yet. I am using an NVidia GeForce RTX 2070 Super (8GB) desktop GPU.

FBI International - S01E17 - Uprooting - 1368600-0.ts

Renamed it Original.ts to make the command line easier. Only using the first 10 minutes to test with.

From the link you provide I put together a working command line and have started tweaking wanting to try the different presets

https://trac.ffmpeg.org/wiki/Encode/H.264

What I have found (only 3 work):



Command lines used:



When I use one of the failing presets it shows:



https://developer.nvidia.com/blog/in...dk-10-presets/ (Sorry, you might need an NVidia developer account to get to this page. Here's the important info from there)



I also tried using the newer NVidia presets which should be in ffmpeg, P1 to P7, but they give similar errors.

https://gist.github.com/nico-lab/c2d...c1eafeb52a21c3

Found that page and it actually shows the integer values for the different presets. So I tried 12 for P1, but it gives an out of range error.



Based on that error it looks like what we have in place is the older SDK 9.1

Notice the following in your log file for every encode. The Peek and LastError lines continue until the encode is done.



Here is a couple of other good links of info on NVidia encoding:
https://docs.nvidia.com/video-techno...configurations

https://docs.nvidia.com/video-techno...th-nvidia-gpu/

I had sent all of this to Josh and he mentioned he was going to see if he can include the newer version on the SDK in the build process.
So I did some digging on the way I am compiling the cuda support. I am doing it the newer way that FFmpeg has it setup where I only need the headers, and not the nvidia sdk. I think I am good there.

Here is a command to get all of the presets sagetvtranscoder.exe -h encoder=h264_nvenc. You will see there is a pretty long list
__________________
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
  #174  
Old 07-27-2022, 07:31 PM
CptKirk CptKirk is offline
Sage Aficionado
 
Join Date: Sep 2010
Posts: 268
Yes, but those are the SDK 9.1 presets I believe, 0 to 11.

Code:
h264_nvenc AVOptions:
  -preset            <int>        E..V...... Set the encoding preset (from 0 to 11) (default medium)
     default         0            E..V......
     slow            1            E..V...... hq 2 passes
     medium          2            E..V...... hq 1 pass
     fast            3            E..V...... hp 1 pass
     hp              4            E..V......
     hq              5            E..V......
     bd              6            E..V......
     ll              7            E..V...... low latency
     llhq            8            E..V...... low latency hq
     llhp            9            E..V...... low latency hp
     lossless        10           E..V......
     losslesshp      11           E..V......

The new presets with SDK 10 are 0-18, with 12-18 being the new ones. SDK 10 also added the -tune setting.

Code:
hevc_nvenc AVOptions:
  -preset            <int>        E..V....... Set the encoding preset (from 0 to 18) (default p4)
     default         0            E..V....... 
     slow            1            E..V....... hq 2 passes
     medium          2            E..V....... hq 1 pass
     fast            3            E..V....... hp 1 pass
     hp              4            E..V....... 
     hq              5            E..V....... 
     bd              6            E..V....... 
     ll              7            E..V....... low latency
     llhq            8            E..V....... low latency hq
     llhp            9            E..V....... low latency hp
     lossless        10           E..V....... lossless
     losslesshp      11           E..V....... lossless hp
     p1              12           E..V....... fastest (lowest quality)
     p2              13           E..V....... faster (lower quality)
     p3              14           E..V....... fast (low quality)
     p4              15           E..V....... medium (default)
     p5              16           E..V....... slow (good quality)
     p6              17           E..V....... slower (better quality)
     p7              18           E..V....... slowest (best quality)
  -tune              <int>        E..V....... Set the encoding tuning info (from 1 to 4) (default hq)
     hq              1            E..V....... High quality
     ll              2            E..V....... Low latency
     ull             3            E..V....... Ultra low latency
     lossless        4            E..V....... Lossless
I believe I got those right.


I check both h264 and hevc, both show 0 to 11:

C:\SageTV64\SageTV\SageTVTranscoder.exe -h encoder=h264_nvenc

C:\SageTV64\SageTV\SageTVTranscoder.exe -h encoder=hevc_nvenc


I saw a note in another post online: FFmpeg published the new codec headers 10.0.26.0: https://github.com/FFmpeg/nv-codec-h...tag/n10.0.26.0

With the latest 10.x being 10.0.26.2: https://github.com/FFmpeg/nv-codec-h...tag/n10.0.26.2


I also found that the original presets I tested were for the x264 encoder (GPL) run on the CPU, so that was why a most of them didn't work. The three that did work was just because they had the same name for h264_nvenc as for the x264 encoder (GPL).

I will go back and retest for all of the h264_nvenc 0-11 presets that we have available.
__________________
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
  #175  
Old 08-05-2022, 06:41 AM
jvl711's Avatar
jvl711 jvl711 is offline
Sage Fanatic
 
Join Date: Jan 2004
Posts: 825
Quote:
Originally Posted by CptKirk View Post
Yes, but those are the SDK 9.1 presets I believe, 0 to 11.

Code:
h264_nvenc AVOptions:
  -preset            <int>        E..V...... Set the encoding preset (from 0 to 11) (default medium)
     default         0            E..V......
     slow            1            E..V...... hq 2 passes
     medium          2            E..V...... hq 1 pass
     fast            3            E..V...... hp 1 pass
     hp              4            E..V......
     hq              5            E..V......
     bd              6            E..V......
     ll              7            E..V...... low latency
     llhq            8            E..V...... low latency hq
     llhp            9            E..V...... low latency hp
     lossless        10           E..V......
     losslesshp      11           E..V......

The new presets with SDK 10 are 0-18, with 12-18 being the new ones. SDK 10 also added the -tune setting.

Code:
hevc_nvenc AVOptions:
  -preset            <int>        E..V....... Set the encoding preset (from 0 to 18) (default p4)
     default         0            E..V....... 
     slow            1            E..V....... hq 2 passes
     medium          2            E..V....... hq 1 pass
     fast            3            E..V....... hp 1 pass
     hp              4            E..V....... 
     hq              5            E..V....... 
     bd              6            E..V....... 
     ll              7            E..V....... low latency
     llhq            8            E..V....... low latency hq
     llhp            9            E..V....... low latency hp
     lossless        10           E..V....... lossless
     losslesshp      11           E..V....... lossless hp
     p1              12           E..V....... fastest (lowest quality)
     p2              13           E..V....... faster (lower quality)
     p3              14           E..V....... fast (low quality)
     p4              15           E..V....... medium (default)
     p5              16           E..V....... slow (good quality)
     p6              17           E..V....... slower (better quality)
     p7              18           E..V....... slowest (best quality)
  -tune              <int>        E..V....... Set the encoding tuning info (from 1 to 4) (default hq)
     hq              1            E..V....... High quality
     ll              2            E..V....... Low latency
     ull             3            E..V....... Ultra low latency
     lossless        4            E..V....... Lossless
I believe I got those right.


I check both h264 and hevc, both show 0 to 11:

C:\SageTV64\SageTV\SageTVTranscoder.exe -h encoder=h264_nvenc

C:\SageTV64\SageTV\SageTVTranscoder.exe -h encoder=hevc_nvenc


I saw a note in another post online: FFmpeg published the new codec headers 10.0.26.0: https://github.com/FFmpeg/nv-codec-h...tag/n10.0.26.0

With the latest 10.x being 10.0.26.2: https://github.com/FFmpeg/nv-codec-h...tag/n10.0.26.2


I also found that the original presets I tested were for the x264 encoder (GPL) run on the CPU, so that was why a most of them didn't work. The three that did work was just because they had the same name for h264_nvenc as for the x264 encoder (GPL).

I will go back and retest for all of the h264_nvenc 0-11 presets that we have available.
The preset differences are really interesting. I am not sure why they are different. I am actually using the latest version of the nv-codec-headers. I think it is actually up to version 11.
__________________
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
  #176  
Old 08-05-2022, 06:43 AM
jvl711's Avatar
jvl711 jvl711 is offline
Sage Fanatic
 
Join Date: Jan 2004
Posts: 825
Beta posted to Patreon subscribers

New beta has been posted to my Patreon subscribers. I have upgraded the base FFmpeg code in the project from 4.3.1 -> 4.4.3. This is a fairly big change, so I am going to let them review it for a while before I open up the beta to everyone. Just want to let you guys know that there is work going on.

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
  #177  
Old 08-05-2022, 08:04 AM
tvmaster2's Avatar
tvmaster2 tvmaster2 is offline
SageTVaholic
 
Join Date: Jun 2005
Location: tarana
Posts: 4,240
Quote:
Originally Posted by jvl711 View Post
New beta has been posted to my Patreon subscribers. I have upgraded the base FFmpeg code in the project from 4.3.1 -> 4.4.3. This is a fairly big change, so I am going to let them review it for a while before I open up the beta to everyone. Just want to let you guys know that there is work going on.

Thanks,
Josh
Always appreciated what you’re doing. I’ve never used the transcoding software built into Sage - can it be used in a batch circumstance, aka transcoding 100 movies as you walk away for a month?
__________________
Sage 9 server = Gigabyte AMD quad-core - 4 gigs - integrated ATI HD4200 chipset - SSD boot, Hitachi Deskstar show drives. HD-PVR - Colossus - Win7 32 bit. HD200/300’s networked. HDHomerun tuner. "If you've given up on Weird Al, you've given up on life" - Homer Simpson
Reply With Quote
  #178  
Old 08-06-2022, 03:08 AM
hvymetal hvymetal is offline
Sage Advanced User
 
Join Date: Nov 2007
Posts: 162
Quote:
Originally Posted by tvmaster2 View Post
Always appreciated what you’re doing. I’ve never used the transcoding software built into Sage - can it be used in a batch circumstance, aka transcoding 100 movies as you walk away for a month?
That is one use case but most importantly it can be potentially used in conjunction with Android client app to transcode on the fly using highly compressed and high quality mp4 format. MP4 decoding is supported on almost all streaming devices.
Reply With Quote
  #179  
Old 08-09-2022, 06:50 PM
jvl711's Avatar
jvl711 jvl711 is offline
Sage Fanatic
 
Join Date: Jan 2004
Posts: 825
Transcoder progress bugix

I made a fix to the SageTV core for how the transcode progress is calculated. SageTV was using the time from the status output of ffmpeg process output. It seems sometimes the ffmpeg time output does not increment. When this happens I changed the code so that it would use the current frame / fps. This seems to be working well. Where I was seeing this bug was when the transcoder was remuxing. It looks like this bug existed in the original SageTVTranscoder as well as my updated one.

I posted this to my Patreons first. If I do not hear any negative impact I will post the Sage.jar here and sumbit the fix to the main repository as a pull request.

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
  #180  
Old 10-18-2022, 03:12 PM
CptKirk CptKirk is offline
Sage Aficionado
 
Join Date: Sep 2010
Posts: 268
Sweet!

Just took a quick look at your 1.2.2 (built from ffmpeg 4.4.2) you posted two weeks ago on your github.

SageTVTranscoder.exe -h encoder=h264_nvenc is showing all of the new presets and tunings:

Code:
C:\Windows\system32>J:\SageTVTranscoder.exe -h encoder=h264_nvenc
ffmpeg version SageTVTranscoder_v1.2.2_from_FFmpeg_v4.4.2 Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 8.3-win32 (GCC) 20190406
  configuration: --arch=x86 --target-os=mingw64 --cross-prefix=x86_64-w64-mingw32- --enable-libx264 --enable-libx265 --enable-dxva2 --enable-nvenc --enable-cuvid --enable-cuda --disable-ffplay --disable-ffprobe --enable-gpl --enable-static --pkg-config='pkg-config --static' --disable-shared --disable-devices --disable-bzlib --disable-demuxer=msnwc_tcp --extra-cflags='-static -I./pkgconfig/include -lstdc++ -lpthread' --extra-ldflags='-static -L./pkgconfig/lib -static-libgcc -static-libstdc++'
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
Encoder h264_nvenc [NVIDIA NVENC H.264 encoder]:
    General capabilities: dr1 delay hardware
    Threading capabilities: none
    Supported hardware devices: cuda cuda d3d11va d3d11va
    Supported pixel formats: yuv420p nv12 p010le yuv444p p016le yuv444p16le bgr0 rgb0 cuda d3d11
h264_nvenc AVOptions:
  -preset            <int>        E..V....... Set the encoding preset (from 0 to 18) (default p4)
     default         0            E..V.......
     slow            1            E..V....... hq 2 passes
     medium          2            E..V....... hq 1 pass
     fast            3            E..V....... hp 1 pass
     hp              4            E..V.......
     hq              5            E..V.......
     bd              6            E..V.......
     ll              7            E..V....... low latency
     llhq            8            E..V....... low latency hq
     llhp            9            E..V....... low latency hp
     lossless        10           E..V.......
     losslesshp      11           E..V.......
     p1              12           E..V....... fastest (lowest quality)
     p2              13           E..V....... faster (lower quality)
     p3              14           E..V....... fast (low quality)
     p4              15           E..V....... medium (default)
     p5              16           E..V....... slow (good quality)
     p6              17           E..V....... slower (better quality)
     p7              18           E..V....... slowest (best quality)
  -tune              <int>        E..V....... Set the encoding tuning info (from 1 to 4) (default hq)
     hq              1            E..V....... High quality
     ll              2            E..V....... Low latency
     ull             3            E..V....... Ultra low latency
     lossless        4            E..V....... Lossless
I am going to start trying the new P1-P7 presets with my NVidia GeForce RTX 2070 Super.
__________________
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
Reply


Currently Active Users Viewing This Thread: 3 (0 members and 3 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
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:49 PM.


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