NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Information Community Announcements v
« Previous 1 … 8 9 10 11 12 … 56 Next »
MpegImport utility added to wiki

 
  • 0 Vote(s) - 0 Average
MpegImport utility added to wiki
GoodGuys
Offline

Senior Member

Posts: 433
Threads: 41
Joined: Jun 2005
#21
2006-04-29, 02:21 PM
Hello Sixgun -
Thanks for the utility.
However, it doesn't work well for me because it doesn't know about UTF-8 filenames. I get the filenames in the XML like this:
"?????_????_2006042906200820.mpg"
Not very useful for me. Do you think you could add support for this?

Thanks,
GGF
AMD64 3000+, MSI-Neo4F, 1GB, 1.5TB WD-SATA, PVR350+150 34btn remote, ATI 2460HD TVOut, 1.4.7: VMR9fse, CS3 skin
sixgun
Offline

Member

Posts: 197
Threads: 35
Joined: Sep 2004
#22
2006-05-01, 09:09 PM
GoodGuys Wrote:Hello Sixgun -
Thanks for the utility.
However, it doesn't work well for me because it doesn't know about UTF-8 filenames. I get the filenames in the XML like this:
"?????_????_2006042906200820.mpg"
Not very useful for me. Do you think you could add support for this?

I don't know anything about how to support UTF-8 filenames.

I've not done anything "odd" in the code for the MpegImport utility, i'd have thought it'd just work. I've had a quick look at my compiler options and cannot see anything in there that i need to turn on to enable it.

I can add some logging to the util and send it to you directly, if you don't mind trying it a few times, as i try different things out.

I can't promise anything, as this is all new to me.

Regards.
GBPVR: v0.99.5
Server: Athlon64 X2 3800+, 2GB Memory, 1480GB Storage, 6 DVB-T Tuners (2 x Nova-T 500 PCI, 2 x Nova-T PCI)
HTPC: Athlon64 3000+, 1GB Memory, 80GB Storage, Blackgold GDI DVB-T Tuner, Ahanix MCE-302 Case, MSI K8NGM2-FID motherboard
Main TV: Toshiba 42WLT66 LCD
Media Playback: 2 x MVP (wired)
Homepage: http://www.sixgun.co.uk/
Author of MpegImport utility
GoodGuys
Offline

Senior Member

Posts: 433
Threads: 41
Joined: Jun 2005
#23
2006-05-01, 10:04 PM
Hi sixgun,

Sure - I'll help. I'll send you my email in a private message.
Basically, I think two things are missing. The least of the two is the xml header line, which should be:
Code:
<?xml version="1.0" encoding="windows-1255" ?>
And the other is that you can't treat the filename as if it has 8-bit characters because in windows-1255 encoding, the characters are 16-bits wide. I was wrong to say UTF-8, because windows-1255 is actually a subset of UTF-16.
If you send me bits of the source code that deal with the filename, I'll see if I can help. I think .NET has specialized functions that will work with any encoding...
By the way, here's a really cool (and short) article about the basics of internationalization: http://www.joelonsoftware.com/articles/Unicode.html

Will be sending you my email address right now.

GGF
AMD64 3000+, MSI-Neo4F, 1GB, 1.5TB WD-SATA, PVR350+150 34btn remote, ATI 2460HD TVOut, 1.4.7: VMR9fse, CS3 skin
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,716
Threads: 767
Joined: Nov 2003
#24
2006-05-01, 10:32 PM
Quote:And the other is that you can't treat the filename as if it has 8-bit characters because in windows-1255 encoding, the characters are 16-bits wide. I was wrong to say UTF-8, because windows-1255 is actually a subset of UTF-16.
If you send me bits of the source code that deal with the filename, I'll see if I can help. I think .NET has specialized functions that will work with any encoding...
By the way, here's a really cool (and short) article about the basics of internationalization: http://www.joelonsoftware.com/articles/Unicode.html
Assuming the utility is written in .net, you shouldnt need to worry about these low level details. Adding the correct XML header will probably go a long way to fixing the problem.
GoodGuys
Offline

Senior Member

Posts: 433
Threads: 41
Joined: Jun 2005
#25
2006-05-01, 10:43 PM
Hi sub,

