NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public NextPVR Support Legacy (v4.x and earlier) v
« Previous 1 … 9 10 11 12 13 … 433 Next »
Import recorded tv shows to NPVR

Import recorded tv shows to NPVR
mattman1968
Offline

Member

Posts: 72
Threads: 20
Joined: Feb 2008
#1
2018-04-01, 03:33 PM
Hi,

I have a couple shows recorded in wtv format from Media Center. I have converted them to ts and attempted to import them to NPVR but the import dialog says there is no metadata...so no recordings are imported. I tried Vid Import and it did work...but it didn't group my series recordings together (I am also using the TV Listings plugin). The Vid Import wiki has lots of commands to output various data in the xml, however there are no clear instructions on how to use it. I accidentally figured out that dragging the video file onto the Vid Import.exe generated an xml that would import the tv shows. However, again, it doesn't group the shows together.

So, is it possible to have the imported shows grouped together with others in the same series? And are there clearer directions somewhere for Vid Import?

Thanks!
jd1940
Offline

Senior Member

Posts: 346
Threads: 64
Joined: Sep 2010
#2
2018-04-01, 03:59 PM
That's what I use the video folder for. I have a lot of downloaded video files and I put them in a hard drive directory (C:/Videos, for example) then name that direcctory in the Media Folders/Video Folder. If your videos are in a Series folder, they will be grouped together like you want. There's no need to convert them to .ts files.
Bobins
Offline

Posting Freak

UK (North West)
Posts: 1,201
Threads: 133
Joined: Sep 2004
#3
2018-04-01, 04:22 PM
A question for SUB maybe.
What determines the displayed grouping of imported recordings?
I imported Series 1-3 of "The 100" using an manually prepared xml file.
Although the fields look consistent Name, Title etc. (and so do entries in the database), NPVR shows two separate groups of The 100 in the recording listings
1 group contains Series 1-2 and the other Series 3.
NPVR Version= 7.0.1.241229
Intel i5 Ten Core 14400 + 16GB DDR5 in Gigabyte B760 AX Motherboard
Windows 11 Pro 64bit
TBS-6902 dual DVB-S tuner
TBS-6205 quad DVB-T tuner
500Gb System Disk (M2 Nvme SSD)
4Tb Media Store (2 x 2Tb M2 Nvme SSD Spanned)

Raspberry Pi3 B+, Pi4B (OSMC) & Pi5 (XBian) running Kodi v21.1
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,661
Threads: 767
Joined: Nov 2003
#4
2018-04-01, 04:59 PM
Bobins Wrote:A question for SUB maybe.
What determines the displayed grouping of imported recordings?
I imported Series 1-3 of "The 100" using an manually prepared xml file.
Although the fields look consistent Name, Title etc. (and so do entries in the database), NPVR shows two separate groups of The 100 in the recording listings
1 group contains Series 1-2 and the other Series 3.
Grouped in the Recordings screen? Just the name of the show. If you've got two groups, then you must have slight difference in the name, like "the" vs "The"
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,661
Threads: 767
Joined: Nov 2003
#5
2018-04-01, 05:02 PM
mattman1968 Wrote:I have a couple shows recorded in wtv format from Media Center. I have converted them to ts and attempted to import them to NPVR but the import dialog says there is no metadata...
When importing a .ts file, it expects it'll be a NextPVR created file, which includes metadata, like show name and description, channel etc.

Your best bet to create an xml file in the same format as c:\users\public\npvr\record-backup.xml, edited to have the correct paths to your file, and names/descriptions etc, and then import that file.
Bobins
Offline

Posting Freak

UK (North West)
Posts: 1,201
Threads: 133
Joined: Sep 2004
#6
2018-04-01, 06:53 PM
SUB.

I couldn't see any difference till I went to text edit the name field in the database and discovered an errant space after the 100 in the series 1 & 2 name field. Doh!
Fixed it now :-)
NPVR Version= 7.0.1.241229
Intel i5 Ten Core 14400 + 16GB DDR5 in Gigabyte B760 AX Motherboard
Windows 11 Pro 64bit
TBS-6902 dual DVB-S tuner
TBS-6205 quad DVB-T tuner
500Gb System Disk (M2 Nvme SSD)
4Tb Media Store (2 x 2Tb M2 Nvme SSD Spanned)

Raspberry Pi3 B+, Pi4B (OSMC) & Pi5 (XBian) running Kodi v21.1
mattman1968
Offline

Member

Posts: 72
Threads: 20
Joined: Feb 2008
#7
2018-04-02, 04:08 AM
sub Wrote:When importing a .ts file, it expects it'll be a NextPVR created file, which includes metadata, like show name and description, channel etc.

Your best bet to create an xml file in the same format as c:\users\public\npvr\record-backup.xml, edited to have the correct paths to your file, and names/descriptions etc, and then import that file.

