Project

General

Profile

Transcodig problem at the same time 12-13 streams

Added by ziya durgun over 6 years ago

The same thing happens when I do 12-13 transcode. the web panel slows down and does not respond. Then all the broadcasts are breaking. Can anyone transcode 20-30 channels with Tvheadend?

The version I used
HTS Tvheadend 4.3-1225 ~ gc76c7e0-dirty I build and use it, but I can not get the performance I want.

I tried other versions. No load related to CPU and GPU processor pc 40-50 broadcast capacity

I am using pass mode in the stream profiles section (without transcoding). I can get the broadcast as smooth as the Lnb capacity. When I start to encode (nvidia nvenc gpu or h264 mpegts cpu) the program responds late and disconnects. (12-13 streams at most)

2x xenon gold 2.2 GHz total 56 cores
64 GB ecc 2666 MHz RAM
nvidia quadro m2000 video card
256 GB samsung pci mvme ssd disk

Screenshot_2.jpg (64.1 KB) Screenshot_2.jpg Screen is late

Replies (23)

RE: Transcodig problem at the same time 12-13 streams - Added by Robert Cameron over 6 years ago

According to Nvidia's developer site, Maxwell 2nd Gen cards (which includes the Quadro M2000) can only handle 6 streams at the highest quality setting. If you reduce the quality, it can handle up to 13 streams.

Of course, that is under optimal conditions, and real-world use may fall below those stats.

RE: Transcodig problem at the same time 12-13 streams - Added by ziya durgun over 6 years ago

Yes, of course, but the only problem I tried with the CPU is still there, and the CPU is not about the 30-40% problem with pc resources. TVHeadend slows down and locks up.
Does anyone have a 30-40 stream transcode with TVHeadend?

RE: Transcodig problem at the same time 12-13 streams - Added by saen acro over 6 years ago

Is you nvidia software "patched" to remove software limits set by nvidia?

RE: Transcodig problem at the same time 12-13 streams - Added by ziya durgun over 6 years ago

no limit for quadro m2000 but problem is not only gpu transcode i try to all channels with cpu same problem tvheadend is slow end response late.

RE: Transcodig problem at the same time 12-13 streams - Added by saen acro over 6 years ago

use FFMPEG with spawn profile

ffmpeg -fflags +genpts -nostats -nostdin -hide_banner -loglevel quiet -hwaccel cuvid -c:v h264_cuvid -deint 1 -surfaces 8 -drop_second_field 1 -vsync 0 -resize 1280x720 -i    -map 0:v -c:v h264_nvenc -preset slow -profile:v high -level 4.1 -rc vbr -cq 1 -bf 2 -g 25 -b:v 2200k -minrate 2200k -maxrate 2200k -bufsize 1002k -map 0:a -c:a libfdk_aac -ac 2 -b:a 128k -strict experimental

don't forget to monitor gpu by nvidia-smi by running one by one streams, until power or memory capacity of GPU was reached.

there is some hacks to reduce encode usage by vertical line reduce
ex.
1920x1080 > 1440×1080
1280x720 > 960x720
aka reduce vertical by 1.33

RE: Transcodig problem at the same time 12-13 streams - Added by ziya durgun over 6 years ago

How can i do it? because i cant see ffmpeg profiles only nvenc_h264

thankyou

RE: Transcodig problem at the same time 12-13 streams - Added by saen acro over 6 years ago

Spawn profile MPEG-TS Spawn/built-in

RE: Transcodig problem at the same time 12-13 streams - Added by ziya durgun over 6 years ago

Thankyou i found it i am trying

RE: Transcodig problem at the same time 12-13 streams - Added by ziya durgun over 6 years ago

I can not run. I created a profile. When I click on the Services section, it does not open. I just pasted the link you gave to the spawn part

RE: Transcodig problem at the same time 12-13 streams - Added by ziya durgun over 6 years ago

i cant work it
Will I add anything to the code? For example, I have not tried the / root / bin / ffmpeg ffmpeg location. my ffmpeg is here.

RE: Transcodig problem at the same time 12-13 streams - Added by ziya durgun over 6 years ago

i cand do it. photos attached. i cant understand pipe:0 pipe:1
i try your code but not take a video

what i must write -i 'here'

RE: Transcodig problem at the same time 12-13 streams - Added by ziya durgun over 6 years ago

now it is strange problem
currently doing 6 encodings quadro m2000. No problem with up to 6 streams.

--------------------------------------------------------------------------- | NVIDIA-SMI 390.48 Driver Version: 390.48 | |-------------------------------+----------------------+----------------------+ | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | |===============================+======================+======================| | 0 NVS 315 Off | 00000000:73:00.0 N/A | N/A | | 30% 42C P8 N/A / N/A | 870MiB / 963MiB | N/A Default |
---------------------------------------------------+----------------------+ | 1 Quadro M2000 Off | 00000000:D5:00.0 Off | N/A | | 56% 43C P0 29W / 75W | 1058MiB / 4043MiB | 5% Default |
---------------------------------------------------+----------------------+

--------------------------------------------------------------------------- | Processes: GPU Memory | | GPU PID Type Process name Usage | |=============================================================================| | 0 Not Supported | | 1 3274 C /root/bin/ffmpeg 167MiB | | 1 3276 C /root/bin/ffmpeg 167MiB | | 1 3802 C /root/bin/ffmpeg 167MiB | | 1 3804 C /root/bin/ffmpeg 167MiB | | 1 3811 C /root/bin/ffmpeg 167MiB | | 1 4043 C /root/bin/ffmpeg 167MiB |
---------------------------------------------------------------------------

here is the video card load status

  1. gpu pwr temp sm mem enc dec mclk pclk
  2. Idx W C % % % % MHz MHz
    1 30 45 6 11 36 31 3304 1227
    1 30 45 5 10 35 31 3304 1227
    1 31 45 5 10 36 31 3304 1227
    1 28 45 6 10 35 31 3304 1227
    1 29 45 4 8 36 31 3304 1227
    1 33 45 7 14 37 32 3304 1227
    1 31 45 9 17 38 33 3304 1227

If I open one more stream, cuda will not allow it. give the following error. There is no problem up to 6 streams.
Please help me if you know I have been working for 3 weeks.

Input #0, mpegts, from 'http://192.168.99.181:9981/stream/service/c33bc8249f2f51926086293b6d9f5568?profile=pass':
Duration: N/A, start: 44285.244533, bitrate: N/A
Program 1
Metadata:
service_name : 24 HD
service_provider: TURK MEDYA
Stream #0:0[0x13bf]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709, top first), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 50 tbr, 90k tbn, 50 tbc
Stream #0:1[0x1423](eng): Audio: mp2 ([4][0][0][0] / 0x0004), 48000 Hz, stereo, s16p, 256 kb/s
[AVHWDeviceContext 0x2f59a80] Could not initialize the CUDA driver API
[h264_cuvid
0x2db8600] Error creating a CUDA device
cuvid hwaccel requested for input stream #0:0, but cannot be initialized.
[h264_cuvid @ 0x2db8600] ff_get_format failed: -1
Stream mapping:
Stream #0:0 -> #0:0 (h264 (h264_cuvid) -> h264 (h264_nvenc))
Stream #0:1 -> #0:1 (mp2 (native) -> aac (libfdk_aac))
Error while opening decoder for input stream #0:0 : Operation not permitted

RE: Transcodig problem at the same time 12-13 streams - Added by saen acro over 6 years ago


You have 2 video cards from with NVS 315 is not supported
and transcoding on it is impossible
/fix command lines/

read this
tvheadend.org/boards/5/topics/31443

RE: Transcodig problem at the same time 12-13 streams - Added by ziya durgun over 6 years ago

i try /root/bin/ffmpeg -hwaccel_device 0 -hwaccel cuvid -c:v h264_cuvid -i "http://192.168.99.1810:9981/stream/service/c33bc8249f2f51926086293b6d9f5568?profile=pass" -map 0:v -c:v h264_nvenc -preset slow -profile:v high -level 4.1 -g 25 -b:v 1400k -minrate 800k -maxrate 1800k -bufsize 1002k -map 0:a -c:a libfdk_aac -ac 2 -b:a 128k -strict experimental -metadata service_provider=vizyonIPTV -metadata service_name=SERVICE -f mpegts pipe:1

-hwaccel_device 0 and 1 I try. 315 gpu 0 appears in nvidia-smi command. but it seems to be 0 in the encoding process and 0 otherwise.

Do I remove the other display card?

RE: Transcodig problem at the same time 12-13 streams - Added by saen acro over 6 years ago

ziya durgun wrote:

i try /root/bin/ffmpeg -hwaccel_device 0 -hwaccel cuvid -c:v h264_cuvid -i "http://192.168.99.1810:9981/stream/service/c33bc8249f2f51926086293b6d9f5568?profile=pass" -map 0:v -c:v h264_nvenc -preset slow -profile:v high -level 4.1 -g 25 -b:v 1400k -minrate 800k -maxrate 1800k -bufsize 1002k -map 0:a -c:a libfdk_aac -ac 2 -b:a 128k -strict experimental -metadata service_provider=vizyonIPTV -metadata service_name=SERVICE -f mpegts pipe:1

-hwaccel_device 0 and 1 I try. 315 gpu 0 appears in nvidia-smi command. but it seems to be 0 in the encoding process and 0 otherwise.

Do I remove the other display card?

URL you use is wrong
use channel url from playlist removing ticked and profile
also in example ip is wrong ;)

if its possible use card0 for decode other card1 for encode

RE: Transcodig problem at the same time 12-13 streams - Added by ziya durgun over 6 years ago

I can make encoding work fine without using nvenc. normal h264 no problem. CUDA gives error after 6 stream. here for example to display FFmpeg myself. TVHeadend does not run stream 7 either. When I try manually with ffmpeg, I get cuda init api error. However, when I close one of the 6 streams, it works fine when I try it manually. Very interesting. I did not find it blocking.

RE: Transcodig problem at the same time 12-13 streams - Added by ziya durgun over 6 years ago

i try /root/bin/ffmpeg -hwaccel_device 0 -hwaccel cuvid -c:v h264_cuvid -i "http://192.168.99.1810:9981/stream/service/c33bc8249f2f51926086293b6d9f5568?profile=pass" -map 0:v -c:v h264_nvenc -preset slow -profile:v high -level 4.1 -g 25 -b:v 1400k -minrate 800k -maxrate 1800k -bufsize 1002k -map 0:a -c:a libfdk_aac -ac 2 -b:a 128k -strict experimental -metadata service_provider=vizyonIPTV -metadata service_name=SERVICE -f mpegts pipe:1

-hwaccel_device 0 and 1 I try. 315 gpu 0 appears in nvidia-smi command. but it seems to be 0 in the encoding process and 0 otherwise.

Do I remove the other display card?

i am using NVIDIA driver R390

Will not it work without doing this? Is it because of the restriction of 6 streams with this patch?
There was a problem with the TBs drive. I will try a fresh ubuntu again.
Thank you

RE: Transcodig problem at the same time 12-13 streams - Added by ziya durgun over 6 years ago

When I run it, I see that the graphics card that does not support other encoding is used in the system, but it is only used for decode operation. When the ram capacity is full, the cuda init gives an error. The problem was resolved when I unplugged the other display board.
Thank you for everything.

    (1-23/23)