Topic: The new SVP-cast is awesome! But why only cpu usage?

I tried to stream a full size 4k movie, but for some reason when i choose encoder as Nvenc, it still uses 100% cpu with barely 30 fps?

Streaming to my shield tv PRO which has a built in 4k chromecast.

Re: The new SVP-cast is awesome! But why only cpu usage?

You probably need to lower SVP settings in the video profile?

BTW, the original Google's Chromecast is very unstable playing > ~15M stream
In fact, Plex Server limits the bandwidth to 12M when streaming to Chromecast
I wonder how Shield is performing with higher bandwidth limits?

3 (edited by Duckers 23-12-2017 14:56:21)

Re: The new SVP-cast is awesome! But why only cpu usage?

Chainik wrote:

You probably need to lower SVP settings in the video profile?

BTW, the original Google's Chromecast is very unstable playing > ~15M stream
In fact, Plex Server limits the bandwidth to 12M when streaming to Chromecast
I wonder how Shield is performing with higher bandwidth limits?

The thing is that it apparently wouldn't stream it because the framerate was not reaching what i set it to. It started fine when streaming a 720p episode at a solid 60, but struggled to get 60 fps for the 4k videop and apparently wouldn't send the image it barely was able to send because the cpu was at 100%.

And why doesn't it use my GPU? The cpu went 100% when attempting to stream the 4k video even when i set it to use gpu decoding, but it uses the cpu regardless.

Re: The new SVP-cast is awesome! But why only cpu usage?

how high is the CPU load when watching the same 4K movie on the PC via mpv with SVP enabled?

5 (edited by Duckers 25-12-2017 16:30:06)

Re: The new SVP-cast is awesome! But why only cpu usage?

Chainik wrote:

how high is the CPU load when watching the same 4K movie on the PC via mpv with SVP enabled?

My go to player is mpc hc, but when testing now, the 4k movies crashes the player instantly.

And when i tried  mpv with the default device being gpu. then it stutters a lot with 100% cpu, but when i set it to use the cpu as the rendering device, then it uses 24% gpu and 14% cpu.

And when i tried again with the streamer, it still used 100% cpu in cpu and gpu render device.

Re: The new SVP-cast is awesome! But why only cpu usage?

Duckers wrote:
Chainik wrote:

how high is the CPU load when watching the same 4K movie on the PC via mpv with SVP enabled?

My go to player is mpc hc, but when testing now, the 4k movies crashes the player instantly.

And when i tried  mpv with the default device being gpu. then it stutters a lot with 100% cpu, but when i set it to use the cpu as the rendering device, then it uses 24% gpu and 14% cpu.

And when i tried again with the streamer, it still used 100% cpu in cpu and gpu render device.

I am curious here how you changed MPV from using GPU to CPU. As I cannot play 4K HDR Movies with MPV using my 4790K @ 4.7Ghz right now paired with a GTX1070.

Even when testing normal 4K movies (non 10bit HDR) with MPC they run smoothly without issues or too much GPU+CPU usage, but with MPV as always it cannot handle 4K for some reason. So I'm curious to see if implementing your method above of changing MPV's default device from GPU to CPU can increase performance.

7 (edited by Duckers 26-12-2017 00:56:03)

Re: The new SVP-cast is awesome! But why only cpu usage?

Blackfyre wrote:
Duckers wrote:
Chainik wrote:

how high is the CPU load when watching the same 4K movie on the PC via mpv with SVP enabled?

My go to player is mpc hc, but when testing now, the 4k movies crashes the player instantly.

And when i tried  mpv with the default device being gpu. then it stutters a lot with 100% cpu, but when i set it to use the cpu as the rendering device, then it uses 24% gpu and 14% cpu.

And when i tried again with the streamer, it still used 100% cpu in cpu and gpu render device.

I am curious here how you changed MPV from using GPU to CPU. As I cannot play 4K HDR Movies with MPV using my 4790K @ 4.7Ghz right now paired with a GTX1070.

Even when testing normal 4K movies (non 10bit HDR) with MPC they run smoothly without issues or too much GPU+CPU usage, but with MPV as always it cannot handle 4K for some reason. So I'm curious to see if implementing your method above of changing MPV's default device from GPU to CPU can increase performance.

this is how.

And also, for some reason, the svp cast doesn't work anymore. I try to choose my shield tv, smart tv, but now it won't start on any of them. It has a stable framerate for a 1080p movie, but won't triger my devices at all.

when i test non HDR 10bit with mpc, it just crashes. But mpv for some reason when i tried it now, did not use the interpolation at all. It was at 24 fps.

https://i.imgur.com/YAPayTY.png

Re: The new SVP-cast is awesome! But why only cpu usage?

Ryzen 7 CPU playing 4K 24->60 fps:

SVP auto settings #3: "13:21:53.015 []: Profile: using auto values [3]"

mpv - ~65% CPU load
streaming (12M, NVENC H.264) - up to 80% load, solid 60 fps rate
streaming (12M, software x264, "superfast" preset) - 95% load, 41 fps

SVP auto settings #1: "13:21:53.015 []: Profile: using auto values [1]"

mpv - ~75% CPU load
streaming (12M, NVENC H.264) - up to 90% load, only 53 fps rate (!!!)


Conclusions:
1. ffmpeg needs some CPU power even with hw encoder in use
2. if there's no enough CPU power left then NVENC performance will be degraded
3. you need a high-end CPU to stream 4K, 4 cores i7 is NOT enough

Re: The new SVP-cast is awesome! But why only cpu usage?

SVPCast sounds like a nice idea, but my issue with it is, that it dies before even the output begins.

11:58:40.135: ===== Starting transcoding ======
11:58:40.135: Command line 1: C:\Program Files (x86)\SVP 4\mpv64\mpv.exe E:/Anime/Your Lie in April/[AnimeKaizoku] Your Lie in April - 22 (720p 10bit x265 Dual Audio)[OED].mkv --aid=1 --sid=no --no-sub-auto --o=- --input-ipc-server=mpvstreampipe --vf=vapoursynth:[C:\Users\jonni\AppData\Roaming\SVP4\scripts\fffe.py]:4:15 --ofps 60.000 --ovc=libx264 --ovfirst --ovcopts=b=9700000,preset=veryfast,g=60,keyint_min=60,refs=1,sc_threshold=0,threads=8 --oac=aac --of=matroska
11:58:40.135: Command line 2: C:\Program Files (x86)\SVP 4\utils\ffmpeg.exe -re -i - -map 0:? -codec:v copy -codec:a copy -bsf:v h264_mp4toannexb -f ssegment -segment_time 4 -segment_format mpegts -segment_list_size 10 -segment_list C:/Users/jonni/AppData/Local/Temp/svpcast/stream/svp.m3u8 -segment_start_number 0 -segment_list_flags +live C:/Users/jonni/AppData/Local/Temp/svpcast/stream/svp%04d.ts
11:58:40.140: ===== ffmpeg started, starting mpv... =====
11:58:40.191: Playing: E:/Anime/Your Lie in April/[AnimeKaizoku] Your Lie in April - 22 (720p 10bit x265 Dual Audio)[OED].mkv
11:58:40.192: (+) Video --vid=1 (*) (f) (hevc 1280x720 23.976fps)
11:58:40.192: (+) Audio --aid=1 --alang=eng (*) 'English 2.0 AAC' (aac 2ch 48000Hz)
11:58:40.192: Audio --aid=2 --alang=jpn 'Japanese 2.0 AAC' (aac 2ch 48000Hz)
11:58:40.192: Audio --aid=3 --alang=eng 'English Commentary 2.0 AC3' (aac 2ch 48000Hz)
11:58:40.192: Subs --sid=1 --slang=eng (*) (ass)
11:58:40.192: Subs --sid=2 --slang=jpn (ass)
11:58:40.192: Opening video filter: [vapoursynth file=C:\Users\jonni\AppData\Roaming\SVP4\scripts\fffe.py buffered-frames=4 concurrent-frames=15]
11:58:40.259: [encode-lavc] ao-lavc: preallocated video stream for later use
11:58:40.259: [encode-lavc] Opening audio encoder: AAC (Advanced Audio Coding) [aac]
11:58:40.261: AO: [lavc] 48000Hz stereo 2ch floatp
11:58:41.075: VO: [lavc] 1280x720 yuv420p
11:58:41.076: [encode-lavc] Opening video encoder: libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 [libx264]
11:58:41.081: [encode-lavc] Opening output file: pipe:1
11:58:41.081: [encode-lavc] Opening muxer: Matroska [matroska]
11:58:41.081: [ao/lavc] NOTE: not using codec time base (1/48000) for pts adjustment; the stream base (1/1000) is worse.
11:58:41.827: ===== ffmpeg exited with code 1 =====
11:58:41.938: ===== mpv exited with code 62097 =====

