NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums General General Discussion v
« Previous 1 … 4 5 6 7 8 … 159 Next »
Using dshow or ffmpeg as an input to NPVR?

 
  • 0 Vote(s) - 0 Average
Using dshow or ffmpeg as an input to NPVR?
gdogg371
Offline

Member

Posts: 149
Threads: 23
Joined: May 2018
#61
2020-02-05, 03:36 PM
(2020-02-05, 03:24 PM)mvallevand Wrote: It's not receiving data.  the  test now from the command prompt is to make sure your batch file is still working.

C:\Users\Public\NPVR-data\scripts\ProCapture.bat  504 | ffplay -i pipe:

Martin

HUZZAH!!!

I forgot to amend the batch file. The audio part of the device command is different as I have several audio outs. Command should have been as below:


"G:\NPVR\Other\ffmpeg" -f dshow -i video="Video (00 Pro Capture HDMI 4K+)":audio="Audio (2- 00 Pro Capture HDMI 4K+)" -vcodec h264  -acodec aac  -s 1920x1080 -framerate 50 -f mpegts -

...I'll now try amending the batch file to my preferred VLC command and see what happens.

BRB...
gdogg371
Offline

Member

Posts: 149
Threads: 23
Joined: May 2018
#62
2020-02-05, 04:27 PM (This post was last modified: 2020-02-05, 04:28 PM by gdogg371.)
Ok - more progress. But first, Sub and Martin...thank you very much for taking the time to drag me along behind you this far. State of play now:

1) Using the below command I now have picture and audio running as an external device via NPVR.
2) The playback is pretty bad, because I am encoding and decoding on the same machine probably (will look at potential upgrades as mentioned). When I stream to a proxy server and view on a different machine the playback is much more smooth.
3) Playing video back as in point number 2 gives a perfect, lossless stream of the original 4k source.
4) Using the same commands in NPVR gives a significantly downgraded picture. Probably 720p looking at it. I can only watch said picture via the web GUI. If I try opening via the v5 client, I just get several seconds of it thinking about it and then a black screen.

Any suggestions as to what to tweak next? We've come a long way with this now and it feels like we are almost there!

Thanks

--ffmpeg-hw --avcodec-hw=any dshow:// :dshow-vdev="Video (00 Pro Capture HDMI 4K+)" :dshow-adev="Audio (2- 00 Pro Capture HDMI 4K+)" :dshow-threads=8 :dshow-aspect-ratio=16\:9 :dshow-size="3840x2160" :dshow-pixel_format=yuv444p16le :dshow-tune=film :dshow-preset=lossless :dshow-profile=main10 show-vcodec=hevc_nvenc :dshow-fps=50 :dshow-crf=0 :dshow-acodec=mp4a :dshow-stereo-mode=5 :dshow-force-surround-sound=0 :dshow-ab=128 :dshow-samplerate=44100 :no-dshow-config :live-caching=300 --sout "#transcode{venc=ffmpeg,vcodec=mp2v,threads=8,aspect=16:9,width=3840,height=2160,fps=50,acodec=a52,ab=1500,channels=6,samplerate=48000,soverlay}Confusedtandard{access=file,dst=-,mux=ts}"
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,090
Threads: 957
Joined: May 2006
#63
2020-02-05, 05:22 PM
If you are testing with the browser that is a bad idea since it is testing transcoding of the browser too. Try with Kodi, vlc, or ffplay anything that can direct play. NextPVR.exe would need the decoder for this very odd output format you have choosen (4k mp2v, m2a with 6 channels)

I told you I wasn't going to help with vlc. Suggestions on extras would be to use 1080p (at most) h264 and aac as I showed in my example since that is the native format for the browser. I would still try and use ffmpeg with a simpler command line get hardware encoding and decoding working, it seems your pipe is quite complicated.

Martin
gdogg371
Offline

Member

Posts: 149
Threads: 23
Joined: May 2018
#64
2020-02-06, 02:10 PM
(2020-02-05, 05:22 PM)mvallevand Wrote: If you are testing with the browser that is a bad idea since it is testing transcoding of the browser too.  Try with Kodi, vlc, or ffplay anything that can direct play.  NextPVR.exe would need the decoder for this very odd output format you have choosen (4k mp2v, m2a with 6 channels)

I told you I wasn't going to help with vlc.  Suggestions on extras would be to use 1080p (at most) h264 and aac as I showed in my example since that is the native format for the browser.  I would still try and use ffmpeg with a simpler command line get hardware encoding and decoding working, it seems your pipe is quite complicated.

Martin

Yes, noted re you not helping with regards to VLC. The point of this whole exercise though is to get a 4K picture into Kodi via a capture card, an encoder and a PVR backend. I already have a 1080p Hauppauge DVB-T card I've used previously to get a HD picture into Kodi via NPVR. 

Can I inquire though - as you mentioned a hardware encoder....can you give me some pointers as to how I could integrate using one of these instead of a software encoder in this sort of setup? Can you please give an example of how to amend my batch file? I'm guessing it would just be passing command line arguments to the device?
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,090
Threads: 957
Joined: May 2006
#65
2020-02-06, 02:47 PM
The extras xml and script combinations are generic and adaptable too any device.

If you really are trying to capture 4k content and get it into Kodi and want to ignore the browser your batch file example with 1080p.

I would try this in your batch file

"G:\NPVR\Other\ffmpeg" -f dshow -i video="Video (00 Pro Capture HDMI 4K+)":audio="Audio (2- 00 Pro Capture HDMI 4K+)" -codec copy -f mpegts -

C:\Users\Public\NPVR-data\scripts\ProCapture.bat 504 | ffprobe -i pipe:

If it it valid valid since it is a simple remux it might be layable in Kodi

