Bug #4932
tbl-pass: pass-sdt: -: invalid checksum / tbl-pass: pass-eit: -: invalid checksum
0%
Description
Don't know exactly what the problem could be... but better to describe and experts will tell.
Since advanced encode options of nvenc are yet to be implemented on tvheadend i been using or spawn profile in tvheadend or transcoding 100% outside tvheadend.
So if i run ffmpeg outside tvheadend and with more than 7-10 streams playing simultaneous pulling from tvheadend after a few seconds i start getting this messages on tvheadend:
2018-02-10 23:15:18.108 tbl-pass: pass-eit: -: invalid checksum (len 3825, errors 2)
2018-02-10 23:15:25.608 tbl-pass: pass-sdt: -: invalid checksum (len 933, errors 1)
2018-02-10 23:15:38.743 tbl-pass: pass-eit: -: invalid checksum (len 2135, errors 3)
2018-02-10 23:15:41.856 tbl-pass: pass-sdt: -: invalid checksum (len 771, errors 1)
2018-02-10 23:15:20.506 tbl-pass: pass-eit: -: invalid checksum (len 572, errors 5)
2018-02-10 23:15:26.788 tbl-pass: pass-eit: -: invalid checksum (len 1236, errors 2)
2018-02-10 23:15:37.628 tbl-pass: pass-eit: -: invalid checksum (len 2230, errors 3)
2018-02-10 23:16:06.976 tbl-pass: pass-eit: -: invalid checksum (len 543, errors 2)
note that i don't have any problem on source (satipaxe with 0 cc errors).
as soon as this messages begin on tvheadend the ffmpeg output become a mess full of macroblocks and freezing.
This is all being done in same machine and cpu doesn't even pass the 30%.
I tried exactly the same amount of streams with spawn profile and no problems with output... however tvheadend with this amount of streams begin to be unresponsive.
So in my last try i tried the same amount of streams but split between outside command line and spawn... same problem... this is the output of spawn:
2018-02-10 23:35:33.598 spawn: frame= 2014 fps= 23 q=37.0 size= 20791kB time=00:01:28.65 bitrate=1921.2kbits/s dup=0 drop=2008 speed=1.03x
2018-02-10 23:35:33.078 spawn: frame= 2002 fps= 23 q=37.0 size= 20680kB time=00:01:28.22 bitrate=1920.2kbits/s dup=0 drop=1996 speed=1.03x
2018-02-10 23:35:32.627 tbl-pass: pass-eit: -: invalid checksum (len 1004, errors 5)
2018-02-10 23:35:34.102 spawn: frame= 2026 fps= 23 q=37.0 size= 20901kB time=00:01:29.08 bitrate=1922.1kbits/s dup=0 drop=2020 speed=1.03x
2018-02-10 23:35:34.567 spawn: [mp2 0x37652c0] Header missing
0x3757f80] PES packet size mismatch
2018-02-10 23:35:34.605 spawn: frame= 2038 fps= 23 q=37.0 size= 21019kB time=00:01:29.59 bitrate=1921.9kbits/s dup=0 drop=2032 speed=1.03x
2018-02-10 23:35:34.647 spawn: [mpegts
2018-02-10 23:35:34.648 spawn: [mp2 0x37652c0] Header missing
0x37652c0] Header missing
2018-02-10 23:35:34.648 spawn: Error while decoding stream #0:1: Invalid data found when processing input
2018-02-10 23:35:34.566 spawn: Error while decoding stream #0:1: Invalid data found when processing input
2018-02-10 23:35:34.567 spawn: Error while decoding stream #0:1: Invalid data found when processing input
2018-02-10 23:35:34.566 spawn: [mp2
2018-02-10 23:35:34.649 spawn: [mp2 0x37652c0] Header missing
0x3757f80] PES packet size mismatch
2018-02-10 23:35:34.863 spawn: Last message repeated 1 times
2018-02-10 23:35:34.863 spawn: [mpegts
2018-02-10 23:35:34.867 spawn: [mp2 0x37652c0] Header missing
0x37652c0] Header missing
2018-02-10 23:35:34.867 spawn: Error while decoding stream #0:1: Invalid data found when processing input
2018-02-10 23:35:35.146 spawn: frame= 2050 fps= 23 q=37.0 size= 21121kB time=00:01:30.23 bitrate=1917.6kbits/s dup=0 drop=2040 speed=1.03x
2018-02-10 23:35:34.649 spawn: Error while decoding stream #0:1: Invalid data found when processing input
2018-02-10 23:35:34.733 spawn: Past duration 0.999992 too large
2018-02-10 23:35:35.567 spawn: [mp2
2018-02-10 23:35:35.567 spawn: Error while decoding stream #0:1: Invalid data found when processing input
2018-02-10 23:35:35.564 spawn: [mpegts 0x3757f80] PES packet size mismatch
0x3757f80] PES packet size mismatch
2018-02-10 23:35:36.128 spawn: frame= 2073 fps= 23 q=36.0 size= 21296kB time=00:01:31.11 bitrate=1914.8kbits/s dup=0 drop=2063 speed=1.03x
2018-02-10 23:35:36.444 spawn: [mpegts
2018-02-10 23:35:36.445 spawn: [mp2 0x37652c0] Header missing
0x3757f80] PES packet size mismatch
2018-02-10 23:35:36.445 spawn: Error while decoding stream #0:1: Invalid data found when processing input
2018-02-10 23:35:36.669 spawn: frame= 2085 fps= 23 q=37.0 size= 21453kB time=00:01:31.67 bitrate=1917.1kbits/s dup=0 drop=2075 speed=1.03x
2018-02-10 23:35:35.609 spawn: frame= 2061 fps= 23 q=37.0 size= 21191kB time=00:01:30.61 bitrate=1915.7kbits/s dup=0 drop=2051 speed=1.03x
2018-02-10 23:35:36.756 spawn: [mpegts
2018-02-10 23:35:36.798 spawn: [mp2 0x37652c0] Header missing
0x37652c0] Header missing
2018-02-10 23:35:36.798 spawn: Error while decoding stream #0:1: Invalid data found when processing input
2018-02-10 23:35:36.880 spawn: [mp2
2018-02-10 23:35:36.880 spawn: Error while decoding stream #0:1: Invalid data found when processing input
2018-02-10 23:35:37.060 spawn: Past duration 0.749992 too large
2018-02-10 23:35:37.095 spawn: Past duration 0.999992 too large
2018-02-10 23:35:37.175 spawn: Last message repeated 1 times
2018-02-10 23:35:36.798 spawn: Last message repeated 1 times
2018-02-10 23:35:37.175 spawn: [mpegts 0x3757f80] PES packet size mismatch
0x3757f80] PES packet size mismatch
2018-02-10 23:35:37.178 spawn: Error while decoding stream #0:1: Invalid data found when processing input
2018-02-10 23:35:37.425 spawn: Past duration 0.999992 too large
2018-02-10 23:35:37.486 tbl-pass: pass-eit: -: invalid checksum (len 561, errors 1)
2018-02-10 23:35:37.513 spawn: Last message repeated 1 times
2018-02-10 23:35:37.513 spawn: [mpegts
2018-02-10 23:35:37.175 spawn: frame= 2097 fps= 23 q=37.0 size= 21642kB time=00:01:32.40 bitrate=1918.6kbits/s dup=0 drop=2087 speed=1.03x
2018-02-10 23:35:37.178 spawn: [mp2 0x37652c0] Header missing
0x37652c0] Header missing
2018-02-10 23:35:37.689 spawn: [mp2
2018-02-10 23:35:37.689 spawn: Error while decoding stream #0:1: Invalid data found when processing input
2018-02-10 23:35:37.694 spawn: [mp2 @ 0x37652c0] Header missing
2018-02-10 23:35:37.694 spawn: Error while decoding stream #0:1: Invalid data found when processing input
2018-02-10 23:35:38.213 spawn: frame= 2121 fps= 23 q=37.
2018-02-10 23:35:37.689 spawn: frame= 2109 fps= 23 q=37.0 size= 21762kB time=00:01:32.79 bitrate=1921.2kbits/s dup=0 drop=2097 speed=1.03x
this is exactly the same errors i also see in ffmpeg running outside.
A small apart: when i use tvheadend stream as source of ffmpeg between the play command and to start seing image it takes around 5-8secs. This is probably related with this messages:
[h264 0x4068a40] SPS unavailable in decode_picture_timing
0x4068a40] non-existing PPS 0 referenced
[h264
[h264 0x4068a40] SPS unavailable in decode_picture_timing
0x4068a40] non-existing PPS 0 referenced
[h264
[h264 0x4068a40] decode_slice_header error
0x4068a40] no frame!
[h264
[h264 0x4068a40] SPS unavailable in decode_picture_timing
0x4068a40] non-existing PPS 0 referenced
[h264
[h264 0x4068a40] SPS unavailable in decode_picture_timing
0x4068a40] non-existing PPS 0 referenced
[h264
[h264 0x4068a40] decode_slice_header error
0x4068a40] no frame!
[h264
[h264 0x4068a40] SPS unavailable in decode_picture_timing
0x4068a40] non-existing PPS 0 referenced
[h264
[h264 0x4068a40] SPS unavailable in decode_picture_timing
0x4068a40] non-existing PPS 0 referenced
[h264
[h264 0x4068a40] decode_slice_header error
0x4068a40] no frame!
[h264
[h264 0x4068a40] SPS unavailable in decode_picture_timing
0x4068a40] non-existing PPS 0 referenced
[h264
[h264 0x4068a40] SPS unavailable in decode_picture_timing
0x4068a40] non-existing PPS 0 referenced
[h264
[h264 0x4068a40] decode_slice_header error
0x4068a40] no frame!
[h264
[h264 0x4068a40] SPS unavailable in decode_picture_timing
0x4068a40] non-existing PPS 0 referenced
[h264
[h264 0x4068a40] SPS unavailable in decode_picture_timing
0x4068a40] non-existing PPS 0 referenced
[h264
[h264 0x4068a40] decode_slice_header error
0x4068a40] no frame!
[h264
[h264 0x4068a40] SPS unavailable in decode_picture_timing
0x4068a40] non-existing PPS 0 referenced
[h264
[h264 0x4068a40] SPS unavailable in decode_picture_timing
0x4068a40] non-existing PPS 0 referenced
[h264
[h264 0x4068a40] decode_slice_header error
0x4068a40] no frame!
[h264
[h264 0x4068a40] SPS unavailable in decode_picture_timing
0x4068a40] non-existing PPS 0 referenced
[h264
[h264 0x4068a40] SPS unavailable in decode_picture_timing
0x4068a40] non-existing PPS 0 referenced
[h264
[h264 0x4068a40] decode_slice_header error
0x4068a40] no frame!
[h264
[h264 0x4068a40] SPS unavailable in decode_picture_timing
0x4068a40] non-existing PPS 0 referenced
[h264
[h264 0x4068a40] SPS unavailable in decode_picture_timing
0x4068a40] non-existing PPS 0 referenced
[h264
[h264 0x4068a40] decode_slice_header error
0x4068a40] no frame!
[h264
[h264 0x4068a40] SPS unavailable in decode_picture_timing
0x4068a40] non-existing PPS 0 referenced
[h264
[h264 0x4068a40] SPS unavailable in decode_picture_timing
0x4068a40] non-existing PPS 0 referenced
[h264
[h264 0x4068a40] decode_slice_header error
0x4068a40] no frame!
[h264
[h264 0x4068a40] SPS unavailable in decode_picture_timing
0x4068a40] non-existing PPS 0 referenced
[h264
[h264 0x4068a40] SPS unavailable in decode_picture_timing
0x4068a40] non-existing PPS 0 referenced
[h264
[h264 0x4068a40] decode_slice_header error
0x4068a40] no frame!
[h264
[h264 0x4068a40] SPS unavailable in decode_picture_timing
0x4068a40] non-existing PPS 0 referenced
[h264
[h264 0x4068a40] SPS unavailable in decode_picture_timing
0x4068a40] non-existing PPS 0 referenced
[h264
[h264 0x4068a40] decode_slice_header error
0x4068a40] no frame!
[h264
[h264 0x4068a40] SPS unavailable in decode_picture_timing
0x4068a40] non-existing PPS 0 referenced
[h264
[h264 0x4068a40] SPS unavailable in decode_picture_timing
0x4068a40] non-existing PPS 0 referenced
[h264
[h264 0x4068a40] decode_slice_header error
0x4068a40] no frame!
[h264
[h264 0x4068a40] SPS unavailable in decode_picture_timing
0x4068a40] non-existing PPS 0 referenced
[h264
[h264 0x4068a40] SPS unavailable in decode_picture_timing
0x4068a40] non-existing PPS 0 referenced
[h264
[h264 0x4068a40] decode_slice_header error
0x4068a40] no frame!
[h264
[h264 0x4068a40] SPS unavailable in decode_picture_timing
0x4068a40] non-existing PPS 0 referenced
[h264
[h264 0x4068a40] SPS unavailable in decode_picture_timing
0x4068a40] non-existing PPS 0 referenced
[h264
[h264 0x4068a40] decode_slice_header error
0x4068a40] no frame!
[h264
[h264 0x4068a40] SPS unavailable in decode_picture_timing
0x4068a40] non-existing PPS 0 referenced
[h264
[h264 0x4068a40] SPS unavailable in decode_picture_timing
0x4068a40] non-existing PPS 0 referenced
[h264
[h264 0x4068a40] decode_slice_header error
0x4068a40] no frame!
[h264
[h264 0x4068a40] SPS unavailable in decode_picture_timing
0x4068a40] non-existing PPS 0 referenced
[h264
[h264 0x4068a40] SPS unavailable in decode_picture_timing
0x4068a40] non-existing PPS 0 referenced
[h264
[h264 0x4068a40] decode_slice_header error
0x4068a40] no frame!
[h264
[h264 0x4068a40] SPS unavailable in decode_picture_timing
0x4068a40] non-existing PPS 0 referenced
[h264
[h264 0x4068a40] SPS unavailable in decode_picture_timing
0x4068a40] non-existing PPS 0 referenced
[h264
[h264 0x4068a40] decode_slice_header error
0x4068a40] no frame!
[h264
[h264 0x4068a40] SPS unavailable in decode_picture_timing
0x4068a40] non-existing PPS 0 referenced
[h264
[h264 0x4068a40] SPS unavailable in decode_picture_timing
0x4068a40] non-existing PPS 0 referenced
[h264
[h264 0x4068a40] decode_slice_header error
0x4068a40] no frame!
[h264
[h264 0x4068a40] SPS unavailable in decode_picture_timing
0x4068a40] non-existing PPS 0 referenced
[h264
[h264 0x4068a40] SPS unavailable in decode_picture_timing
0x4068a40] non-existing PPS 0 referenced
[h264
[h264 0x4068a40] decode_slice_header error
0x4068a40] no frame!
[h264
[h264 0x4068a40] SPS unavailable in decode_picture_timing
0x4068a40] non-existing PPS 0 referenced
[h264
[h264 0x4068a40] SPS unavailable in decode_picture_timing
0x4068a40] non-existing PPS 0 referenced
[h264
[h264 0x4068a40] decode_slice_header error
0x4068a40] no frame!
[h264
[h264 0x4068a40] SPS unavailable in decode_picture_timing
0x4068a40] non-existing PPS 0 referenced
[h264
[h264 0x4068a40] SPS unavailable in decode_picture_timing
0x4068a40] non-existing PPS 0 referenced
[h264
[h264 0x4068a40] decode_slice_header error
0x4068a40] no frame!
[h264
[h264 0x4068a40] SPS unavailable in decode_picture_timing
0x4068a40] non-existing PPS 0 referenced
[h264
[h264 0x4068a40] SPS unavailable in decode_picture_timing
0x4068a40] non-existing PPS 0 referenced
[h264
[h264 0x4068a40] decode_slice_header error
0x4068a40] no frame!
[h264
[h264 0x4068a40] SPS unavailable in decode_picture_timing
0x4068a40] non-existing PPS 0 referenced
[h264
[h264 0x4068a40] SPS unavailable in decode_picture_timing
0x4068a40] non-existing PPS 0 referenced
[h264
[h264 0x4068a40] decode_slice_header error
0x4068a40] no frame!
[h264
[h264 0x4068a40] SPS unavailable in decode_picture_timing
0x4068a40] non-existing PPS 0 referenced
[h264
[h264 0x4068a40] SPS unavailable in decode_picture_timing
0x4068a40] non-existing PPS 0 referenced
[h264
[h264 0x4068a40] decode_slice_header error
0x4068a40] no frame!
[h264
[h264 0x4068a40] SPS unavailable in decode_picture_timing
0x4068a40] non-existing PPS 0 referenced
[h264
[h264 0x4068a40] SPS unavailable in decode_picture_timing
0x4068a40] non-existing PPS 0 referenced
[h264
[h264 0x4068a40] decode_slice_header error
0x4068a40] no frame!
[h264
[h264 0x4068a40] SPS unavailable in decode_picture_timing
0x4068a40] non-existing PPS 0 referenced
[h264
[h264 0x4068a40] SPS unavailable in decode_picture_timing
0x4068a40] non-existing PPS 0 referenced
[h264
[h264 0x4068a40] decode_slice_header error
0x4068a40] no frame!
[h264
[h264 0x4068a40] SPS unavailable in decode_picture_timing
0x4068a40] non-existing PPS 0 referenced
[h264
[h264 0x4068a40] SPS unavailable in decode_picture_timing
0x4068a40] non-existing PPS 0 referenced
[h264
[h264 0x4068a40] decode_slice_header error
0x4068a40] no frame!
[h264
[h264 0x4068a40] SPS unavailable in decode_picture_timing
0x4068a40] non-existing PPS 0 referenced
[h264
[h264 0x4068a40] SPS unavailable in decode_picture_timing
0x4068a40] non-existing PPS 0 referenced
[h264
[h264 0x4068a40] decode_slice_header error
0x4068a40] no frame!
[h264
[h264 0x4068a40] SPS unavailable in decode_picture_timing
0x4068a40] non-existing PPS 0 referenced
[h264
[h264 0x4068a40] SPS unavailable in decode_picture_timing
0x4068a40] non-existing PPS 0 referenced
[h264
[h264 0x4068a40] decode_slice_header error
0x4068a40] no frame!
[h264
[h264 0x4068a40] SPS unavailable in decode_picture_timing
0x4068a40] non-existing PPS 0 referenced
[h264
[h264 0x4068a40] SPS unavailable in decode_picture_timing
0x4068a40] non-existing PPS 0 referenced
[h264
[h264 0x4068a40] decode_slice_header error
0x4068a40] no frame!
[h264
[h264 0x4068a40] reference picture missing during reorder
0x4068a40] Missing reference picture, default is 2147483647
[h264
[h264 0x4068a40] mmco: unref short failure
0x4068a40] number of reference frames (0+5) exceeds max (4; probably corrupt input), discarding one
Last message repeated 1 times
[h264
[h264 0x4068a40] reference picture missing during reorder
0x4068a40] Missing reference picture, default is 65447
[h264
[h264 0x4068a40] mmco: unref short failure
0x4068a40] Increasing reorder buffer to 2
Last message repeated 3 times
[h264
any workaround possible?
thanks
Files
History
Updated by Ricardo Rocha over 6 years ago
I don't think it's a duplicate... part of the problem could be the eit... I guess the problem is much more wide here. Note that using spawn I don't have any issues.
Updated by Jaroslav Kysela over 6 years ago
It seems that there is a problem with resources. You should try to run this number of ffmpeg instances without tvheadend (or use tvh only as mpegts source - http streaming), if your machine is capable to transcode such amount of streams.
Updated by Ricardo Rocha over 6 years ago
That's exactly what I did... running this number of streams using only tvheadend as source for ffmpeg makes tvheadend start with that eit and sdt errors. Resources are not a problem like I said I am using nvenc for encode and decode. When problems start I have just 15-35 cpu usage and about 20% of RAM.
Updated by Jaroslav Kysela over 6 years ago
Do you get same error with wget or curl on tvh's streams?
Updated by Ricardo Rocha over 6 years ago
using parallel to wget the streams (8) i didn't saw any errors!
anyway to pull more than 8 simultaneous?
Updated by Ricardo Rocha over 6 years ago
20 and running not even 1 problem with eit or sdt... now will try the same amount with ffmpeg pulling http stream from tvheadend!
Updated by Ricardo Rocha over 6 years ago
so last update... i even run 50 wget's without any issues...
however with ffmpeg it's a completely different story...
i tested with only 6 and it's a complete mess... problems begin with eit/sdt and streams get corrupted!!!
top -H -pid of tvheadend doesn't show nothing special.
Updated by Jaroslav Kysela over 6 years ago
You may try to increase queue size (add ?qsize=10000000 to the end of URL), but it appears that multiple ffmpeg does not consume the streams from tvheadend in time. It is not a tvh bug.
Updated by Ricardo Rocha over 6 years ago
Jaroslav Kysela wrote:
You may try to increase queue size (add ?qsize=10000000 to the end of URL), but it appears that multiple ffmpeg does not consume the streams from tvheadend in time. It is not a tvh bug.
and that's supposed to affect the tvheadend? if the ffmpeg is not consuming all the data available, it should only affect the ffmpeg instances... but in this case it's affecting also the already running streams on tvheadend (with those eit/sdt). And if i have allready some streams using spawn profile of tvheadend and they are playing just fine if i start the ffmpeg outside they are also affected.
About the gpu i don't think thats related with it... i am using exactly same line on spawn profile and outside command... i was tried 30 spawn without any errors. It just happen if i use it from bash!
Updated by Jaroslav Kysela over 6 years ago
and that's supposed to affect the tvheadend? if the ffmpeg is not consuming all the data available, it should only affect the ffmpeg instances... but in this case it's affecting also the already running streams on tvheadend (with those eit/sdt).
If there's a queue overflow, you'll get those log lines from the passthrough muxer, because some MPEG-TS data are dropped to maintain the maximal queue size, thus the SI tables delivered to the muxer are not complete.
And if i have allready some streams using spawn profile of tvheadend and they are playing just fine if i start the ffmpeg outside they are also affected.
No idea. You should investigate the problematic scheduling.
About the gpu i don't think thats related with it...
Did you really check it? There are tools to watch the GPU usage. Last time when I tried vaapi with Intel, the GPU decoding/encoding limit is somewhere around 5 streams. Nvidia might be faster, but I won't expect that the number of concurrent streams which may be processed the realtime will dramatically differ.
Updated by Ricardo Rocha over 6 years ago
Yes of course I did... using hw acceleration and advanced encode features put the limit of transcode on memory of graphic card not in cpu... and with the hardware I am using I can do more than 20 simultaneous without any problem.
Updated by Mark Clarkstone over 6 years ago
I had a think about what the problem could be & the only difference I can think of between tvh & ffmpeg directly is cuda.
As for the max number of streams it's hard to tell, I know you have a 1060 doing the transcoding, but this matrix goes by chip / board.
perhaps a fifo between tvh and ffmpeg might help?
Updated by saen acro over 6 years ago
Jaroslav Kysela wrote:
Did you really check it? There are tools to watch the GPU usage. Last time when I tried vaapi with Intel, the GPU decoding/encoding limit is somewhere around 5 streams. Nvidia might be faster, but I won't expect that the number of concurrent streams which may be processed the realtime will dramatically differ.
Intel 4600 5 HD streams + 7 SD gpu load 60-75%
Updated by Jaroslav Kysela over 6 years ago
Ricardo Rocha wrote:
Yes of course I did... using hw acceleration and advanced encode features put the limit of transcode on memory of graphic card not in cpu... and with the hardware I am using I can do more than 20 simultaneous without any problem.
Realtime? There's difference between batch and realtime processing. You should ensure that all 20 instances require less time for the processing than the streams length and that all streams are really processed continuously and in parallel.
Mark Clarstone wrote:
perhaps a fifo between tvh and ffmpeg might help?
There is already buffer for the http output (qsize as I mentioned this in comment 9). If this buffer overflows, the data are dropped. The whole problem is that ffmpeg instances (one or more) eat data slowly than received, so tvh drops them. Dot. Wget works, so the issue does not appear to be in tvh.
Updated by Ricardo Rocha over 6 years ago
Jaroslav Kysela wrote:
Ricardo Rocha wrote:
Yes of course I did... using hw acceleration and advanced encode features put the limit of transcode on memory of graphic card not in cpu... and with the hardware I am using I can do more than 20 simultaneous without any problem.
Realtime? There's difference between batch and realtime processing. You should ensure that all 20 instances require less time for the processing than the streams length and that all streams are really processed continuously and in parallel.
Mark Clarstone wrote:
perhaps a fifo between tvh and ffmpeg might help?
There is already buffer for the http output (qsize as I mentioned this in comment 9). If this buffer overflows, the data are dropped. The whole problem is that ffmpeg instances (one or more) eat data slowly than received, so tvh drops them. Dot. Wget works, so the issue does not appear to be in tvh.
No I am really confused...
Lets make it more clear...
If I set a spawn profile with exactly same command line i put on bash and make a third party program pull 20 http streams from tvheadend simultaneously it runs fine. No issues neither on ffmpeg or tvheadend.
If i pull the http streams from tvheadend without the transcode and make the transcode on bash with tvheadend and xargs to run it simultaneously the problem appears.
So what's the difference between the 2 uses?
Updated by Jaroslav Kysela over 6 years ago
Ricardo Rocha wrote:
If i pull the http streams from tvheadend without the transcode and make the transcode on bash with tvheadend and xargs to run it simultaneously the problem appears.
You may show us the real script you're using. It seems that it's not parallel as you think.
Updated by Ricardo Rocha over 6 years ago
Mark Clarstone could you please paste here the line i used? I think i wrote it on irc... I am not @home right now...
Thanks
Updated by Mark Clarkstone over 6 years ago
Ricardo Rocha wrote:
Mark Clarstone could you please paste here the line i used? I think i wrote it on irc... I am not @home right now...
Thanks
My client doesn't log private chats :/. So I don't have it. I'll have to load the module for next time. Sorry!
Updated by Ricardo Rocha over 6 years ago
No problem.... I will put it here as soon as i arrive home. And also some pictures.
Updated by Ricardo Rocha over 6 years ago
- File spawn_profile_15_streams.PNG spawn_profile_15_streams.PNG added
- File spawn_profile_15_streams_2.PNG spawn_profile_15_streams_2.PNG added
xargs -i -P 6 ffmpeg -hide_banner -loglevel error -hwaccel cuvid -c:v h264_cuvid -resize 1280x720 -deint 2 -i '{}' -c:v hevc_nvenc -preset:v llhq -profile:v main -rc:v vbr_hq -b:v 2M -minrate 1M -maxrate 3M -bufsize 4M -c:a aac -ac 2 -sn -tune zerolatency -f null /dev/null < lista.txt
my lista.txt:
http://without:transcode@localhost:1899/stream/channelnumber/1?qsize=10000000
http://without:transcode@localhost:1899/stream/channelnumber/2?qsize=10000000
http://without:transcode@localhost:1899/stream/channelnumber/3?qsize=10000000
http://without:transcode@localhost:1899/stream/channelnumber/4?qsize=10000000
http://without:transcode@localhost:1899/stream/channelnumber/5?qsize=10000000
http://without:transcode@localhost:1899/stream/channelnumber/6?qsize=10000000
http://without:transcode@localhost:1899/stream/channelnumber/7?qsize=10000000
Jaroslav Kysela look at the attached photos.... this is spawn profile of tvheadend 15 1080p to 720p.
Updated by Jaroslav Kysela over 6 years ago
There's small thinko - you have 7 channels in the list, but only 6 (-P 6) are used. But this is not a real problem.
Could you try to monitor the network traffic (loopback) ? 'iftop -i lo' - perhaps, there might be visible the lag for some streams, also strace for the ffmpeg task might be a good tool to see the bottleneck