I didn't know that. But I think this is not the case. The XML file really contained just '?'s for all the Hebrew characters... So changing the XML header would do nothing.

I'll wait to hear from sixgun - we'll figure it out for the benefit of everyone, I am sure Smile

GGF
AMD64 3000+, MSI-Neo4F, 1GB, 1.5TB WD-SATA, PVR350+150 34btn remote, ATI 2460HD TVOut, 1.4.7: VMR9fse, CS3 skin
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,716
Threads: 767
Joined: Nov 2003
#26
2006-05-01, 11:48 PM
Yeah, thats why I didnt say that it'd definitely fix it. I dont know how this utility works - he could still be doing things in his app that would stop it from working. For all I know, the app might not even be written in .net.

Personally I've not had to worry about unicode/UTF-8/UTF-16 etc anywhere in GB-PVR. .NET is pretty good at just making it work, and hiding the fact that all strings are unicode behind the scenes. That said, there are few places (like XML files) where some care needs to be taken.
ubu
Offline

Posting Freak

Posts: 792
Threads: 54
Joined: Jan 2006
#27
2006-05-08, 08:03 AM
Nice utility. Helped me recover some orphans from last time I rebuilt my PVR box. One problem - the "import" button appeared to successfully run an import but no new recordings showed up in the mdb table. I had to run the import from the GBPVR config app and then it worked like a charm.

Thanks Smile
[SIZE=1]GBPVR v1.3.11 [/SIZE][SIZE=1]HVR-1250, [/SIZE][SIZE=1]ES7300[/SIZE][SIZE=1], 4GB, GeForce 9300, LianLi, Vista.[/SIZE]
[SIZE=1]GBPVR v1.0.08 [/SIZE][SIZE=1]PVR-150, [/SIZE][SIZE=1]P4 2.26GHz, [/SIZE][SIZE=1]1GB,[/SIZE][SIZE=1] GeForce 6200, [/SIZE]Coupden, XP[SIZE=1]
[/SIZE]

Author: UbuStream plugin, UbuRadio plugin, EPGExtra utility.
sixgun
Offline

Member

Posts: 197
Threads: 35
Joined: Sep 2004
#28
2006-05-08, 11:18 AM
MpegImport is written in .NET (recently moved to v2.0 of the framework). There is a bit of VB code in there, but it's mostly C#.

When i originally wrote it, i thought the header tag in the recordings-dump.xml file was specific to GBPVR. But now, as far as i can gather, it's specific to the locale of the PC.

Sub - I use an XmlTextWriter to dump the xml to a file. Do you know what i call to set the encoding to the correct type for the PC? Currently, i am using the following :-

Code:
System.Text.Encoding.GetEncoding("ISO-8859-1")

Thanks.
GBPVR: v0.99.5
Server: Athlon64 X2 3800+, 2GB Memory, 1480GB Storage, 6 DVB-T Tuners (2 x Nova-T 500 PCI, 2 x Nova-T PCI)
HTPC: Athlon64 3000+, 1GB Memory, 80GB Storage, Blackgold GDI DVB-T Tuner, Ahanix MCE-302 Case, MSI K8NGM2-FID motherboard
Main TV: Toshiba 42WLT66 LCD
Media Playback: 2 x MVP (wired)
Homepage: http://www.sixgun.co.uk/
Author of MpegImport utility
sixgun
Offline

Member

Posts: 197
Threads: 35
Joined: Sep 2004
#29
2006-05-08, 11:59 AM
ubu Wrote:Nice utility. Helped me recover some orphans from last time I rebuilt my PVR box. One problem - the "import" button appeared to successfully run an import but no new recordings showed up in the mdb table. I had to run the import from the GBPVR config app and then it worked like a charm.

Thanks Smile

MpegImport gets the location of GBPVR.EXE from the following registry key :-

Quote:HKEY_LOCAL_MACHINE\SOFTWARE\Devnz\GBPVR InstallDir

Currently, it assumes (always bad to do, i know!) that the path ends with a \ character. Then it sticks gbpvr.exe on the end, and then runs it with a parameter of "-import". It doesn't do any checking, just assumes it worked ok when i presents the message "GBPVR import completed".