The next step would be to try ffmpeg hw decoding if your video card is up to it.

I am not going to recommend hevc 4k encoders I don't know any that do the 50fps that you are trying to achieve.

Martin

Martin
gdogg371
Offline

Member

Posts: 149
Threads: 23
Joined: May 2018
#66
2020-02-06, 04:16 PM
(2020-02-06, 02:47 PM)mvallevand Wrote: The extras xml  and script combinations are generic and adaptable too any device.

If you really are trying to capture 4k content and get it into Kodi and want to ignore the browser your batch file example with 1080p.

I would try this in your batch file

"G:\NPVR\Other\ffmpeg" -f dshow -i video="Video (00 Pro Capture HDMI 4K+)":audio="Audio (2- 00 Pro Capture HDMI 4K+)" -codec  copy -f mpegts -

C:\Users\Public\NPVR-data\scripts\ProCapture.bat  504 | ffprobe -i pipe:

If it it valid valid since it is a simple remux it might be layable in Kodi

The next step would be to try ffmpeg  hw decoding if your video card is up to it.

I am not going to recommend hevc 4k encoders I don't know any that do the 50fps that you are trying to ach


Hi - if the card is outputting raw video, will a codec copy not been even worse on CPU usage? I'm getting a bit outside my knowledge of video codecs at this point...
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,090
Threads: 957
Joined: May 2006
#67
2020-02-06, 04:28 PM
Trying to capture in 4k is your choice and just giving you options. Kodi might not be able to decode it and it might need software for playback. I'd go with finding out what hw decoding your video card can do for you first .

Martin
gdogg371
Offline

Member

Posts: 149
Threads: 23
Joined: May 2018
#68
2020-02-06, 04:56 PM
(2020-02-06, 04:28 PM)mvallevand Wrote: Trying to capture in 4k is your choice and just giving you options.  Kodi might not be able to decode it and it might need software for playback.  I'd  go with finding out what hw decoding your video card can do for you first .

Martin


I'm now running through Kodi watching 'Ready Player One' in what looks like lossless 4K...so I might get away with a simple upgrade of my NVIDIA card to a better one I already have (a 1050Ti instead of my current geriatric 750 Ti) to remove the minimal amount of buffering and blockiness I am seeing. But I am very happy so far with the results. Thanks once again for the support. There is still much for me to do though. For anyone else following this thread, next steps are:

1) Upgrade my hardware encoding.
2) Plug in my C++ blaster script to do the channel changing for me.
3) Map in the hundreds of other channels needed to complete the PVR design.
4) Set up a scheduler to continually update and feed in my XMLTV scraper EPG data.

My blaster basically can mimic everything the remote can do, so my plan is to also incorporate all the films and video on demand stuff. Sub/Martin, does NPVR support VOD via extras? I'm picturing something like this:

1) I write a scraper that produces a list of available VOD content.
2) This list is somehow available in NPVR.
3) I write a plugin for Kodi that can connect to this list in NPVR.
4) If I want to watch a film for example, my blaster configures my STB to download and play said film.
5) Film plays in Kodi.

Can NPVR support that kind of functionality? If not, I am back to needing to stream to a proxy server and trying to get a Kodi plugin to connect to that. I'm learning as I go here, so apologies if I am asking any stupid questions...
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,090
Threads: 957
Joined: May 2006
#69
2020-02-06, 06:28 PM
I wrote a VOD capture update to an addon I wrote for myself. https://forums.nextpvr.com/showthread.php?tid=60320 If you have questions follow up there. The recordings show up as NextPVR recordings in Kodi before a capture card you might need to invest in a BIG hard disk is you are capture raw 4K video.

Martin
gdogg371
Offline

Member

Posts: 149
Threads: 23
Joined: May 2018
#70
2020-02-08, 12:51 AM
(2020-02-06, 06:28 PM)mvallevand Wrote: I wrote a VOD capture update to an addon I wrote for myself.  https://forums.nextpvr.com/showthread.php?tid=60320  If you have questions follow up there.  The recordings show up as NextPVR recordings in Kodi before a capture card you might need to invest in a BIG hard disk is you are capture raw 4K video.

Martin

Hi again. I have replied on your thread. I won't be recording raw 4K, it will be encoded. Also not all content via my STB is in 4K, so it will only be content that is which will require large amount of drive space...
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (9): « Previous 1 … 5 6 7 8 9 Next »
Jump to page 


Possibly Related Threads…
Thread Author Replies Views Last Post
  Merging video with web radio (ffmpeg) NumberFive 1 1,159 2021-05-04, 01:01 PM
Last Post: mvallevand
  NPVR 5 Logs gdogg371 2 2,085 2020-06-02, 08:54 PM
Last Post: gdogg371
  Fun with ffmpeg mvallevand 5 2,626 2020-05-15, 03:01 PM
Last Post: mvallevand
  NPVR Channel Numbers in Kodi... gdogg371 5 3,398 2020-02-24, 02:22 AM
Last Post: mvallevand
  remote NPVR setup suggestions p37307 3 2,459 2020-02-17, 11:54 AM
Last Post: Graham
  Playstation Vue with NPVR Ex Bee MC 14 8,547 2019-03-26, 09:55 AM
Last Post: 2leftfeet
  Thanks NPVR! alannerd614 7 4,511 2018-03-24, 04:14 AM
Last Post: joeijm
  What does NPVR remove when naming recordings p37307 0 1,727 2016-12-24, 10:55 AM
Last Post: p37307
  Little NPVR praise p37307 2 2,467 2016-10-25, 08:07 PM
Last Post: p37307
  Windows 10 Anniversary NPVR fullscreen flicker and freeze fix p37307 1 3,206 2016-08-11, 02:59 AM
Last Post: sub

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode