[FFmpeg-user] Receive network stream and drop without decoding
Andrius Narbutas
abialyna at gmail.com
Mon Jun 15 23:05:12 EEST 2020
Hello, trying to do something like "DASH load generator" for testing.
Trying to simulate DASH client on unencrypted stream (using public
stream in examples, should be accessible from anywhere):
ffplay -nodisp -vst 3 -an -i
'http://download.tsi.telecom-paristech.fr/gpac/dataset/dash/uhd/dashevc-ondemand-4s/dashevc-ondemand-4s-p60.mpd'
- this works and displays no video, but eats 40-50% of CPU core.
Recompiled latest git pull with debug symbols, ran perf, top 4 CPU users:
9.01% ff_h264_decode_mb_cabac
6.66% decode_cabac_residual_nondc_internal.isra.4
6.16% loop_filter
5.19% get_cabac
So, it is clearly doing decoding even with -nodisp and -vn options (-vn
makes no difference).
On IRC i got suggestion to use ffmpeg instead of ffplay:
ffmpeg/bin/ffmpeg -hide_banner -vn -an -i
http://download.tsi.telecom-paristech.fr/gpac/dataset/dash/uhd/dashevc-ondemand-4s/dashevc-ondemand-4s-p60.mpd
-f null -
..then it fails with:
Output #0, null, to 'pipe:':
Output file #0 does not contain any stream
If i skip -vn and -an - it works without problems (i see traffic
flowing) but eats even more CPU (~70%)
So far this is not suitable as "fake client" as server can handle
thousands clients, but "client server" can barely handle 100 connections.
Is there any way to tell ffmpeg to receive stream (network traffic) and
discard it immediately, without decoding?
More information about the ffmpeg-user
mailing list