i sadly dont know why it crashes, but it would be nice to know if theres a fix for it.
btw, using HLS Streaming, because i wanted to watch something on my mobile.

Re: The new SVP-cast is awesome! But why only cpu usage?

the log doesn't contains ffmpeg output so we don't known why it exits hmm

you can run this manually in a cmd window to see the full output:

"C:\Program Files (x86)\SVP 4\mpv64\mpv.exe" "E:/Anime/Your Lie in April/[AnimeKaizoku] Your Lie in April - 22 (720p 10bit x265 Dual Audio)[OED].mkv" --aid=1 --sid=no --no-sub-auto --o=- --input-ipc-server=mpvstreampipe --vf=vapoursynth:[C:\Users\jonni\AppData\Roaming\SVP4\scripts\fffe.py]:4:15 --ofps 60.000 --ovc=libx264 --ovfirst --ovcopts=b=9700000,preset=veryfast,g=60,keyint_min=60,refs=1,sc_threshold=0,threads=8 --oac=aac --of=matroska | "C:\Program Files (x86)\SVP 4\utils\ffmpeg.exe" -re -i - -map 0:? -codec:v copy -codec:a copy -bsf:v h264_mp4toannexb -f ssegment -segment_time 4 -segment_format mpegts -segment_list_size 10 -segment_list C:/Users/jonni/AppData/Local/Temp/svpcast/stream/svp.m3u8 -segment_start_number 0 -segment_list_flags +live C:/Users/jonni/AppData/Local/Temp/svpcast/stream/svp%04d.ts

Re: The new SVP-cast is awesome! But why only cpu usage?

C:\Users\jonni>"C:\Program Files (x86)\SVP 4\mpv64\mpv.exe" "E:/Anime/Your Lie in April/[AnimeKaizoku] Your Lie in April - 22 (720p 10bit x265 Dual Audio)[OED].mkv" --aid=1 --sid=no --no-sub-auto --o=- --input-ipc-server=mpvstreampipe --vf=vapoursynth:[C:\Users\jonni\AppData\Roaming\SVP4\scripts\fffe.py]:4:15 --ofps 60.000 --ovc=libx264 --ovfirst --ovcopts=b=9700000,preset=veryfast,g=60,keyint_min=60,refs=1,sc_threshold=0,threads=8 --oac=aac --of=matroska | "C:\Program Files (x86)\SVP 4\utils\ffmpeg.exe" -re -i - -map 0:? -codec:v copy -codec:a copy -bsf:v h264_mp4toannexb -f ssegment -segment_time 4 -segment_format mpegts -segment_list_size 10 -segment_list C:/Users/jonni/AppData/Local/Temp/svpcast/stream/svp.m3u8 -segment_start_number 0 -segment_list_flags +live C:/Users/jonni/AppData/Local/Temp/svpcast/stream/svp%04d.ts
ffmpeg version 3.4 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 7.2.0 (GCC)
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-cuda --enable-cuvid --enable-d3d11va --enable-nvenc --enable-dxva2 --enable-avisynth --enable-libmfx
  libavutil      55. 78.100 / 55. 78.100
  libavcodec     57.107.100 / 57.107.100
  libavformat    57. 83.100 / 57. 83.100
  libavdevice    57. 10.100 / 57. 10.100
  libavfilter     6.107.100 /  6.107.100
  libswscale      4.  8.100 /  4.  8.100
  libswresample   2.  9.100 /  2.  9.100
  libpostproc    54.  7.100 / 54.  7.100
pipe:: Invalid data found when processing input

it doesnt go beyond that.

Re: The new SVP-cast is awesome! But why only cpu usage?

honestly, I don't have any idea

downloaded the very same file, and the command line above works as expected

Re: The new SVP-cast is awesome! But why only cpu usage?

Chainik wrote:

honestly, I don't have any idea

downloaded the very same file, and the command line above works as expected

ill just reinstall svp again.

Re: The new SVP-cast is awesome! But why only cpu usage?

no, it won't help


a suggestion from google: add "-nostdin" to ffmpeg args

"C:\Program Files (x86)\SVP 4\mpv64\mpv.exe" "E:/Anime/Your Lie in April/[AnimeKaizoku] Your Lie in April - 22 (720p 10bit x265 Dual Audio)[OED].mkv" --aid=1 --sid=no --no-sub-auto --o=- --input-ipc-server=mpvstreampipe --vf=vapoursynth:[C:\Users\jonni\AppData\Roaming\SVP4\scripts\fffe.py]:4:15 --ofps 60.000 --ovc=libx264 --ovfirst --ovcopts=b=9700000,preset=veryfast,g=60,keyint_min=60,refs=1,sc_threshold=0,threads=8 --oac=aac --of=matroska | "C:\Program Files (x86)\SVP 4\utils\ffmpeg.exe" -nostdin -re -i - -map 0:? -codec:v copy -codec:a copy -bsf:v h264_mp4toannexb -f ssegment -segment_time 4 -segment_format mpegts -segment_list_size 10 -segment_list C:/Users/jonni/AppData/Local/Temp/svpcast/stream/svp.m3u8 -segment_start_number 0 -segment_list_flags +live C:/Users/jonni/AppData/Local/Temp/svpcast/stream/svp%04d.ts

15 (edited by Tsubajashi 26-12-2017 12:43:23)

Re: The new SVP-cast is awesome! But why only cpu usage?

with a completely reinstalled svp, i still have issues.
i just selected the root folder, did not change even one setting, then it dies while i select a file on my mobile.
also: using the other command i should paste still does not work for some reason.
my pc:
FX-8350
R9 380 (with relive 17.12.2)
Windows 10 1709 (latest patchest applied, 16299.125)
will test under linux later (if it even exists on linux)

Re: The new SVP-cast is awesome! But why only cpu usage?

> using the other command i should paste still does not work for some reason

with the same "Invalid data found when processing input" error?

> if it even exists on linux

not yet

Re: The new SVP-cast is awesome! But why only cpu usage?

So, what can i try to do with SVPcast to get it to actually trigger the shield tv or tv to play ongoing streams? Or do i just have to wait for a fix?

18 (edited by Tsubajashi 26-12-2017 12:59:47)

Re: The new SVP-cast is awesome! But why only cpu usage?

Chainik wrote:

> using the other command i should paste still does not work for some reason

with the same "Invalid data found when processing input" error?

> if it even exists on linux

not yet

yes, with the exact same error.
also, if its possible, could you add amd amf in ffmpeg? theres something on github which has it implemented, mind having a look at it?
https://github.com/Xaymar/ffmpeg-amf

Re: The new SVP-cast is awesome! But why only cpu usage?

Duckers wrote:

So, what can i try to do with SVPcast to get it to actually trigger the shield tv or tv to play ongoing streams?

I dunno... fix what you broke big_smile

- does SVP detects Chromecast device(s) correctly with the actual IPs? (see the log)
- you can enable verbose logging with "cast.verbose = true"

Re: The new SVP-cast is awesome! But why only cpu usage?

this's not a part of ffmpeg master
you should ask ffmpeg developers to implement this

===
ha, in fact it WAS finally merged into ffmpeg 3 weeks ago wink
"good news, everyone!" (c)

21 (edited by Tsubajashi 26-12-2017 13:11:56)

Re: The new SVP-cast is awesome! But why only cpu usage?

Chainik wrote:

this's not a part of ffmpeg master
you should ask ffmpeg developers to implement this

===
ha, in fact it WAS finally merged into ffmpeg 3 weeks ago wink
"good news, everyone!" (c)

https://ffmpeg.zeranoe.com/builds/
the newest builds linked on ffmpeg.org https://ffmpeg.org/download.html#build-windows do have h264_amf.
i see, you found it out already, sorry.

Re: The new SVP-cast is awesome! But why only cpu usage?

ok, will try to enable AMF encoder in our build of mpv 0.28...

Re: The new SVP-cast is awesome! But why only cpu usage?

Chainik wrote:

ok, will try to enable AMF encoder in our build of mpv 0.28...

Thanks, appreciate it.

24 (edited by Duckers 26-12-2017 16:57:45)

Re: The new SVP-cast is awesome! But why only cpu usage?

Chainik wrote:
Duckers wrote:

So, what can i try to do with SVPcast to get it to actually trigger the shield tv or tv to play ongoing streams?

I dunno... fix what you broke big_smile

- does SVP detects Chromecast device(s) correctly with the actual IPs? (see the log)
- you can enable verbose logging with "cast.verbose = true"

By installing svpcast, i broke it apparently lol. First stream worked halfly as long as it wasn't a 4k video as that kills the cpu and it won't use my gpu for streaming, second attempt won't even cast it when i tried a normal 1080p movie.

Yep, or i hope so, otherwise they wouldn't be detected.

Where do i paste that?

Re: The new SVP-cast is awesome! But why only cpu usage?

another thing i would love to add, is the ability of outputting subtitles, because i wanna watch anime with it.