Very high cpu usage for HLS streams

Microsoft Windows specific usage questions
Forum rules
Please post only Windows specific questions in this forum category. If you don't know where to post, please read the different forums' rules. Thanks.
Ludrax
Big Cone-huna
Big Cone-huna
Posts: 568
Joined: 07 Jul 2010 14:28

Re: Very high cpu usage for HLS streams

Postby Ludrax » 08 Mar 2015 15:46

I see periodic short drop of CPU usage. :-|

It is not possible to break when using run, so I have to attach to running instance by PID. Then I see only one VLC related thread

Code: Select all

#0 0x0000000055522840 in fp_to_int (x=3545501) at src_sinc.c:98 #1 0x00000000555236be in calc_output_stereo (filter=0xfbb9e20, increment=481690, start_filter_index=308019, scale=0.91874999999999996, output=0x6afba98) at src_sinc.c:461 #2 0x0000000055523c2a in sinc_stereo_vari_process (psrc=0x8956c10, data=0xb54fb90) at src_sinc.c:548 #3 0x0000000055521ea3 in src_process (state=0x8956c10, data=0xb54fb90) at samplerate.c:174 #4 0x00000000555214fa in Resample (filter=0x7d119b0, in=0x7d26060) at ../../extras/package/win32/../../../modules/audio_filter/resampler/src.c:153 #5 0x0000000062b4b73a in aout_FiltersPipelinePlay (block=0x7d26060, count=1, filters=0xf50d558) at ../../extras/package/win32/../../../src/audio_output/filters.c:267 #6 aout_FiltersPlay (filters=0xf50d550, block=<optimized out>, block@entry=0x7d26060, rate=rate@entry=1000) at ../../extras/package/win32/../../../src/audio_output/filters.c:537 #7 0x0000000062b4985e in aout_DecPlay (aout=aout@entry=0x287ea70, block=block@entry=0x7d26060, input_rate=1000) at ../../extras/package/win32/../../../src/audio_output/dec.c:366 #8 0x0000000062b15e95 in DecoderPlayAudio (pi_lost_sum=<synthetic pointer>, pi_played_sum=<synthetic pointer>, p_audio=0x7d26060, p_dec=0x7b9f580) at ../../extras/package/win32/../../../src/input/decoder.c:1155 #9 DecoderDecodeAudio (p_dec=p_dec@entry=0x7b9f580, p_block=0x7bf5e40) at ../../extras/package/win32/../../../src/input/decoder.c:1211 #10 0x0000000062b16f32 in DecoderProcessAudio (b_flush=false, p_block=0x7a5c030, p_dec=<optimized out>) at ../../extras/package/win32/../../../src/input/decoder.c:1630 #11 DecoderProcess (p_block=<optimized out>, p_dec=<optimized out>) at ../../extras/package/win32/../../../src/input/decoder.c:1773 #12 DecoderThread (p_data=0x7b9f580) at ../../extras/package/win32/../../../src/input/decoder.c:896 #13 0x0000000062b7a742 in vlc_entry (p=0x8aeeb90) at ../../extras/package/win32/../../../src/win32/thread.c:470 #14 0x00007ffe6acdb2b7 in msvcrt!_beginthreadex () from C:\WINDOWS\system32\msvcrt.dll #15 0x00007ffe6acdb38c in msvcrt!_endthreadex () from C:\WINDOWS\system32\msvcrt.dll #16 0x00007ffe6c4c5f72 in KERNEL32!BaseThreadInitThunk () from C:\WINDOWS\system32\kernel32.dll #17 0x00007ffe6d2f9b54 in ntdll!RtlUserThreadStart () from C:\WINDOWS\SYSTEM32\ntdll.dll #18 0x0000000000000000 in ?? () Backtrace stopped: previous frame inner to this frame (corrupt stack?)
An' if ain't broke, then don't try to fix it...

r21514
Blank Cone
Blank Cone
Posts: 50
Joined: 17 Sep 2009 08:45

Re: Very high cpu usage for HLS streams

Postby r21514 » 18 Mar 2015 19:35

BTW when using libvlc with HLS streams function libvlc_media_player_stop hangs for up to 5 seconds.
Even when I call libvlc_media_player_stop from a separate thread(!) all windows and i/o processes of my application hang. Other functions work normal.

If it doesn't affect linux this must be something about windows thread implementation that creates high CPU usage and process hanging.

nars
New Cone
New Cone
Posts: 5
Joined: 17 Apr 2014 17:44

Re: Very high cpu usage for HLS streams

Postby nars » 18 Jun 2016 09:20

I'm experiencing same very high cpu problem with vlc 2.2.4 or latest 3.0 builds on Windows 7. As workaround I'm using ffmpeg to access the stream and pipe to vlc like this:
ffmpeg.exe -i http://.../playlist.m3u8 -acodec copy -vcodec copy -f matroska - | vlc.exe -
this way it works fine and with very low cpu usage, but I would surely prefer if vlc could do the job alone :)

If any developer(s) needs a link for a test HLS stream just let me know and I will send by pm (sorry I don't want to share my link publicly on the forum).


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: Baidu [Spider] and 11 guests