Sub - does GBPVR.EXE return any error messages or an exitcode when run with the -import command line parameter that i could check for.

I added this as a last minute thing when i did the last release, which is why i didn't do much error checking.

Regards.
GBPVR: v0.99.5
Server: Athlon64 X2 3800+, 2GB Memory, 1480GB Storage, 6 DVB-T Tuners (2 x Nova-T 500 PCI, 2 x Nova-T PCI)
HTPC: Athlon64 3000+, 1GB Memory, 80GB Storage, Blackgold GDI DVB-T Tuner, Ahanix MCE-302 Case, MSI K8NGM2-FID motherboard
Main TV: Toshiba 42WLT66 LCD
Media Playback: 2 x MVP (wired)
Homepage: http://www.sixgun.co.uk/
Author of MpegImport utility
UncleJohnsBand
Offline

Posting Freak

U.S.A.
Posts: 5,643
Threads: 258
Joined: Feb 2005
#30
2006-05-08, 10:26 PM
sixgun Wrote:MpegImport gets the location of GBPVR.EXE from the following registry key :-



Currently, it assumes (always bad to do, i know!) that the path ends with a \ character. Then it sticks gbpvr.exe on the end, and then runs it with a parameter of "-import". It doesn't do any checking, just assumes it worked ok when i presents the message "GBPVR import completed".

Sub - does GBPVR.EXE return any error messages or an exitcode when run with the -import command line parameter that i could check for.

I added this as a last minute thing when i did the last release, which is why i didn't do much error checking.

Regards.


You can use this code to find where GBPVR is installed:

static string DATABASE_FILE = "gbpvr.mdb";

RegistryKey SUBKEY;
RegistryKey TAWKAY = RegistryKey.OpenRemoteBaseKey(Microsoft.Win32.RegistryHive.LocalMachine,"");
string subkey = "Software\\devnz";
SUBKEY = TAWKAY.OpenSubKey(subkey);
strPath = (string) SUBKEY.GetValue("GBPVR InstallDir");
Console.WriteLine("Using Path " + strPath );

if ( File.Exists(strPath + DATABASE_FILE) == false )
{
Console.WriteLine("File not found");
return ( false );
}
return ( true );
Intel Core i7 @ 4.00GHz Skylake 14nm
ASUSTeK COMPUTER INC. Z170-DELUXE
Windows 10 Pro x64
PVR Software: NPVR 5.1.1
SiliconDust HDHomeRun HDHR5-4US Connect Quatro 4 Channel Tuner
Roku Ultra
2 PCH A-100's
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (7): « Previous 1 2 3 4 5 … 7 Next »
Jump to page 


Possibly Related Threads…
Thread Author Replies Views Last Post
  Wiki updates for NextPVR 2.3.6 McBainUK 3 2,563 2012-02-19, 10:18 AM
Last Post: Grampz
  New wiki entry: RecoverRecordings pBS 11 3,763 2010-01-29, 08:16 AM
Last Post: pBS
  Auto restart recording service utility gEd 79 28,646 2010-01-13, 05:16 PM
Last Post: liteswap
  Showname - Rename utility for GBPVR recordings Anthony 0 1,445 2009-03-05, 05:40 PM
Last Post: Anthony
  WIKI Status fhmanas 3 1,861 2009-03-04, 02:06 PM
Last Post: McBainUK
  Utility to help with Channel Scanning timh 8 3,826 2009-02-09, 12:49 PM
Last Post: timh
  BurndvdX2 Version 1.0.1.8 posted to wiki pastro 1 1,409 2009-02-04, 03:50 AM
Last Post: pbb
  Wiki Plugin/Skin housekeeping. Fatman_do 14 4,286 2008-12-11, 02:46 AM
Last Post: Fatman_do
  BitTorrent client added to the 'Ten Foot' products Andy Henderson 2 2,119 2007-10-16, 05:43 PM
Last Post: Andy Henderson
  I-xmltv: TV Guide customization & Zap2It EPG utility. Jim_ 304 94,926 2007-09-18, 02:20 PM
Last Post: lrf2005

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

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

Linear Mode
Threaded Mode