Thanks for the assist. This got the shows all grouped together nicely. However, the imported shows don't have any program description even though I included it in the xml. The record-backup.xml has OID identifiers that don't make any sense to me. I think that since I don't have those it may be part of the reason. Anyway, I can live without a couple shows that don't have the program info. Having them grouped correctly was more important to me.
johnsonx42
Offline

Posting Freak

Posts: 7,298
Threads: 189
Joined: Sep 2008
#8
2018-04-02, 04:27 AM
Attached is an old batch file that will scan a directory and subdirectories for video files and build an importable .xml file. It will extract metadata in the file, if it was written by GB-PVR/NextPVR in the first place.

You'll have to modify it to include .wtv files (the FOR loop command after the 6 echo commands contains the extension list).

It was written for GB-PVR, but the format is still compatible. The automatic import at the end won't work of course, you just hit Ctrl-C and then import it from NextPVR Settings.

I didn't write it, I have no recollection who did as it was a very long time ago.

Code:
@echo off
setlocal ENABLEDELAYEDEXPANSION
echo.
echo. Generating Recording Import data for all .mpg's in
echo.     %~dp0recording-dump.xml
echo.
echo ^<?xml version="1.0" encoding="UTF-8"?^> > %~dp0recording-dump.xml
echo ^<recordings^> >>%~dp0recording-dump.xml
FOR /R %~dp0 %%f IN (*.mpg *.ts *.dvr-ms *.avi) DO (call :extract "%%~f")
echo ^</recordings^> >> %~dp0recording-dump.xml

echo.
echo Done.
echo.
echo Hit any key to import into database or 'Control-c' to exit and edit recording-dump.xml.
pause
for /f "usebackq skip=4 tokens=1,2,3,* " %%a in (`reg query hklm\SOFTWARE\devnz /v "GBPVR InstallDir"`) do set gbpvrdir=%%d
"%gbpvrdir%pvrx2.exe" -import:"%~dp0recording-dump.xml"
echo Importing....
echo Done.
goto :eof


:extract
echo ""
for /f "usebackq tokens=* skip=1 delims=*" %%p in ("%~1:metadata.xml") do (
set line=%%p
if "!line:filename=!" NEQ "!line!" (    
    echo       ^<filename^>%~1^</filename^> >> "%~dp0recording-dump.xml"
    ) else (echo    %%p >> "%~dp0recording-dump.xml")
)
goto :eof
server: NextPVR 5.0.7/Win10 2004/64-bit/AMD A6-7400k/hvr-2250 & hvr-1250/Winegard Flatwave antenna/Schedules Direct
main client: NextPVR 5.0.7 Desktop Client; LG 50UH5500 WebOS 3.0 TV
mattman1968
Offline

Member

Posts: 72
Threads: 20
Joined: Feb 2008
#9
2018-04-04, 12:58 PM
@ johnsonx42
Thanks for the program but I could not figure out how to use it. I placed it in the folder with the files and ran it...but it ran within a nano-second and didn't produce any results. No problems though. I manually reviewed/edited my xml with the recording-backup.xml, and was able to import my few shows correctly after editing. Now I have a template should I have to import anything else.
Jimixter
Offline

Junior Member

Posts: 12
Threads: 6
Joined: Dec 2019
#10
2020-03-03, 12:57 PM
I have written a PowerShell script at the following link to do this. It's worked a treat on our library of .wtv files!

https://forums.nextpvr.com/showthread.php?tid=60142
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  npvr is not responding johndutcher 3 1,457 2022-05-05, 07:57 PM
Last Post: sub
  NPVR 4.2.4 Video Library No Longer Shows folder.jpg Lao Pan 12 3,785 2022-04-14, 04:33 AM
Last Post: Antmannz
  nPVR Continually Wakes PC bfos 23 10,991 2022-02-17, 03:48 PM
Last Post: sub
  Can't find tuner filter in NPVR 4.05 on old XP machine (eee 701) with RTL2832U iamanotheruser 3 1,627 2022-01-03, 04:45 AM
Last Post: mvallevand
  zap2it import tv logo MaxOne72 2 1,429 2021-11-14, 05:56 PM
Last Post: sub
  ts file shows length too long? SuttonWillow 2 1,853 2021-03-15, 01:56 PM
Last Post: mvallevand
  Streaming Services with NPVR tesla1886 4 2,630 2021-01-04, 02:58 AM
Last Post: tesla1886
  NPVR choosing incorrect xml guide display-name after reboot drlava 7 2,978 2020-12-27, 02:27 AM
Last Post: sub
  ts file shows length too long SamM 4 2,298 2020-10-06, 02:45 AM
Last Post: Ehrlichia
  Can NPVR offset only 3 channel listings in EPG? acemib 20 6,805 2020-04-27, 01:28 PM
Last Post: mvallevand

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

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

Linear Mode
Threaded Mode