2020-04-10, 06:39 PM
INTEL (qsv) is working here for live streams.
2020-04-10, 06:39 PM
INTEL (qsv) is working here for live streams.
I was trying various examples from this page:
https://trac.ffmpeg.org/wiki/Hardware/QuickSync And the below command works without errors: "C:\Program Files\NPVR\Other\ffmpeg.exe" -init_hw_device qsv=hw -filter_hw_device hw -f rawvideo -pix_fmt yuv420p -s:v 1920x1080 -i "http://127.0.0.1:8866/live?channeloid=7562&transcoder=3f149498-ce76-492c-a394-c0b2ab103364&client=5c53419a-db74-43eb-b730-b60c7506a7e8" -vf hwupload=extra_hw_frames=64,format=qsv -c:v h264_qsv -b:v 5M -f null NUL But I have no clue of what it is doing....
2020-04-10, 07:14 PM
That example Martin supplied was for D3D11VA. Might be worth trying it with INTEL in NextPVR, them look in your nrecord.log for the ffmpeg command line used, and try that.
(2020-04-10, 07:14 PM)sub Wrote: That example Martin supplied was for D3D11VA. Might be worth trying it with INTEL in NextPVR, them look in your nrecord.log for the ffmpeg command line used, and try that. thanks Sub, So I used Martin's command line and I started eliminating things. So if from the below line: "C:\Program Files\NPVR\Other\ffmpeg.exe" -y -hwaccel:v:0 qsv -hwaccel_device:v:0 0 -i "http://127.0.0.1:8866/live?channeloid=7562&transcoder=3f149498-ce76-492c-a394-c0b2ab103364&client=5c53419a-db74-43eb-b730-b60c7506a7e8" -map_metadata -1 -threads 0 -ignore_unknown -map 0:v:0? -map 0:a:0 -map -0 -codec:v:0 h264_qsv -b:v 2M -look_ahead 0 -maxrate 1500000 -bufsize 3000000 -codec:a:0 aac -strict experimental -ac 2 -ab 128000 -f null NUL I eliminate the below switch: -codec:v:0 h264_qsv Then the below line works with no errors: "C:\Program Files\NPVR\Other\ffmpeg.exe" -y -hwaccel:v:0 qsv -hwaccel_device:v:0 0 -i "http://127.0.0.1:8866/live?channeloid=7562&transcoder=3f149498-ce76-492c-a394-c0b2ab103364&client=5c53419a-db74-43eb-b730-b60c7506a7e8" -map_metadata -1 -threads 0 -ignore_unknown -map 0:v:0? -map 0:a:0 -map -0 -b:v 2M -maxrate 1500000 -bufsize 3000000 -codec:a:0 aac -strict experimental -ac 2 -ab 128000 -f null NUL So what have I done by eliminating the switch: -codec:v:0 h264_qsv And how I can use this knowledge to enable hardware acceleration in NextPVR in my PC?
2020-04-10, 07:31 PM
I can't test I am on linux now but qsv looks incomplete based on the first log.
Code: "C:\Program Files\NPVR\Other\ffmpeg.exe" -y -i http://127.0.0.1:8866/live?channeloid=7564&transcoder=61f7e06a-6aae-4c51-ab24-924788dd6959&client=75a2c169-2bc5-42d3-a9b7-fb5738e37dde -map_metadata -1 -threads 0 -ignore_unknown -map 0:v:0 -map 0:a:0 -map -0:s -codec:v:0? h264_qsv -vf yadif=0:-1:0 -profile:v baseline -level 3.0 -look_ahead 0 -b:v 2000000 -maxrate 2000000 -bufsize 4000000 -vsync vfr -profile:v high -level 41 -s 1280x720 -flags -global_header -sc_threshold 0 -codec:a:0 aac -strict experimental -ac 2 -ab 192000 -af "adelay=1,aresample=async=1" -f null NUL Martin
2020-04-10, 07:34 PM
(2020-04-10, 07:31 PM)mvallevand Wrote: I can't test I am on linux now but qsv looks incomplete based on the first log. Thanks Martin for the assistance. This command results in the below messages: [mpegts @ 04a14ac0] Could not find codec parameters for stream 3 (Unknown: none ([5][0][0][0] / 0x0005)): unknown codec Consider increasing the value for the 'analyzeduration' and 'probesize' options [mpegts @ 04a14ac0] Could not find codec parameters for stream 4 (Unknown: none ([11][0][0][0] / 0x000B)): unknown codec Consider increasing the value for the 'analyzeduration' and 'probesize' options Input #0, mpegts, from 'http://127.0.0.1:8866/live?channeloid=7564&transcoder=61f7e06a-6aae-4c51-ab24-924788dd6959&client=75a2c169-2bc5-42d3-a9b7-fb5738e37dde': Duration: N/A, start: 51503.878944, bitrate: N/A Program 2800 Stream #0:0[0xafa]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(top first), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc Stream #0:1[0xafb](gre): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fltp, 192 kb/s Stream #0:2[0xafd](gre): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006) Stream #0:3[0xaff]: Unknown: none ([5][0][0][0] / 0x0005) Stream #0:4[0xb00]: Unknown: none ([11][0][0][0] / 0x000B) [null @ 094e8940] Invalid stream specifier: v:0?. Last message repeated 1 times any ideas?
2020-04-10, 07:35 PM
(This post was last modified: 2020-04-10, 07:37 PM by mvallevand.)
The command lines aren't mine they are want sub uses but I think if you eliminate -codec:v:0 h264_qsv after the -i you aren't using h/w encoding.
That error was the same one you got in the NextPVR log Martin (2020-04-10, 07:35 PM)mvallevand Wrote: The command lines aren't mine they are want sub uses but I think if you eliminate -codec:v:0 h264_qsv after the -i you aren't using h/w encoding. Thanks Martin, I found another command that also works including the Hw decoder switch: "C:\Program Files\NPVR\Other\ffmpeg.exe" -init_hw_device qsv=hw -f rawvideo -pix_fmt yuv420p -s:v 2560x1440 -i "http://127.0.0.1:8866/live?channeloid=7562&transcoder=3f149498-ce76-492c-a394-c0b2ab103364&client=5c53419a-db74-43eb-b730-b60c7506a7e8" -c:v h264_qsv -b:v 5M -f null NUL Of course I am clueless of what that one does and if it gives any hint on how to modify NextPVR configuration to enable HW transcoding.... Output: 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 Input #0, rawvideo, from 'http://127.0.0.1:8866/live?channeloid=7562&transcoder=3f149498-ce76-492c-a394-c0b2ab103364&client=5c53419a-db74-43eb-b730-b60c7506a7e8': Duration: N/A, start: 0.000000, bitrate: 1105920 kb/s Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 2560x1440, 1105920 kb/s, 25 tbr, 25 tbn, 25 tbc Stream mapping: Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (h264_qsv)) Press [q] to stop, [?] for help Output #0, null, to 'NUL': Metadata: encoder : Lavf58.29.100 Stream #0:0: Video: h264 (h264_qsv), nv12, 2560x1440, q=-1--1, 5000 kb/s, 25 fps, 25 tbn, 25 tbc Metadata: encoder : Lavc58.54.100 h264_qsv Side data: cpb: bitrate max/min/avg: 0/0/5000000 buffer size: 0 vbv_delay: -1 frame= 4 fps=0.2 q=51.0 Lsize=N/A time=00:00:00.12 bitrate=N/A speed=0.00542x video:2618kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown Exiting normally, received signal 2.
2020-04-10, 07:58 PM
That is not going to be complete but does it need these two
-f rawvideo -pix_fmt yuv420p Martin
2020-04-10, 08:04 PM
(2020-04-10, 07:58 PM)mvallevand Wrote: That is not going to be complete but does it need these two If I remove: -pix_fmt yuv420p It still works: 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 Input #0, rawvideo, from 'http://127.0.0.1:8866/live?channeloid=7562&transcoder=3f149498-ce76-492c-a394-c0b2ab103364&client=5c53419a-db74-43eb-b730-b60c7506a7e8': Duration: N/A, start: 0.000000, bitrate: 1105920 kb/s Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 2560x1440, 1105920 kb/s, 25 tbr, 25 tbn, 25 tbc Stream mapping: Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (h264_qsv)) Press [q] to stop, [?] for help Output #0, null, to 'NUL': Metadata: encoder : Lavf58.29.100 Stream #0:0: Video: h264 (h264_qsv), nv12, 2560x1440, q=-1--1, 5000 kb/s, 25 fps, 25 tbn, 25 tbc Metadata: encoder : Lavc58.54.100 h264_qsv Side data: cpb: bitrate max/min/avg: 0/0/5000000 buffer size: 0 vbv_delay: -1 frame= 5 fps=0.2 q=51.0 Lsize=N/A time=00:00:00.16 bitrate=N/A speed=0.00543x video:2916kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown But if I remove: -f rawvideo Then it errors out: 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 Option video_size not found. I hope that makes sense. |
|