Facing issues in streaming videos

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|

Facing issues in streaming videos

karthik
I am using below hardware specs for streaming 20 channels

Cpu:
        AMD Ryzen 7 2700
        AMD A320 chipset
        16GB DDR4 RAM
        NVidia GT 710 2GB card


Am using ffmpeg Version :

ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.11) 20160609
  configuration:
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100

================================================================================
Tasks: 289 total,  12 running, 176 sleeping,   0 stopped,   0 zombie
%Cpu(s): 58.3 us,  1.9 sy, 38.9 ni,  0.4 id,  0.0 wa,  0.0 hi,  0.5 si,
 0.0 st
KiB Mem : 16423264 total, 11093572 free,  4733008 used,   596684 buff/cache
KiB Swap:   999420 total,   999420 free,        0 used. 11328952 avail Mem

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
 5025 root      20   0 3598168 229808  33836 R 126.4  1.4   0:08.70 ffmpeg
 4613 root      20   0 3598308 231520  33964 R 119.5  1.4   0:10.89 ffmpeg
 5231 root      20   0 3598536 223284  33920 R 117.2  1.4   0:05.79 ffmpeg
 5460 root      20   0 2541288 207180  33596 R 115.8  1.3   0:06.18 ffmpeg
 4446 root      20   0 3471104 292120  33896 R 110.2  1.8   0:20.06 ffmpeg
 5563 root      20   0 2545748 206224  33140 R 103.3  1.3   0:03.52 ffmpeg
 4476 root      20   0 3643392 324660  33932 S  82.5  2.0   0:14.31 ffmpeg
 4482 root      20   0 3650476 301012  34032 R  78.9  1.8   0:14.06 ffmpeg
 4504 root      20   0 3598264 231616  33868 S  75.2  1.4   0:11.53 ffmpeg
 4458 root      20   0 3649952 297736  33896 R  74.9  1.8   0:17.60 ffmpeg
 4452 root      20   0 3473868 296656  33928 S  73.3  1.8   0:15.71 ffmpeg
 4819 root      20   0 3598336 220988  34028 S  64.4  1.3   0:07.31 ffmpeg
 4510 root      20   0 3597992 222540  34152 S  64.0  1.4   0:09.64 ffmpeg
 4490 root      20   0 3649456 290672  33732 R  63.4  1.8   0:13.47 ffmpeg
 4922 root      20   0 3598496 228344  33796 S  63.4  1.4   0:05.26 ffmpeg
 4470 root      20   0 3639348 317708  33688 R  63.0  1.9   0:14.01 ffmpeg
 4464 root      20   0 3639132 316420  34032 R  61.4  1.9   0:12.07 ffmpeg
 4498 root      20   0 3597804 222796  34088 S  58.1  1.4   0:11.54 ffmpeg
 5128 root      20   0 3598156 217808  33676 S  50.2  1.3   0:03.97 ffmpeg
 4716 root      20   0 1952556 129808  34060 S  19.8  0.8   0:03.28 ffmpeg
   94 root      20   0       0      0      0 S   0.3  0.0   0:00.08
ksoftirqd/14
  171 root      20   0       0      0      0 I   0.3  0.0   0:00.28
kworker/1:1
  173 root      20   0       0      0      0 I   0.3  0.0   0:00.22
kworker/5:1
  176 root      20   0       0      0      0 I   0.3  0.0   0:00.45
kworker/8:1
  178 root      20   0       0      0      0 I   0.3  0.0   0:00.51
kworker/10:1
  897 root      20   0       0      0      0 I   0.3  0.0   0:00.27
kworker/3:2
 1045 root      20   0       0      0      0 I   0.3  0.0   0:00.37
kworker/12:2
 1461 www-data  20   0  360740   4080   2580 S   0.3  0.0   0:00.51 apache2
 1462 www-data  20   0  360740   4080   2580 S   0.3  0.0   0:00.51 apache2
    1 root      20   0  185216   5876   4044 S   0.0  0.0   0:01.49 systemd
    2 root      20   0       0      0      0 S   0.0  0.0   0:00.00 kthreadd
    3 root      20   0       0      0      0 I   0.0  0.0   0:00.01
kworker/0:0

===========================================================================

But am facing memory consumption issue within 2 hours all RAM memories are
full and streams are jerking to play.

What is the solution for this problem. Is hardware is enough to play 20
streamers.

Am using below commands for streaming services


=================================================================
# Stream 1
STREAM_NAME=stream1
STREAM_PID_PATH=/tmp/$STREAM_NAME-pid
INPUT_URL=udp://224.1.1.1:1100
CH_NAME=mv_movies_hd



     ffmpeg -i "$INPUT_URL?overrun_nonfatal=1&fifo_size=5000000"  \
    -filter_complex
"[v:0]split=2[vtemp001][vtemp002];[vtemp001]scale=w=640:h=360[vout001],[vtemp002]scale=w=854:h=480[vout002]"
\
    -map [vout001] -c:v:0 mpeg2video -b:v:0 600k -maxrate:v:0 900k
-bufsize:v:0 1200k \
    -map [vout002] -c:v:1 mpeg2video -b:v:1 1000k -maxrate:v:1 1500k
-bufsize:v:1 2000k \
    -map a:0 -map a:0 -c:a aac -b:a 128k -ac 2 \
    -f hls -hls_time 2 -hls_list_size 4 \
    -hls_wrap 40 -hls_allow_cache 0 \
    -hls_delete_threshold 1 \
    -hls_flags delete_segments \
    -hls_start_number_source datetime \
    -start_number 10 \
    -hls_playlist_type event -master_pl_name $CH_NAME.mpeg \
    -hls_segment_filename stream_%v/data%06d.ts \
     -use_localtime_mkdir 1 \
    -var_stream_map "v:0,a:0 v:1,a:1" -crf 22  stream_%v.mpeg
=============================================================
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Facing issues in streaming videos

Brainiarc7
On Tue, 10 Mar 2020, 11:15 karthik, <[hidden email]> wrote:

> I am using below hardware specs for streaming 20 channels
>
> Cpu:
>         AMD Ryzen 7 2700
>         AMD A320 chipset
>         16GB DDR4 RAM
>         NVidia GT 710 2GB card
>
>
> Am using ffmpeg Version :
>
> ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
>   built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.11) 20160609
>   configuration:
>   libavutil      56. 31.100 / 56. 31.100
>   libavcodec     58. 54.100 / 58. 54.100
>   libavformat    58. 29.100 / 58. 29.100
>   libavdevice    58.  8.100 / 58.  8.100
>   libavfilter     7. 57.100 /  7. 57.100
>   libswscale      5.  5.100 /  5.  5.100
>   libswresample   3.  5.100 /  3.  5.100
>
>
> ================================================================================
> Tasks: 289 total,  12 running, 176 sleeping,   0 stopped,   0 zombie
> %Cpu(s): 58.3 us,  1.9 sy, 38.9 ni,  0.4 id,  0.0 wa,  0.0 hi,  0.5 si,
>  0.0 st
> KiB Mem : 16423264 total, 11093572 free,  4733008 used,   596684 buff/cache
> KiB Swap:   999420 total,   999420 free,        0 used. 11328952 avail Mem
>
>   PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
>  5025 root      20   0 3598168 229808  33836 R 126.4  1.4   0:08.70 ffmpeg
>  4613 root      20   0 3598308 231520  33964 R 119.5  1.4   0:10.89 ffmpeg
>  5231 root      20   0 3598536 223284  33920 R 117.2  1.4   0:05.79 ffmpeg
>  5460 root      20   0 2541288 207180  33596 R 115.8  1.3   0:06.18 ffmpeg
>  4446 root      20   0 3471104 292120  33896 R 110.2  1.8   0:20.06 ffmpeg
>  5563 root      20   0 2545748 206224  33140 R 103.3  1.3   0:03.52 ffmpeg
>  4476 root      20   0 3643392 324660  33932 S  82.5  2.0   0:14.31 ffmpeg
>  4482 root      20   0 3650476 301012  34032 R  78.9  1.8   0:14.06 ffmpeg
>  4504 root      20   0 3598264 231616  33868 S  75.2  1.4   0:11.53 ffmpeg
>  4458 root      20   0 3649952 297736  33896 R  74.9  1.8   0:17.60 ffmpeg
>  4452 root      20   0 3473868 296656  33928 S  73.3  1.8   0:15.71 ffmpeg
>  4819 root      20   0 3598336 220988  34028 S  64.4  1.3   0:07.31 ffmpeg
>  4510 root      20   0 3597992 222540  34152 S  64.0  1.4   0:09.64 ffmpeg
>  4490 root      20   0 3649456 290672  33732 R  63.4  1.8   0:13.47 ffmpeg
>  4922 root      20   0 3598496 228344  33796 S  63.4  1.4   0:05.26 ffmpeg
>  4470 root      20   0 3639348 317708  33688 R  63.0  1.9   0:14.01 ffmpeg
>  4464 root      20   0 3639132 316420  34032 R  61.4  1.9   0:12.07 ffmpeg
>  4498 root      20   0 3597804 222796  34088 S  58.1  1.4   0:11.54 ffmpeg
>  5128 root      20   0 3598156 217808  33676 S  50.2  1.3   0:03.97 ffmpeg
>  4716 root      20   0 1952556 129808  34060 S  19.8  0.8   0:03.28 ffmpeg
>    94 root      20   0       0      0      0 S   0.3  0.0   0:00.08
> ksoftirqd/14
>   171 root      20   0       0      0      0 I   0.3  0.0   0:00.28
> kworker/1:1
>   173 root      20   0       0      0      0 I   0.3  0.0   0:00.22
> kworker/5:1
>   176 root      20   0       0      0      0 I   0.3  0.0   0:00.45
> kworker/8:1
>   178 root      20   0       0      0      0 I   0.3  0.0   0:00.51
> kworker/10:1
>   897 root      20   0       0      0      0 I   0.3  0.0   0:00.27
> kworker/3:2
>  1045 root      20   0       0      0      0 I   0.3  0.0   0:00.37
> kworker/12:2
>  1461 www-data  20   0  360740   4080   2580 S   0.3  0.0   0:00.51 apache2
>  1462 www-data  20   0  360740   4080   2580 S   0.3  0.0   0:00.51 apache2
>     1 root      20   0  185216   5876   4044 S   0.0  0.0   0:01.49 systemd
>     2 root      20   0       0      0      0 S   0.0  0.0   0:00.00
> kthreadd
>     3 root      20   0       0      0      0 I   0.0  0.0   0:00.01
> kworker/0:0
>
> ===========================================================================
>
> But am facing memory consumption issue within 2 hours all RAM memories are
> full and streams are jerking to play.
>
> What is the solution for this problem. Is hardware is enough to play 20
> streamers.
>
> Am using below commands for streaming services
>
>
> =================================================================
> # Stream 1
> STREAM_NAME=stream1
> STREAM_PID_PATH=/tmp/$STREAM_NAME-pid
> INPUT_URL=udp://224.1.1.1:1100
> CH_NAME=mv_movies_hd
>
>
>
>      ffmpeg -i "$INPUT_URL?overrun_nonfatal=1&fifo_size=5000000"  \
>     -filter_complex
>
> "[v:0]split=2[vtemp001][vtemp002];[vtemp001]scale=w=640:h=360[vout001],[vtemp002]scale=w=854:h=480[vout002]"
> \
>     -map [vout001] -c:v:0 mpeg2video -b:v:0 600k -maxrate:v:0 900k
> -bufsize:v:0 1200k \
>     -map [vout002] -c:v:1 mpeg2video -b:v:1 1000k -maxrate:v:1 1500k
> -bufsize:v:1 2000k \
>     -map a:0 -map a:0 -c:a aac -b:a 128k -ac 2 \
>     -f hls -hls_time 2 -hls_list_size 4 \
>     -hls_wrap 40 -hls_allow_cache 0 \
>     -hls_delete_threshold 1 \
>     -hls_flags delete_segments \
>     -hls_start_number_source datetime \
>     -start_number 10 \
>     -hls_playlist_type event -master_pl_name $CH_NAME.mpeg \
>     -hls_segment_filename stream_%v/data%06d.ts \
>      -use_localtime_mkdir 1 \
>     -var_stream_map "v:0,a:0 v:1,a:1" -crf 22  stream_%v.mpeg
> =============================================================
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".



Look at the previous responses to the same query earlier on.

16 GB isn't even enough for the workload you're hitting.
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Facing issues in streaming videos

Mark Filipak
On 03/10/2020 04:35 AM, Dennis Mungai wrote:

> On Tue, 10 Mar 2020, 11:15 karthik, <[hidden email]> wrote:
>
>> I am using below hardware specs for streaming 20 channels
>>
>> Cpu:
>>          AMD Ryzen 7 2700
>>          AMD A320 chipset
>>          16GB DDR4 RAM
>>          NVidia GT 710 2GB card
>>
>>
>> Am using ffmpeg Version :
>>
>> ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
>>    built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.11) 20160609
>>    configuration:
>>    libavutil      56. 31.100 / 56. 31.100
>>    libavcodec     58. 54.100 / 58. 54.100
>>    libavformat    58. 29.100 / 58. 29.100
>>    libavdevice    58.  8.100 / 58.  8.100
>>    libavfilter     7. 57.100 /  7. 57.100
>>    libswscale      5.  5.100 /  5.  5.100
>>    libswresample   3.  5.100 /  3.  5.100
>>
>>
>> ================================================================================
>> Tasks: 289 total,  12 running, 176 sleeping,   0 stopped,   0 zombie
>> %Cpu(s): 58.3 us,  1.9 sy, 38.9 ni,  0.4 id,  0.0 wa,  0.0 hi,  0.5 si,
>>   0.0 st
>> KiB Mem : 16423264 total, 11093572 free,  4733008 used,   596684 buff/cache
>> KiB Swap:   999420 total,   999420 free,        0 used. 11328952 avail Mem
>>
>>    PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
>>   5025 root      20   0 3598168 229808  33836 R 126.4  1.4   0:08.70 ffmpeg
>>   4613 root      20   0 3598308 231520  33964 R 119.5  1.4   0:10.89 ffmpeg
>>   5231 root      20   0 3598536 223284  33920 R 117.2  1.4   0:05.79 ffmpeg
>>   5460 root      20   0 2541288 207180  33596 R 115.8  1.3   0:06.18 ffmpeg
>>   4446 root      20   0 3471104 292120  33896 R 110.2  1.8   0:20.06 ffmpeg
>>   5563 root      20   0 2545748 206224  33140 R 103.3  1.3   0:03.52 ffmpeg
>>   4476 root      20   0 3643392 324660  33932 S  82.5  2.0   0:14.31 ffmpeg
>>   4482 root      20   0 3650476 301012  34032 R  78.9  1.8   0:14.06 ffmpeg
>>   4504 root      20   0 3598264 231616  33868 S  75.2  1.4   0:11.53 ffmpeg
>>   4458 root      20   0 3649952 297736  33896 R  74.9  1.8   0:17.60 ffmpeg
>>   4452 root      20   0 3473868 296656  33928 S  73.3  1.8   0:15.71 ffmpeg
>>   4819 root      20   0 3598336 220988  34028 S  64.4  1.3   0:07.31 ffmpeg
>>   4510 root      20   0 3597992 222540  34152 S  64.0  1.4   0:09.64 ffmpeg
>>   4490 root      20   0 3649456 290672  33732 R  63.4  1.8   0:13.47 ffmpeg
>>   4922 root      20   0 3598496 228344  33796 S  63.4  1.4   0:05.26 ffmpeg
>>   4470 root      20   0 3639348 317708  33688 R  63.0  1.9   0:14.01 ffmpeg
>>   4464 root      20   0 3639132 316420  34032 R  61.4  1.9   0:12.07 ffmpeg
>>   4498 root      20   0 3597804 222796  34088 S  58.1  1.4   0:11.54 ffmpeg
>>   5128 root      20   0 3598156 217808  33676 S  50.2  1.3   0:03.97 ffmpeg
>>   4716 root      20   0 1952556 129808  34060 S  19.8  0.8   0:03.28 ffmpeg
>>     94 root      20   0       0      0      0 S   0.3  0.0   0:00.08
>> ksoftirqd/14
>>    171 root      20   0       0      0      0 I   0.3  0.0   0:00.28
>> kworker/1:1
>>    173 root      20   0       0      0      0 I   0.3  0.0   0:00.22
>> kworker/5:1
>>    176 root      20   0       0      0      0 I   0.3  0.0   0:00.45
>> kworker/8:1
>>    178 root      20   0       0      0      0 I   0.3  0.0   0:00.51
>> kworker/10:1
>>    897 root      20   0       0      0      0 I   0.3  0.0   0:00.27
>> kworker/3:2
>>   1045 root      20   0       0      0      0 I   0.3  0.0   0:00.37
>> kworker/12:2
>>   1461 www-data  20   0  360740   4080   2580 S   0.3  0.0   0:00.51 apache2
>>   1462 www-data  20   0  360740   4080   2580 S   0.3  0.0   0:00.51 apache2
>>      1 root      20   0  185216   5876   4044 S   0.0  0.0   0:01.49 systemd
>>      2 root      20   0       0      0      0 S   0.0  0.0   0:00.00
>> kthreadd
>>      3 root      20   0       0      0      0 I   0.0  0.0   0:00.01
>> kworker/0:0
>>
>> ===========================================================================
>>
>> But am facing memory consumption issue within 2 hours all RAM memories are
>> full and streams are jerking to play.
>>
>> What is the solution for this problem. Is hardware is enough to play 20
>> streamers.
>>
>> Am using below commands for streaming services
>>
>>
>> =================================================================
>> # Stream 1
>> STREAM_NAME=stream1
>> STREAM_PID_PATH=/tmp/$STREAM_NAME-pid
>> INPUT_URL=udp://224.1.1.1:1100
>> CH_NAME=mv_movies_hd
>>
>>
>>
>>       ffmpeg -i "$INPUT_URL?overrun_nonfatal=1&fifo_size=5000000"  \
>>      -filter_complex
>>
>> "[v:0]split=2[vtemp001][vtemp002];[vtemp001]scale=w=640:h=360[vout001],[vtemp002]scale=w=854:h=480[vout002]"
>> \
>>      -map [vout001] -c:v:0 mpeg2video -b:v:0 600k -maxrate:v:0 900k
>> -bufsize:v:0 1200k \
>>      -map [vout002] -c:v:1 mpeg2video -b:v:1 1000k -maxrate:v:1 1500k
>> -bufsize:v:1 2000k \
>>      -map a:0 -map a:0 -c:a aac -b:a 128k -ac 2 \
>>      -f hls -hls_time 2 -hls_list_size 4 \
>>      -hls_wrap 40 -hls_allow_cache 0 \
>>      -hls_delete_threshold 1 \
>>      -hls_flags delete_segments \
>>      -hls_start_number_source datetime \
>>      -start_number 10 \
>>      -hls_playlist_type event -master_pl_name $CH_NAME.mpeg \
>>      -hls_segment_filename stream_%v/data%06d.ts \
>>       -use_localtime_mkdir 1 \
>>      -var_stream_map "v:0,a:0 v:1,a:1" -crf 22  stream_%v.mpeg
>> =============================================================
>
> Look at the previous responses to the same query earlier on.
>
> 16 GB isn't even enough for the workload you're hitting.

I'm a newbie, but what you write doesn't seem right to me, Dennis. If
karthik is running for 2 hours before the problem shows up, it seems
likely to me that there may be a stale-buffer issue.

...just my 2 cents.
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Facing issues in streaming videos

karthik
   hi,

      I will updated to 52GB and check is that enough ??

       But what is stale-buffer issue ??

      Why CPU usage is Increasing and buffer while I am streaming for 2
hours.






On Tue, Mar 10, 2020 at 2:14 PM Mark Filipak <
[hidden email]> wrote:

> On 03/10/2020 04:35 AM, Dennis Mungai wrote:
> > On Tue, 10 Mar 2020, 11:15 karthik, <[hidden email]> wrote:
> >
> >> I am using below hardware specs for streaming 20 channels
> >>
> >> Cpu:
> >>          AMD Ryzen 7 2700
> >>          AMD A320 chipset
> >>          16GB DDR4 RAM
> >>          NVidia GT 710 2GB card
> >>
> >>
> >> Am using ffmpeg Version :
> >>
> >> ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
> >>    built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.11) 20160609
> >>    configuration:
> >>    libavutil      56. 31.100 / 56. 31.100
> >>    libavcodec     58. 54.100 / 58. 54.100
> >>    libavformat    58. 29.100 / 58. 29.100
> >>    libavdevice    58.  8.100 / 58.  8.100
> >>    libavfilter     7. 57.100 /  7. 57.100
> >>    libswscale      5.  5.100 /  5.  5.100
> >>    libswresample   3.  5.100 /  3.  5.100
> >>
> >>
> >>
> ================================================================================
> >> Tasks: 289 total,  12 running, 176 sleeping,   0 stopped,   0 zombie
> >> %Cpu(s): 58.3 us,  1.9 sy, 38.9 ni,  0.4 id,  0.0 wa,  0.0 hi,  0.5 si,
> >>   0.0 st
> >> KiB Mem : 16423264 total, 11093572 free,  4733008 used,   596684
> buff/cache
> >> KiB Swap:   999420 total,   999420 free,        0 used. 11328952 avail
> Mem
> >>
> >>    PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+
> COMMAND
> >>   5025 root      20   0 3598168 229808  33836 R 126.4  1.4   0:08.70
> ffmpeg
> >>   4613 root      20   0 3598308 231520  33964 R 119.5  1.4   0:10.89
> ffmpeg
> >>   5231 root      20   0 3598536 223284  33920 R 117.2  1.4   0:05.79
> ffmpeg
> >>   5460 root      20   0 2541288 207180  33596 R 115.8  1.3   0:06.18
> ffmpeg
> >>   4446 root      20   0 3471104 292120  33896 R 110.2  1.8   0:20.06
> ffmpeg
> >>   5563 root      20   0 2545748 206224  33140 R 103.3  1.3   0:03.52
> ffmpeg
> >>   4476 root      20   0 3643392 324660  33932 S  82.5  2.0   0:14.31
> ffmpeg
> >>   4482 root      20   0 3650476 301012  34032 R  78.9  1.8   0:14.06
> ffmpeg
> >>   4504 root      20   0 3598264 231616  33868 S  75.2  1.4   0:11.53
> ffmpeg
> >>   4458 root      20   0 3649952 297736  33896 R  74.9  1.8   0:17.60
> ffmpeg
> >>   4452 root      20   0 3473868 296656  33928 S  73.3  1.8   0:15.71
> ffmpeg
> >>   4819 root      20   0 3598336 220988  34028 S  64.4  1.3   0:07.31
> ffmpeg
> >>   4510 root      20   0 3597992 222540  34152 S  64.0  1.4   0:09.64
> ffmpeg
> >>   4490 root      20   0 3649456 290672  33732 R  63.4  1.8   0:13.47
> ffmpeg
> >>   4922 root      20   0 3598496 228344  33796 S  63.4  1.4   0:05.26
> ffmpeg
> >>   4470 root      20   0 3639348 317708  33688 R  63.0  1.9   0:14.01
> ffmpeg
> >>   4464 root      20   0 3639132 316420  34032 R  61.4  1.9   0:12.07
> ffmpeg
> >>   4498 root      20   0 3597804 222796  34088 S  58.1  1.4   0:11.54
> ffmpeg
> >>   5128 root      20   0 3598156 217808  33676 S  50.2  1.3   0:03.97
> ffmpeg
> >>   4716 root      20   0 1952556 129808  34060 S  19.8  0.8   0:03.28
> ffmpeg
> >>     94 root      20   0       0      0      0 S   0.3  0.0   0:00.08
> >> ksoftirqd/14
> >>    171 root      20   0       0      0      0 I   0.3  0.0   0:00.28
> >> kworker/1:1
> >>    173 root      20   0       0      0      0 I   0.3  0.0   0:00.22
> >> kworker/5:1
> >>    176 root      20   0       0      0      0 I   0.3  0.0   0:00.45
> >> kworker/8:1
> >>    178 root      20   0       0      0      0 I   0.3  0.0   0:00.51
> >> kworker/10:1
> >>    897 root      20   0       0      0      0 I   0.3  0.0   0:00.27
> >> kworker/3:2
> >>   1045 root      20   0       0      0      0 I   0.3  0.0   0:00.37
> >> kworker/12:2
> >>   1461 www-data  20   0  360740   4080   2580 S   0.3  0.0   0:00.51
> apache2
> >>   1462 www-data  20   0  360740   4080   2580 S   0.3  0.0   0:00.51
> apache2
> >>      1 root      20   0  185216   5876   4044 S   0.0  0.0   0:01.49
> systemd
> >>      2 root      20   0       0      0      0 S   0.0  0.0   0:00.00
> >> kthreadd
> >>      3 root      20   0       0      0      0 I   0.0  0.0   0:00.01
> >> kworker/0:0
> >>
> >>
> ===========================================================================
> >>
> >> But am facing memory consumption issue within 2 hours all RAM memories
> are
> >> full and streams are jerking to play.
> >>
> >> What is the solution for this problem. Is hardware is enough to play 20
> >> streamers.
> >>
> >> Am using below commands for streaming services
> >>
> >>
> >> =================================================================
> >> # Stream 1
> >> STREAM_NAME=stream1
> >> STREAM_PID_PATH=/tmp/$STREAM_NAME-pid
> >> INPUT_URL=udp://224.1.1.1:1100
> >> CH_NAME=mv_movies_hd
> >>
> >>
> >>
> >>       ffmpeg -i "$INPUT_URL?overrun_nonfatal=1&fifo_size=5000000"  \
> >>      -filter_complex
> >>
> >>
> "[v:0]split=2[vtemp001][vtemp002];[vtemp001]scale=w=640:h=360[vout001],[vtemp002]scale=w=854:h=480[vout002]"
> >> \
> >>      -map [vout001] -c:v:0 mpeg2video -b:v:0 600k -maxrate:v:0 900k
> >> -bufsize:v:0 1200k \
> >>      -map [vout002] -c:v:1 mpeg2video -b:v:1 1000k -maxrate:v:1 1500k
> >> -bufsize:v:1 2000k \
> >>      -map a:0 -map a:0 -c:a aac -b:a 128k -ac 2 \
> >>      -f hls -hls_time 2 -hls_list_size 4 \
> >>      -hls_wrap 40 -hls_allow_cache 0 \
> >>      -hls_delete_threshold 1 \
> >>      -hls_flags delete_segments \
> >>      -hls_start_number_source datetime \
> >>      -start_number 10 \
> >>      -hls_playlist_type event -master_pl_name $CH_NAME.mpeg \
> >>      -hls_segment_filename stream_%v/data%06d.ts \
> >>       -use_localtime_mkdir 1 \
> >>      -var_stream_map "v:0,a:0 v:1,a:1" -crf 22  stream_%v.mpeg
> >> =============================================================
> >
> > Look at the previous responses to the same query earlier on.
> >
> > 16 GB isn't even enough for the workload you're hitting.
>
> I'm a newbie, but what you write doesn't seem right to me, Dennis. If
> karthik is running for 2 hours before the problem shows up, it seems
> likely to me that there may be a stale-buffer issue.
>
> ...just my 2 cents.
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Facing issues in streaming videos

Carl Eugen Hoyos-2
In reply to this post by karthik
Am Di., 10. März 2020 um 09:15 Uhr schrieb karthik <[hidden email]>:

> But am facing memory consumption issue within 2 hours all RAM memories are
> full and streams are jerking to play.
>
> What is the solution for this problem.

Did you already try to reduce the thread count?

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Facing issues in streaming videos

karthik
hi,

    Yes I tried -threads 1 but streaming time only increased from 2 hours
to 3 hours but problem not solved.

    In before mail I have attached memory usage details , When I started up
ffmpeg

     But After 1 hours of streaming see below how much CPU and buffer it
taken


===========================================================================
Tasks: 279 total,   1 running, 180 sleeping,   0 stopped,   0 zombie
%Cpu(s): 16.0 us,  0.7 sy, 13.4 ni, 33.8 id, 35.8 wa,  0.0 hi,  0.3 si,
 0.0 st
KiB Mem : 16423264 total,   614204 free, 15411440 used,   397620 buff/cache
KiB Swap:   999420 total,   337196 free,   662224 used.   667888 avail Mem

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
 5025 root      20   0 3667796 1.133g      0 D  76.7  7.2  64:52.87 ffmpeg
 5563 root      20   0 2610844 1.092g      0 D  76.1  7.0  63:43.07 ffmpeg
 4613 root      20   0 3664840 1.111g      0 D  58.5  7.1  67:27.32 ffmpeg
 4510 root      20   0 3665812 1.131g      0 D  52.8  7.2  65:26.85 ffmpeg
 4498 root      20   0 3672292 1.135g      0 D  47.5  7.2  62:56.29 ffmpeg
 5128 root      20   0 3682128 1.141g      0 D  47.2  7.3  62:39.27 ffmpeg
 4716 root      20   0 1995172 0.991g   1656 D  43.2  6.3  37:06.58 ffmpeg
 4504 root      20   0 3743152 1.203g      0 D  42.9  7.7  58:09.57 ffmpeg
 5460 root      20   0 2614936 1.095g      0 D  16.6  7.0  57:18.69 ffmpeg
 4819 root      20   0 3672816 1.133g      0 D  11.3  7.2  62:20.48 ffmpeg
 4446 root      20   0 3507380 1.059g      0 D   8.6  6.8  87:56.31 ffmpeg
  174 root      20   0       0      0      0 I   0.3  0.0   0:04.11
kworker/6:1
 4922 root      20   0 3667888 1.134g      0 D   0.3  7.2  63:41.14 ffmpeg
 5231 root      20   0 3665708 1.126g      0 D   0.3  7.2  61:03.92 ffmpeg
 7740 user      20   0   49016   3888   3124 R   0.3  0.0   0:00.11 top
    1 root      20   0  185216   1284    724 S   0.0  0.0   0:01.80 systemd
    2 root      20   0       0      0      0 S   0.0  0.0   0:00.00 kthreadd

==================================================================================

 When started streaming cpu usage for single stream is 1.5% but withing 1
hours it raised to 7.2%

 And also see memory used it dramatically increasing.

 Kindly need solution for this issue. Why it is happening??





On Tue, Mar 10, 2020 at 3:53 PM Carl Eugen Hoyos <[hidden email]> wrote:

> Am Di., 10. März 2020 um 09:15 Uhr schrieb karthik <[hidden email]
> >:
>
> > But am facing memory consumption issue within 2 hours all RAM memories
> are
> > full and streams are jerking to play.
> >
> > What is the solution for this problem.
>
> Did you already try to reduce the thread count?
>
> Carl Eugen
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Facing issues in streaming videos

Carl Eugen Hoyos-2
Am Di., 10. März 2020 um 11:35 Uhr schrieb karthik <[hidden email]>:

> When started streaming cpu usage for single stream is 1.5%
> but withing 1 hours it raised to 7.2%
>
>  And also see memory used it dramatically increasing.

First things first:
If you want support on this mailing list, find out what top-posting
means and avoid it.

Please test current FFmpeg git head, try to simplify your command
line (is the issue reproducible with testsrc input?) and provide the
simplified command line together with the complete, uncut console
output so we can try to reproduce your issue.

After confirming that the issue is only reproducible with network
input, please test network input with simplified (file) output.

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Facing issues in streaming videos

karthik
In reply to this post by karthik
hi ,

    I tried with simple ffmpeg command

     ffmpeg -threads 1 -i udp://224.1.1.1:1100 -c:v copy -c:a copy -f
/home/user/ffmpeg-4.2.2/mw_movies.m3u8

     In that also I faced memory leakage issue I have listed below console
output and memory usage details

===================================================================================================
ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.11) 20160609
  configuration: --prefix=/root/home/user/ffmpeg-4.2.2
--pkg-config-flags=--static
--extra-cflags=-I/root/home/user/ffmpeg-4.2.2/include
--extra-ldflags=-L/root/home/user/ffmpeg-4.2.2/lib --extra-libs='-lpthread
-lm' --bindir=/root/bin --enable-gpl --enable-libx264 --enable-nonfree
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
[0;36m[h264 @ 0x2bd1640] [0m [1;31mSPS unavailable in decode_picture_timing
[0m [0;36m[h264 @ 0x2bd1640] [0m [1;31mnon-existing PPS 1 referenced
[0m [0;36m[h264 @ 0x2bd1640] [0m [1;31mSPS unavailable in
decode_picture_timing
[0m [0;36m[h264 @ 0x2bd1640] [0m [1;31mnon-existing PPS 1 referenced
[0m [0;36m[h264 @ 0x2bd1640] [0m [1;31mdecode_slice_header error
[0m [0;36m[h264 @ 0x2bd1640] [0m [1;31mno frame!
[0m [0;36m[h264 @ 0x2bd1640] [0m [1;31mSPS unavailable in
decode_picture_timing
[0m [0;36m[h264 @ 0x2bd1640] [0m [1;31mnon-existing PPS 1 referenced
[0m [0;36m[h264 @ 0x2bd1640] [0m [1;31mSPS unavailable in
decode_picture_timing
[0m [0;36m[h264 @ 0x2bd1640] [0m [1;31mnon-existing PPS 1 referenced
[0m [0;36m[h264 @ 0x2bd1640] [0m [1;31mSPS unavailable in
decode_picture_timing
[0m [0;36m[h264 @ 0x2bd1640] [0m [1;31mnon-existing PPS 1 referenced
[0m [0;36m[h264 @ 0x2bd1640] [0m [1;31mdecode_slice_header error
[0m [0;36m[h264 @ 0x2bd1640] [0m [1;31mno frame!
[0m [0;36m[h264 @ 0x2bd1640] [0m [1;31mSPS unavailable in
decode_picture_timing
[0m [0;36m[h264 @ 0x2bd1640] [0m [1;31mnon-existing PPS 1 referenced
[0m [0;36m[h264 @ 0x2bd1640] [0m [1;31mdecode_slice_header error
[0m [0;36m[h264 @ 0x2bd1640] [0m [1;31mno frame!
[0m [0;36m[h264 @ 0x2bd1640] [0m [1;31mSPS unavailable in
decode_picture_timing
[0m [0;36m[h264 @ 0x2bd1640] [0m [1;31mnon-existing PPS 1 referenced
[0m [0;36m[h264 @ 0x2bd1640] [0m [1;31mSPS unavailable in
decode_picture_timing
[0m [0;36m[h264 @ 0x2bd1640] [0m [1;31mnon-existing PPS 1 referenced
[0m [0;36m[h264 @ 0x2bd1640] [0m [1;31mSPS unavailable in
decode_picture_timing
[0m [0;36m[h264 @ 0x2bd1640] [0m [1;31mnon-existing PPS 1 referenced
[0m [0;36m[h264 @ 0x2bd1640] [0m [1;31mdecode_slice_header error
[0m [0;36m[h264 @ 0x2bd1640] [0m [1;31mno frame!
[0m [0;36m[h264 @ 0x2bd1640] [0m [1;31mSPS unavailable in
decode_picture_timing
[0m [0;36m[h264 @ 0x2bd1640] [0m [1;31mnon-existing PPS 1 referenced
[0m [0;36m[h264 @ 0x2bd1640] [0m [1;31mdecode_slice_header error
[0m [0;36m[h264 @ 0x2bd1640] [0m [1;31mno frame!
[0m [0;36m[h264 @ 0x2bd1640] [0m [1;31mSPS unavailable in
decode_picture_timing
[0m [0;36m[h264 @ 0x2bd1640] [0m [1;31mnon-existing PPS 1 referenced
[0m [0;36m[h264 @ 0x2bd1640] [0m [1;31mSPS unavailable in
decode_picture_timing
[0m [0;36m[h264 @ 0x2bd1640] [0m [1;31mnon-existing PPS 1 referenced
[0m [0;36m[h264 @ 0x2bd1640] [0m [1;31mSPS unavailable in
decode_picture_timing
[0m [0;36m[h264 @ 0x2bd1640] [0m [1;31mnon-existing PPS 1 referenced
[0m [0;36m[h264 @ 0x2bd1640] [0m [1;31mdecode_slice_header error
[0m [0;36m[h264 @ 0x2bd1640] [0m [1;31mno frame!
[0m [0;36m[h264 @ 0x2bd1640] [0m [1;31mSPS unavailable in
decode_picture_timing
[0m [0;36m[h264 @ 0x2bd1640] [0m [1;31mnon-existing PPS 1 referenced
[0m [0;36m[h264 @ 0x2bd1640] [0m [1;31mdecode_slice_header error
[0m [0;36m[h264 @ 0x2bd1640] [0m [1;31mno frame!
[0m [0;36m[h264 @ 0x2bd1640] [0m [1;31mSPS unavailable in
decode_picture_timing
[0m [0;36m[h264 @ 0x2bd1640] [0m [1;31mnon-existing PPS 1 referenced
[0m [0;36m[h264 @ 0x2bd1640] [0m [1;31mSPS unavailable in
decode_picture_timing
[0m [0;36m[h264 @ 0x2bd1640] [0m [1;31mnon-existing PPS 1 referenced
[0m [0;36m[h264 @ 0x2bd1640] [0m [1;31mSPS unavailable in
decode_picture_timing
[0m [0;36m[h264 @ 0x2bd1640] [0m [1;31mnon-existing PPS 1 referenced
[0m [0;36m[h264 @ 0x2bd1640] [0m [1;31mdecode_slice_header error
[0m [0;36m[h264 @ 0x2bd1640] [0m [1;31mno frame!
[0m [0;36m[h264 @ 0x2bd1640] [0m [1;31mSPS unavailable in
decode_picture_timing
[0m [0;36m[h264 @ 0x2bd1640] [0m [1;31mnon-existing PPS 1 referenced
[0m [0;36m[h264 @ 0x2bd1640] [0m [1;31mdecode_slice_header error
[0m [0;36m[h264 @ 0x2bd1640] [0m [1;31mno frame!
[0m [0;36m[h264 @ 0x2bd1640] [0m [1;31mSPS unavailable in
decode_picture_timing
[0m [0;36m[h264 @ 0x2bd1640] [0m [1;31mnon-existing PPS 1 referenced
[0m [0;36m[h264 @ 0x2bd1640] [0m [1;31mSPS unavailable in
decode_picture_timing
[0m [0;36m[h264 @ 0x2bd1640] [0m [1;31mnon-existing PPS 1 referenced
[0m [0;36m[h264 @ 0x2bd1640] [0m [1;31mSPS unavailable in
decode_picture_timing
[0m [0;36m[h264 @ 0x2bd1640] [0m [1;31mnon-existing PPS 1 referenced
[0m [0;36m[h264 @ 0x2bd1640] [0m [1;31mdecode_slice_header error
[0m [0;36m[h264 @ 0x2bd1640] [0m [1;31mno frame!
[0m [0;36m[h264 @ 0x2bd1640] [0m [1;31mSPS unavailable in
decode_picture_timing
[0m [0;36m[h264 @ 0x2bd1640] [0m [1;31mnon-existing PPS 1 referenced
[0m [0;36m[h264 @ 0x2bd1640] [0m [1;31mdecode_slice_header error
[0m [0;36m[h264 @ 0x2bd1640] [0m [1;31mno frame!
[0m [0;36m[h264 @ 0x2bd1640] [0m [1;31mSPS unavailable in
decode_picture_timing
[0m [0;36m[h264 @ 0x2bd1640] [0m [1;31mnon-existing PPS 1 referenced
[0m [0;36m[h264 @ 0x2bd1640] [0m [1;31mSPS unavailable in
decode_picture_timing
[0m [0;36m[h264 @ 0x2bd1640] [0m [1;31mnon-existing PPS 1 referenced
[0m [0;36m[h264 @ 0x2bd1640] [0m [1;31mdecode_slice_header error
[0m [0;36m[h264 @ 0x2bd1640] [0m [1;31mno frame!
[0mInput #0, mpegts, from 'udp://224.1.1.1:1100':
  Duration: N/A, start: 68810.527311, bitrate: N/A
  Program 1
    Metadata:
      service_name    : Multicaster1
      service_provider: www.amigofx.com
    Stream #0:0[0x400]: Video: h264 (High) ([27][0][0][0] / 0x001B),
yuv420p(top first), 1920x1080 [SAR 1:1 DAR 16:9], 30 fps, 60 tbr, 90k tbn,
60 tbc
    Stream #0:1[0x401]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz,
stereo, fltp, 128 kb/s
File '/home/user/ffmpeg-4.2.2/mw_movies.m3u8' already exists. Overwrite ?
[y/N] y
Output #0, mpegts, to '/home/user/ffmpeg-4.2.2/mw_movies.m3u8':
  Metadata:
    encoder         : Lavf58.29.100
    Stream #0:0: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(top
first), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 30 fps, 60 tbr, 90k tbn, 90k
tbc
    Stream #0:1: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo,
fltp, 128 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame=  447 fps=0.0 q=-1.0 size=    7680kB time=00:00:07.80
bitrate=8059.7kbits/s speed=15.4x
frame=  477 fps=474 q=-1.0 size=    8448kB time=00:00:08.30
bitrate=8332.0kbits/s speed=8.25x
frame=  509 fps=331 q=-1.0 size=    8960kB time=00:00:08.83
bitrate=8303.8kbits/s speed=5.75x
frame=  539 fps=264 q=-1.0 size=    9472kB time=00:00:09.33
bitrate=8308.3kbits/s speed=4.58x
frame=  569 fps=224 q=-1.0 size=    9984kB time=00:00:09.83
bitrate=8312.4kbits/s speed=3.87x
frame=  601 fps=192 q=-1.0 size=   10496kB time=00:00:10.37
bitrate=8289.4kbits/s speed=3.32x
frame=  631 fps=174 q=-1.0 size=   11008kB time=00:00:10.87
bitrate=8293.9kbits/s speed=2.99x
frame=  661 fps=160 q=-1.0 size=   11520kB time=00:00:11.37
bitrate=8298.1kbits/s speed=2.75x
frame=  695 fps=149 q=-1.0 size=   12288kB time=00:00:11.93
bitrate=8431.2kbits/s speed=2.57x
frame=  725 fps=140 q=-1.0 size=   12800kB time=00:00:12.43
bitrate=8429.5kbits/s speed= 2.4x
frame=  755 fps=133 q=-1.0 size=   13568kB time=00:00:12.93
bitrate=8590.0kbits/s speed=2.28x
frame=  787 fps=127 q=-1.0 size=   14080kB time=00:00:13.47
bitrate=8561.3kbits/s speed=2.17x
frame=  819 fps=122 q=-1.0 size=   14592kB time=00:00:14.00
bitrate=8534.7kbits/s speed=2.08x
frame=  849 fps=118 q=-1.0 size=   15104kB time=00:00:14.50
bitrate=8529.7kbits/s speed=2.01x
frame=  879 fps=114 q=-1.0 size=   15616kB time=00:00:15.00
bitrate=8525.0kbits/s speed=1.94x
frame=  909 fps=110 q=-1.0 size=   16128kB time=00:00:15.50
bitrate=8520.6kbits/s speed=1.88x
frame=  941 fps=108 q=-1.0 size=   16640kB time=00:00:16.03
bitrate=8498.8kbits/s speed=1.84x
frame=  971 fps=105 q=-1.0 size=   17152kB time=00:00:16.53
bitrate=8495.4kbits/s speed=1.79x
frame=  997 fps=102 q=-1.0 size=   17920kB time=00:00:16.97
bitrate=8649.2kbits/s speed=1.74x
frame= 1029 fps=100 q=-1.0 size=   18432kB time=00:00:17.50
bitrate=8625.3kbits/s speed=1.71x
frame= 1063 fps= 99 q=-1.0 size=   18944kB time=00:00:18.07
bitrate=8586.9kbits/s speed=1.68x
frame= 1095 fps= 97 q=-1.0 size=   19456kB time=00:00:18.60
bitrate=8566.2kbits/s speed=1.65x
frame= 1125 fps= 95 q=-1.0 size=   19968kB time=00:00:19.10
bitrate=8561.6kbits/s speed=1.62x
frame= 1155 fps= 94 q=-1.0 size=   20480kB time=00:00:19.60
bitrate=8557.2kbits/s speed=1.59x
frame= 1185 fps= 92 q=-1.0 size=   20992kB time=00:00:20.10
bitrate=8553.0kbits/s speed=1.57x
frame= 1215 fps= 91 q=-1.0 size=   21760kB time=00:00:20.60
bitrate=8650.8kbits/s speed=1.54x
frame= 1251 fps= 90 q=-1.0 size=   22272kB time=00:00:21.20
bitrate=8603.8kbits/s speed=1.52x
frame= 1281 fps= 89 q=-1.0 size=   22784kB time=00:00:21.70
bitrate=8598.8kbits/s speed=1.51x
frame= 1290 fps= 88 q=-1.0 Lsize=   23163kB time=00:00:21.85
bitrate=8681.7kbits/s speed= 1.5x


==================================================================================

When CPU memory utilization is below

top - 15:31:22 up 6 days,  2:39,  4 users,  load average: 0.00, 0.00, 0.00
Tasks: 376 total,   2 running, 275 sleeping,   0 stopped,   1 zombie
%Cpu(s):  0.0 us,  0.1 sy,  0.0 ni, 99.8 id,  0.0 wa,  0.0 hi,  0.0 si,
 0.0 st
KiB Mem : 16423264 total,   174636 free,   969200 used, 15279428 buff/cache
KiB Swap:   999420 total,   964224 free,    35196 used. 15005416 avail Mem

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
 9694 user      20   0   63104  22116  10460 R   1.7  0.1   0:04.65 ffmpeg
 9752 root      20   0   49224   3804   2984 R   0.3  0.0   0:00.67 top
17063 root      20   0  402016  68548  37332 S   0.3  0.4   2:18.72 Xorg
17647 user      20   0 1489812 110572  71540 S   0.3  0.7  20:47.17 compiz

=====================================================================


But after one hour of observation used memory is gradually increasing


op - 16:25:19 up 6 days,  3:33,  4 users,  load average: 0.00, 0.00, 0.00
Tasks: 379 total,   1 running, 279 sleeping,   0 stopped,   1 zombie
%Cpu(s):  0.1 us,  0.1 sy,  0.0 ni, 99.8 id,  0.0 wa,  0.0 hi,  0.0 si,
 0.0 st
KiB Mem : 16423264 total,   157332 free,   973664 used, 15292268 buff/cache
KiB Swap:   999420 total,   968480 free,    34940 used. 15000732 avail Mem

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
 9694 user      20   0   63104  22116  10460 S   2.0  0.1   1:06.04 ffmpeg
 9297 root      20   0       0      0      0 I   0.3  0.0   0:00.83
kworker/4:2
 9452 root      20   0       0      0      0 I   0.3  0.0   0:02.32
kworker/14:1

Kindly into this and give us solution

On Tue, Mar 10, 2020 at 1:32 PM karthik <[hidden email]> wrote:

> I am using below hardware specs for streaming 20 channels
>
> Cpu:
>         AMD Ryzen 7 2700
>         AMD A320 chipset
>         16GB DDR4 RAM
>         NVidia GT 710 2GB card
>
>
> Am using ffmpeg Version :
>
> ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
>   built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.11) 20160609
>   configuration:
>   libavutil      56. 31.100 / 56. 31.100
>   libavcodec     58. 54.100 / 58. 54.100
>   libavformat    58. 29.100 / 58. 29.100
>   libavdevice    58.  8.100 / 58.  8.100
>   libavfilter     7. 57.100 /  7. 57.100
>   libswscale      5.  5.100 /  5.  5.100
>   libswresample   3.  5.100 /  3.  5.100
>
>
> ================================================================================
> Tasks: 289 total,  12 running, 176 sleeping,   0 stopped,   0 zombie
> %Cpu(s): 58.3 us,  1.9 sy, 38.9 ni,  0.4 id,  0.0 wa,  0.0 hi,  0.5 si,
>  0.0 st
> KiB Mem : 16423264 total, 11093572 free,  4733008 used,   596684 buff/cache
> KiB Swap:   999420 total,   999420 free,        0 used. 11328952 avail Mem
>
>   PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
>  5025 root      20   0 3598168 229808  33836 R 126.4  1.4   0:08.70 ffmpeg
>  4613 root      20   0 3598308 231520  33964 R 119.5  1.4   0:10.89 ffmpeg
>  5231 root      20   0 3598536 223284  33920 R 117.2  1.4   0:05.79 ffmpeg
>  5460 root      20   0 2541288 207180  33596 R 115.8  1.3   0:06.18 ffmpeg
>  4446 root      20   0 3471104 292120  33896 R 110.2  1.8   0:20.06 ffmpeg
>  5563 root      20   0 2545748 206224  33140 R 103.3  1.3   0:03.52 ffmpeg
>  4476 root      20   0 3643392 324660  33932 S  82.5  2.0   0:14.31 ffmpeg
>  4482 root      20   0 3650476 301012  34032 R  78.9  1.8   0:14.06 ffmpeg
>  4504 root      20   0 3598264 231616  33868 S  75.2  1.4   0:11.53 ffmpeg
>  4458 root      20   0 3649952 297736  33896 R  74.9  1.8   0:17.60 ffmpeg
>  4452 root      20   0 3473868 296656  33928 S  73.3  1.8   0:15.71 ffmpeg
>  4819 root      20   0 3598336 220988  34028 S  64.4  1.3   0:07.31 ffmpeg
>  4510 root      20   0 3597992 222540  34152 S  64.0  1.4   0:09.64 ffmpeg
>  4490 root      20   0 3649456 290672  33732 R  63.4  1.8   0:13.47 ffmpeg
>  4922 root      20   0 3598496 228344  33796 S  63.4  1.4   0:05.26 ffmpeg
>  4470 root      20   0 3639348 317708  33688 R  63.0  1.9   0:14.01 ffmpeg
>  4464 root      20   0 3639132 316420  34032 R  61.4  1.9   0:12.07 ffmpeg
>  4498 root      20   0 3597804 222796  34088 S  58.1  1.4   0:11.54 ffmpeg
>  5128 root      20   0 3598156 217808  33676 S  50.2  1.3   0:03.97 ffmpeg
>  4716 root      20   0 1952556 129808  34060 S  19.8  0.8   0:03.28 ffmpeg
>    94 root      20   0       0      0      0 S   0.3  0.0   0:00.08
> ksoftirqd/14
>   171 root      20   0       0      0      0 I   0.3  0.0   0:00.28
> kworker/1:1
>   173 root      20   0       0      0      0 I   0.3  0.0   0:00.22
> kworker/5:1
>   176 root      20   0       0      0      0 I   0.3  0.0   0:00.45
> kworker/8:1
>   178 root      20   0       0      0      0 I   0.3  0.0   0:00.51
> kworker/10:1
>   897 root      20   0       0      0      0 I   0.3  0.0   0:00.27
> kworker/3:2
>  1045 root      20   0       0      0      0 I   0.3  0.0   0:00.37
> kworker/12:2
>  1461 www-data  20   0  360740   4080   2580 S   0.3  0.0   0:00.51 apache2
>  1462 www-data  20   0  360740   4080   2580 S   0.3  0.0   0:00.51 apache2
>     1 root      20   0  185216   5876   4044 S   0.0  0.0   0:01.49 systemd
>     2 root      20   0       0      0      0 S   0.0  0.0   0:00.00
> kthreadd
>     3 root      20   0       0      0      0 I   0.0  0.0   0:00.01
> kworker/0:0
>
> ===========================================================================
>
> But am facing memory consumption issue within 2 hours all RAM memories are
> full and streams are jerking to play.
>
> What is the solution for this problem. Is hardware is enough to play 20
> streamers.
>
> Am using below commands for streaming services
>
>
> =================================================================
> # Stream 1
> STREAM_NAME=stream1
> STREAM_PID_PATH=/tmp/$STREAM_NAME-pid
> INPUT_URL=udp://224.1.1.1:1100
> CH_NAME=mv_movies_hd
>
>
>
>      ffmpeg -i "$INPUT_URL?overrun_nonfatal=1&fifo_size=5000000"  \
>     -filter_complex
> "[v:0]split=2[vtemp001][vtemp002];[vtemp001]scale=w=640:h=360[vout001],[vtemp002]scale=w=854:h=480[vout002]"
> \
>     -map [vout001] -c:v:0 mpeg2video -b:v:0 600k -maxrate:v:0 900k
> -bufsize:v:0 1200k \
>     -map [vout002] -c:v:1 mpeg2video -b:v:1 1000k -maxrate:v:1 1500k
> -bufsize:v:1 2000k \
>     -map a:0 -map a:0 -c:a aac -b:a 128k -ac 2 \
>     -f hls -hls_time 2 -hls_list_size 4 \
>     -hls_wrap 40 -hls_allow_cache 0 \
>     -hls_delete_threshold 1 \
>     -hls_flags delete_segments \
>     -hls_start_number_source datetime \
>     -start_number 10 \
>     -hls_playlist_type event -master_pl_name $CH_NAME.mpeg \
>     -hls_segment_filename stream_%v/data%06d.ts \
>      -use_localtime_mkdir 1 \
>     -var_stream_map "v:0,a:0 v:1,a:1" -crf 22  stream_%v.mpeg
> =============================================================
>
>
>
>
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Facing issues in streaming videos

kumowoon1025
Hi,

> When CPU memory utilization is below
>
> top - 15:31:22 up 6 days,  2:39,  4 users,  load average: 0.00, 0.00, 0.00
> Tasks: 376 total,   2 running, 275 sleeping,   0 stopped,   1 zombie
> %Cpu(s):  0.0 us,  0.1 sy,  0.0 ni, 99.8 id,  0.0 wa,  0.0 hi,  0.0 si,
> 0.0 st
> KiB Mem : 16423264 total,   174636 free,   969200 used, 15279428 buff/cache
> KiB Swap:   999420 total,   964224 free,    35196 used. 15005416 avail Mem
>
>  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
> 9694 user      20   0   63104  22116  10460 R   1.7  0.1   0:04.65 ffmpeg
> 9752 root      20   0   49224   3804   2984 R   0.3  0.0   0:00.67 top
> 17063 root      20   0  402016  68548  37332 S   0.3  0.4   2:18.72 Xorg
> 17647 user      20   0 1489812 110572  71540 S   0.3  0.7  20:47.17 compiz

I don’t know how accurate top is here, but doesn't that indicate that by the time you launched ffmpeg, only ~1% memory was available?

Regards,
Ted Park

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Facing issues in streaming videos

karthik
I almost run a stream for a whole day for testing.

As of memory leakage continuous I finally send you the console log.

Anyhow memory utilization is increasing. When I run stream using simple
command also.

   ffmpeg -threads 1 -i udp://224.1.1.1:1100 -c:v copy -c:a copy -f
/home/user/ffmpeg-4.2.2/mw_movies.m3u8 .



On Mon, Mar 16, 2020 at 5:48 PM Ted Park <[hidden email]> wrote:

> Hi,
>
> > When CPU memory utilization is below
> >
> > top - 15:31:22 up 6 days,  2:39,  4 users,  load average: 0.00, 0.00,
> 0.00
> > Tasks: 376 total,   2 running, 275 sleeping,   0 stopped,   1 zombie
> > %Cpu(s):  0.0 us,  0.1 sy,  0.0 ni, 99.8 id,  0.0 wa,  0.0 hi,  0.0 si,
> > 0.0 st
> > KiB Mem : 16423264 total,   174636 free,   969200 used, 15279428
> buff/cache
> > KiB Swap:   999420 total,   964224 free,    35196 used. 15005416 avail
> Mem
> >
> >  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+
> COMMAND
> > 9694 user      20   0   63104  22116  10460 R   1.7  0.1   0:04.65 ffmpeg
> > 9752 root      20   0   49224   3804   2984 R   0.3  0.0   0:00.67 top
> > 17063 root      20   0  402016  68548  37332 S   0.3  0.4   2:18.72 Xorg
> > 17647 user      20   0 1489812 110572  71540 S   0.3  0.7  20:47.17
> compiz
>
> I don’t know how accurate top is here, but doesn't that indicate that by
> the time you launched ffmpeg, only ~1% memory was available?
>
> Regards,
> Ted Park
>
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Facing issues in streaming videos

karthik
> hi,
>

       I used below command and done testing from Morning onwards.

      ffmpeg -threads 1 -i udp://224.1.1.1:1100 -c:v copy -c:a copy -f
/home/user/ffmpeg-4.2.2/mw_movies.m3u8

   At the start of streaming memory as below
=============================================================
top - 11:02:19 up 16:48,  3 users,  load average: 0.04, 0.01, 0.00
Tasks: 317 total,   2 running, 217 sleeping,   0 stopped,   0 zombie
%Cpu(s):  0.1 us,  0.0 sy,  0.0 ni, 99.9 id,  0.0 wa,  0.0 hi,  0.0 si,
 0.0 st
KiB Mem : 16423264 total, 14990164 free,   642272 used,   790828 buff/cache
KiB Swap:   999420 total,   999420 free,        0 used. 15408016 avail Mem

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
 5979 root      20   0   76104  23360  10300 R   2.2  0.1   0:00.50 ffmpeg
    1 root      20   0  185108   5740   4012 S   0.0  0.0   0:02.68 systemd
    2 root      20   0       0      0      0 S   0.0  0.0   0:00.00 kthreadd
    4 root       0 -20       0      0      0 I   0.0  0.0   0:00.00
kworker/0:0H
    6 root       0 -20       0      0      0 I   0.0  0.0   0:00.00
mm_percpu_wq


top - 11:59:05 up 17:45,  3 users,  load average: 0.82, 0.56, 0.24
Tasks: 321 total,   1 running, 221 sleeping,   0 stopped,   0 zombie
%Cpu(s):  0.0 us,  0.0 sy,  0.0 ni, 99.9 id,  0.0 wa,  0.0 hi,  0.0 si,
 0.0 st
KiB Mem : 16423264 total, 11984280 free,   645812 used,  3793172 buff/cache
KiB Swap:   999420 total,   999420 free,        0 used. 15363252 avail Mem

======================================================================

And after one hour of running --> memory usage as below



Tasks: 321 total,   1 running, 221 sleeping,   0 stopped,   0 zombie
%Cpu(s):  0.0 us,  0.1 sy,  0.0 ni, 99.9 id,  0.0 wa,  0.0 hi,  0.0 si,
 0.0 st
KiB Mem : 16423264 total, 11981684 free,   645936 used,  3795644 buff/cache
KiB Swap:   999420 total,   999420 free,        0 used. 15363132 avail Mem

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
 5979 root      20   0   76104  23360  10300 S   2.0  0.1   1:09.99 ffmpeg
 6305 root      20   0   49120   4044   3188 R   0.3  0.0   0:00.02 top


 In one hour of duration it used memory is gradually increasing.

Kindly give us solution for this.

And console output of the streaming as follows



root@TESTING-FFMPEG:/var/www/html/hls/live/mobile/testing#  ffmpeg -threads
1 -i udp://231.1.1.108:1026 -c:v copy -c:a copy -f mpegts
/home/user/ffmpeg-4.2.2/Ajk_live_Telecast.m3u8
ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.11) 20160609
  configuration: --prefix=/root/home/user/ffmpeg-4.2.2
--pkg-config-flags=--static
--extra-cflags=-I/root/home/user/ffmpeg-4.2.2/include
--extra-ldflags=-L/root/home/user/ffmpeg-4.2.2/lib --extra-libs='-lpthread
-lm' --bindir=/root/bin --enable-gpl --enable-libx264 --enable-nonfree
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
[h264 @ 0x2390640] SPS unavailable in decode_picture_timing
[h264 @ 0x2390640] non-existing PPS 0 referenced
[h264 @ 0x2390640] SPS unavailable in decode_picture_timing
[h264 @ 0x2390640] non-existing PPS 0 referenced
[h264 @ 0x2390640] decode_slice_header error
[h264 @ 0x2390640] no frame!
[h264 @ 0x2390640] SPS unavailable in decode_picture_timing
[h264 @ 0x2390640] non-existing PPS 0 referenced
[h264 @ 0x2390640] SPS unavailable in decode_picture_timing
[h264 @ 0x2390640] non-existing PPS 0 referenced
[h264 @ 0x2390640] SPS unavailable in decode_picture_timing
[h264 @ 0x2390640] non-existing PPS 0 referenced
[h264 @ 0x2390640] decode_slice_header error
[h264 @ 0x2390640] no frame!
[h264 @ 0x2390640] SPS unavailable in decode_picture_timing
[h264 @ 0x2390640] non-existing PPS 0 referenced
[h264 @ 0x2390640] decode_slice_header error
[h264 @ 0x2390640] no frame!
[h264 @ 0x2390640] SPS unavailable in decode_picture_timing
[h264 @ 0x2390640] non-existing PPS 0 referenced
[h264 @ 0x2390640] SPS unavailable in decode_picture_timing
[h264 @ 0x2390640] non-existing PPS 0 referenced
[h264 @ 0x2390640] SPS unavailable in decode_picture_timing
[h264 @ 0x2390640] non-existing PPS 0 referenced
[h264 @ 0x2390640] decode_slice_header error
[h264 @ 0x2390640] no frame!
[h264 @ 0x2390640] SPS unavailable in decode_picture_timing
[h264 @ 0x2390640] non-existing PPS 0 referenced
[h264 @ 0x2390640] decode_slice_header error
[h264 @ 0x2390640] no frame!
[h264 @ 0x2390640] SPS unavailable in decode_picture_timing
[h264 @ 0x2390640] non-existing PPS 0 referenced
[h264 @ 0x2390640] SPS unavailable in decode_picture_timing
[h264 @ 0x2390640] non-existing PPS 0 referenced
[h264 @ 0x2390640] SPS unavailable in decode_picture_timing
[h264 @ 0x2390640] non-existing PPS 0 referenced
[h264 @ 0x2390640] decode_slice_header error
[h264 @ 0x2390640] no frame!
[h264 @ 0x2390640] SPS unavailable in decode_picture_timing
[h264 @ 0x2390640] non-existing PPS 0 referenced
[h264 @ 0x2390640] decode_slice_header error
[h264 @ 0x2390640] no frame!
[h264 @ 0x2390640] SPS unavailable in decode_picture_timing
[h264 @ 0x2390640] non-existing PPS 0 referenced
[h264 @ 0x2390640] SPS unavailable in decode_picture_timing
[h264 @ 0x2390640] non-existing PPS 0 referenced
[h264 @ 0x2390640] decode_slice_header error
[h264 @ 0x2390640] no frame!
Input #0, mpegts, from 'udp://231.1.1.108:1026':
  Duration: N/A, start: 7704.710000, bitrate: N/A
  Program 96
    Metadata:
      service_name    : AJK Music HD
      service_provider:
    Stream #0:0[0x71]: Video: h264 (High) ([27][0][0][0] / 0x001B),
yuv420p(top first), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 50 tbr, 90k tbn,
50 tbc
    Stream #0:1[0x72]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz,
stereo, fltp, 128 kb/s
Output #0, mpegts, to '/home/user/ffmpeg-4.2.2/Ajk_live_Telecast.m3u8':
  Metadata:
    encoder         : Lavf58.29.100
    Stream #0:0: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(top
first), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 25 fps, 50 tbr, 90k tbn, 90k
tbc
    Stream #0:1: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo,
fltp, 128 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)

 Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame=  447 fps=0.0 q=-1.0 size=    7680kB time=00:00:07.80
bitrate=8059.7kbits/s speed=15.4x
frame=  477 fps=474 q=-1.0 size=    8448kB time=00:00:08.30
bitrate=8332.0kbits/s speed=8.25x
frame=  509 fps=331 q=-1.0 size=    8960kB time=00:00:08.83
bitrate=8303.8kbits/s speed=5.75x
frame=  539 fps=264 q=-1.0 size=    9472kB time=00:00:09.33
bitrate=8308.3kbits/s speed=4.58x
frame=  569 fps=224 q=-1.0 size=    9984kB time=00:00:09.83
bitrate=8312.4kbits/s speed=3.87x
frame=  601 fps=192 q=-1.0 size=   10496kB time=00:00:10.37
bitrate=8289.4kbits/s speed=3.32x
frame=  631 fps=174 q=-1.0 size=   11008kB time=00:00:10.87
bitrate=8293.9kbits/s speed=2.99x
frame=  661 fps=160 q=-1.0 size=   11520kB time=00:00:11.37
bitrate=8298.1kbits/s speed=2.75x
frame=  695 fps=149 q=-1.0 size=   12288kB time=00:00:11.93
bitrate=8431.2kbits/s speed=2.57x
frame=  725 fps=140 q=-1.0 size=   12800kB time=00:00:12.43
bitrate=8429.5kbits/s speed= 2.4x
frame=  755 fps=133 q=-1.0 size=   13568kB time=00:00:12.93
bitrate=8590.0kbits/s speed=2.28x
frame=  787 fps=127 q=-1.0 size=   14080kB time=00:00:13.47
bitrate=8561.3kbits/s speed=2.17x
frame=  819 fps=122 q=-1.0 size=   14592kB time=00:00:14.00
bitrate=8534.7kbits/s speed=2.08x
frame=  849 fps=118 q=-1.0 size=   15104kB time=00:00:14.50
bitrate=8529.7kbits/s speed=2.01x
frame=  879 fps=114 q=-1.0 size=   15616kB time=00:00:15.00
bitrate=8525.0kbits/s speed=1.94x
frame=  909 fps=110 q=-1.0 size=   16128kB time=00:00:15.50
bitrate=8520.6kbits/s speed=1.88x
frame=  941 fps=108 q=-1.0 size=   16640kB time=00:00:16.03
bitrate=8498.8kbits/s speed=1.84x
frame=  971 fps=105 q=-1.0 size=   17152kB time=00:00:16.53
bitrate=8495.4kbits/s speed=1.79x
frame=  997 fps=102 q=-1.0 size=   17920kB time=00:00:16.97
bitrate=8649.2kbits/s speed=1.74x
frame= 1029 fps=100 q=-1.0 size=   18432kB time=00:00:17.50
bitrate=8625.3kbits/s speed=1.71x
frame= 1063 fps= 99 q=-1.0 size=   18944kB time=00:00:18.07
bitrate=8586.9kbits/s speed=1.68x
frame= 1095 fps= 97 q=-1.0 size=   19456kB time=00:00:18.60
bitrate=8566.2kbits/s speed=1.65x
frame= 1125 fps= 95 q=-1.0 size=   19968kB time=00:00:19.10
bitrate=8561.6kbits/s speed=1.62x
frame= 1155 fps= 94 q=-1.0 size=   20480kB time=00:00:19.60
bitrate=8557.2kbits/s speed=1.59x
frame= 1185 fps= 92 q=-1.0 size=   20992kB time=00:00:20.10
bitrate=8553.0kbits/s speed=1.57x
frame= 1215 fps= 91 q=-1.0 size=   21760kB time=00:00:20.60
bitrate=8650.8kbits/s speed=1.54x
frame= 1251 fps= 90 q=-1.0 size=   22272kB time=00:00:21.20
bitrate=8603.8kbits/s speed=1.52x
frame= 1281 fps= 89 q=-1.0 size=   22784kB time=00:00:21.70
bitrate=8598.8kbits/s speed=1.51x
frame= 1290 fps= 88 q=-1.0 Lsize=   23163kB time=00:00:21.85
bitrate=8681.7kbits/s speed= 1.5x



Kindly into this and give us solution




>
>
>
>> [hidden email]
>> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>>
>> To unsubscribe, visit link above, or email
>> [hidden email] with subject "unsubscribe".
>
>
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Facing issues in streaming videos

kumowoon1025
Hi,

So it starts out like this:
> top - 11:02:19 up 16:48,  3 users,  load average: 0.04, 0.01, 0.00

> KiB Mem : 16423264 total, 14990164 free,   642272 used,   790828 buff/cache
> KiB Swap:   999420 total,   999420 free,        0 used. 15408016 avail Mem
>
>  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
> 5979 root      20   0   76104  23360  10300 R   2.2  0.1   0:00.50 ffmpeg

And looks like this in an hour..
> top - 11:59:05 up 17:45,  3 users,  load average: 0.82, 0.56, 0.24

> KiB Mem : 16423264 total, 11981684 free,   645936 used,  3795644 buff/cache
> KiB Swap:   999420 total,   999420 free,        0 used. 15363132 avail Mem
>
>  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
> 5979 root      20   0   76104  23360  10300 S   2.0  0.1   1:09.99 ffmpeg
> 6305 root      20   0   49120   4044   3188 R   0.3  0.0   0:00.02 top
>
>
> In one hour of duration it used memory is gradually increasing.
>
> Kindly give us solution for this.

In ~1hr buff/cache used (probably buffers mostly) increased by (3795644-790828)KiB=3004816KiB
So an average of about 900KiB/s

I assume this only happens when streaming with ffmpeg?

It does look like they are closely related if so,
> And console output of the streaming as follows
>
>
>
> root@TESTING-FFMPEG:/var/www/html/hls/live/mobile/testing#  ffmpeg -threads
> 1 -i udp://231.1.1.108:1026 -c:v copy -c:a copy -f mpegts
> /home/user/ffmpeg-4.2.2/Ajk_live_Telecast.m3u8

> Output #0, mpegts, to '/home/user/ffmpeg-4.2.2/Ajk_live_Telecast.m3u8':
>  Metadata:
>    encoder         : Lavf58.29.100
>    Stream #0:0: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(top
> first), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 25 fps, 50 tbr, 90k tbn, 90k
> tbc
>    Stream #0:1: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo,
> fltp, 128 kb/s
> Stream mapping:
>  Stream #0:0 -> #0:0 (copy)
>  Stream #0:1 -> #0:1 (copy)
>
> Stream #0:1 -> #0:1 (copy)
> Press [q] to stop, [?] for help
> frame=  447 fps=0.0 q=-1.0 size=    7680kB time=00:00:07.80
> bitrate=8059.7kbits/s speed=15.4x
> frame=  477 fps=474 q=-1.0 size=    8448kB time=00:00:08.30
> bitrate=8332.0kbits/s speed=8.25x

> frame= 1281 fps= 89 q=-1.0 size=   22784kB time=00:00:21.70
> bitrate=8598.8kbits/s speed=1.51x
> frame= 1290 fps= 88 q=-1.0 Lsize=   23163kB time=00:00:21.85
> bitrate=8681.7kbits/s speed= 1.5x


The stream bitrate reaches ~1000kB/s which is similar so it’s probably the disk buffer that’s taking up the memory.

But if you look at the available memory, it only drops from 15408016 KiB to 15363132KiB, about 50MB. If you start another program that requires a lot of memory, that buffer would probably be cleared immediately.

The other situation where you are downloading the stream and starting a dozen transcoding jobs is different, in that case that memory is taken.

What I mean is this doesn’t seem out of the ordinary at all.


Regards,
Ted Park

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Facing issues in streaming videos

karthik
hi,

     Yes, if I use filters and scaling means again it will take lots of
memory.

    Without any type of trans coding also it taking available memory .

     I need to stream Live data, so If I start another streamer again
memory will increases rapidly [For 1 hour it almost taken 50MB of memory ,
so if I run about 6 streams within in a day it will  takes lots of memory]

     If I Increase memory also anyhow problem will come in any day because
of increasing in memory.

    so How to clear used memory buffer information ??

    How to solve this issue ?? What I have done wrong any solution for this
??


> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Facing issues in streaming videos

karthik
Any updates regarding about this issue

On Tue, Mar 17, 2020 at 3:23 PM karthik <[hidden email]> wrote:

> hi,
>
>      Yes, if I use filters and scaling means again it will take lots of
> memory.
>
>     Without any type of trans coding also it taking available memory .
>
>      I need to stream Live data, so If I start another streamer again
> memory will increases rapidly [For 1 hour it almost taken 50MB of memory ,
> so if I run about 6 streams within in a day it will  takes lots of memory]
>
>      If I Increase memory also anyhow problem will come in any day because
> of increasing in memory.
>
>     so How to clear used memory buffer information ??
>
>     How to solve this issue ?? What I have done wrong any solution for
> this ??
>
>
>> _______________________________________________
>> ffmpeg-user mailing list
>> [hidden email]
>> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>>
>> To unsubscribe, visit link above, or email
>> [hidden email] with subject "unsubscribe".
>
>
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Facing issues in streaming videos

Gabriele Greco
In reply to this post by kumowoon1025
Il giorno mar 17 mar 2020 alle ore 08:24 Ted Park <[hidden email]>
ha scritto:

>
> So it starts out like this:
> > 5979 root      20   0   76104  23360  10300 R   2.2  0.1   0:00.50 ffmpeg
>
> And looks like this in an hour..
> > 5979 root      20   0   76104  23360  10300 S   2.0  0.1   1:09.99 ffmpeg
>
>
It seems to me that after an hour ffmpeg is still using 23M (within a
virtual space of 76MB)

Your free memory is lower only because maybe some other process has cached
filesystem objects in memory.

To check for a memory leak of ffmpeg look at the memory usage of the
process itself, for instance:

time && ps aux | grep ffmpeg | grep -v grep

...executed periodically on a terminal will be more effective that using
top.

If the memory does not grow with the simple stream copy you used for this
test try to perform the test using your filter chain, I think the problem
if present is in something inside your filters, and it will not trigger for
sure without encoding at all.

--
Bye,
 Gabry

--


Le informazioni contenute nella presente comunicazione e i relativi
allegati possono essere riservate e sono, comunque, destinate
esclusivamente alle persone o alla Società sopraindicati e non sono da
considerarsi comunicazioni personali, quindi eventuali risposte potranno
essere conosciute da persone appartenenti all’azienda. La diffusione,
distribuzione e/o copiatura del documento trasmesso da parte di qualsiasi
soggetto diverso dal destinatario è proibita ai sensi dell’art. 616 c.p. I
dati forniti verranno trattati ai sensi dell'art. 13 del Regolamento UE
2016/679 (normativa sulla privacy). Se ha ricevuto questo messaggio per
errore Ti preghiamo di distruggerlo e di informarci immediatamente
contattandoci mandando una mail a [hidden email]
<mailto:[hidden email]>. Copia integrale dell’informativa potrà essere
visionata presso le nostre sedi. 

Any information herein included (even
any attachments) shall be considered confidential and/or privileged
material and meant to be only for the abovementioned persons and/or
Company, therefore such communication is intended to be for the addressee
only. Such information is not personal, that is why this e-mail and any
replies may be known exclusively by people belonging to the company. It is
expressively not allowed communicate, disclose and/or copy any
documentation transmitted by a person other than the recipient, according
to the Italian Criminal Code, Section 616 and the Regulation EU 2016/679.
Your provided data are processed in accordance with Regulation EU 2016/679
(Data Protection Law), Section 13. A full copy of the relevant information
notice is available at the company’s registered office upon request. If you
received this in error, please destroy it and inform us immediately by
sending an e-mail to the following e-mail address [hidden email]
<mailto:[hidden email]>. A full copy of the relevant information
notice is available at the company’s registered office upon request.
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".