![]() |
|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Rate Thread | Display Modes |
|
|||
|
Questions regarding Offline ShowSqueeze / licensing issues project...
Being someone who runs both Linux and Windows at home, showsqueezing to WMV format is not ideal for playing back video. (Yes, I know, this is a common complaint "Divx support was removed in 3.4" yada yada yada. I'm not here to complain...Divx is not ideal in the first place)
...So I embarked upon a mission to create an add-on that would allow me to use one my desktop PC to reencode files from my HTPC. (I use the PVR250 and 150, so I'm stuck in MPEG2 format for all new recordings) The process I'm using involves copying the MPEG2 file from my HTPC to my desktop PC, re-encoding the file ffmpeg, copying the re-encoded file back to my Beyond TV (HTPC) and deleting the original (huge) MPEG file. I've designed it to be very flexible...allowing me to encode it in any format that libavcodec supports (natively, or externally such as Xvid). My concern is regarding transfering the show "metadata" from the MPEG2 file to AVI file. (My wife wants to watch "her show", she doesn't care what format its in as long as it looks good). Unable to get the BTV API to work on my remote PC without purchasing a BTV Link license (something that owning one television... other than this issue, is of no interest to me): I built a quick/dirty web app that runs on my BTV box. Its sole purpose is to retrieve the show information of the old show and dump that information back to the new show (with additional ShowSqueeze properties) using simple POST commands to the web server and BTV's web services. I have a C# app that runs (unfortunately) using MS IIS on my BTV box. The C# app accepts two commands: 1. Output show information (which is XML formatted for convenience) 2. Dump showsqueezed information to the "re-encoded" show mimicking that of the original show (and appearing to be "showsqueezed"). So "the point" ... my problem is both Technical and Legal in nature: Not wanting to violate licenses: Is this acceptable (updating the show properties remotely using IIS on my HTPC [BTV box]). If not, then is there some other way to update the details (including those that are not accessible through WebAdmin), that would be acceptable under the license agreement for BTV. Any assistance is appreciated... I built this add-on for myself, but if I can release it and its source code without incuring legal fees, then I'd like to make it freely available to the rest of the community here... Mucking about between public and commercial licenses is not one of my strong points, so I'd rather err and on the side of caution ... Thanks! -- Acousticiris Last edited by acousticiris; 04-06-2005 at 06:39 PM. |
|
|||
|
Re: Questions regarding Offline ShowSqueeze / licensing issues project...
At least as far as I can tell, that may be the case. This is the reason I haven't shared my code as yet.
I am curious if anyone can answer my second query though: is there an alternative to how I am doing this that is on less shaky ground (or even, perhaps, more reliable...because this hasn't been the most reliable way to do it). Obviously I have no desire to rob Snapstream of a license ... even if it would seem to be something that shouldn't require a separate license ... I didn't write their software, so it's not my choice. I will say, from a user standpoint that having to purchase a third piece of software to do such a simple task would be a waste of money...and from a developer standpoint it would be severly limiting with regard to what I could produce using the API. It's those types of things that cause me to consider open-source alternatives much more closely in spite of the fact that I *love* Beyond TV. If they desire a vibrant development community around their app, they have to be flexible with their terms,... |
|
|||
|
Re: Questions regarding Offline ShowSqueeze / licensing issues project...
Does the application on the HTPC need to be web-based? My solution would be to have a standalone application on the HTPC, that regularly looks for files in a directory.
Then the files would be copied from the desktop PC to the HTPC into this directory, with the filenames kept the same (with just the extension changed). The application should then be able to find the original file in the Library using the API functions, extract the metadata, overwite the file, and store the metadata for the new file. The only link between the HTPC and desktop PC is the copying of files. |
|
||||
|
Re: Questions regarding Offline ShowSqueeze / licensing issues project...
Quote:
The only remote usage that is permitted is throuhg a web browser, if and only if your web server is on the BTV Server. Regards, Stéphane.
__________________
P4 820D - 2 GB ATI X1800 XL - PVR 150 x 2 XP Pro SP2 - DX 9c - Catalyst 6.9 - CyberLink PowerDVD 7 Video & Audio Decoder. Beyond TV 4.2 - BTV XMLTV Importer - Web Based Program Guide - Firefly, Firefly Mini, Streamzap, USB-UIRT or MCE Remote Tool |
|
||||
|
Re: Questions regarding Offline ShowSqueeze / licensing issues project...
and even then SS were ambigious about how much they would sanction.
SS did at one point admit the EULA was flawed and said they'd rethink it. Evidently they didn't think about it too much.
__________________
Sleep well Kismet |
|
|||
|
Re: Questions regarding Offline ShowSqueeze / licensing issues project...
Quote:
Thanks! |
|
|||
|
Re: Questions regarding Offline ShowSqueeze / licensing issues project...
That might be where the problem arises... I'm writing out an AVI file using ffMpeg (not MPEG-2 or WMV).
I am storing some metadata in the file (and it is viewable by most AVI file players), but it's three fields, not the wealth of fields that BTV is able to display. Realistically, I want to be able to update the database record for a compressed file so that BTV sees it as though it is not only the "original show", but also a showsqueezed version of the original show (though, I'll pass on the showsqueezed part if I can at least get the "original air date", recording date and other fields to update properly so that they don't expire improperly). I *don't* care about streaming the file. I just want a smaller version of it in identical quality that can be recompressed a little faster than real-time (and can be put on my linux box, dell axim, or anywhere else I wish to play it regardless of OS). WMV doesn't provide this. The two problems I have run into *regularly* (other than the potential legal issues that I'm unsure of) is that whether locally or remotely, the BTV API seems to just...stop working. I can re-encode (locally or remotely) about 50 files or so if the BTV server is not busy (on a weekend when I have fewer recordings) ... or about 10 when it is busy (weekdays) before having to reboot the box because the SOAP connection to the object required to update the show data appears to die. I've hex edited the database and I'm pretty sure I know what the db format is (and even if not, I have the format down enough to be able to edit it). Of course, while BTV is running, the DB is locked so I can't effectively edit it in any way that would be useful. It's really simple, I just want to be able to update *all* of the information about a recording using a script or app. I don't care if I'm limited to only doing it locally on the box (though it would be nice if I could do it remotely without purchasing another application). The Web UI doesn't provide me enough, the API is too unreliable, and the database isn't accessible while BTV is running. So, I guess my question is ... is there another way short of using a different HTPC app all-toghether? I'm rather fond of BTV/Beyond Media. |
|
||||
|
Re: Questions regarding Offline ShowSqueeze / licensing issues project...
Quote:
Now, MPEG-2 files are a bit different. I found that BTV also stores metadata in MPEG-2 videos, but there doesn't appear to be a format standard, let alone an API, for metadata storage in MPEG. A little hex editing and diffing was all I needed though: BTV-generated metadata is stored in the last 8218 bytes of MPEG-2 videos. Specifically, bytes 8218-8215 are "00 00 01 BF" (a "Private Stream 2" packet according to MPEG specifications, containing any sort of data), bytes 8214-8213 are "20 14" (8212 in decimal; the length of the packet), there are a few other bytes, and then the name/value pairs (delimited by "00") containing metadata info start. They end when "00 00" is reached, and then the rest of the packet (a large majority) is just junk bytes. The metadata-copying code for that I integrated into my custom build of mpgtx, basically just looking for "00 00 01 BF" at that certain location at the end of files, and then copying those 8218 bytes to the new files. Very simple ![]() (PS: Sorry I didn't respond sooner; the topic reply notification got lost in my inbox )
|
|
|||
|
Re: Questions regarding Offline ShowSqueeze / licensing issues project...
IGx89. Excellent. This is great information about how to copy all the show attributes from one WMV file to another. Problem is that the URL you gave for the source code yields a 404 Not Found.
It is GREAT for you to have added this feature to IGCutter. I'll try the new version with this feature soon. |
|
|||
|
Re: Questions regarding Offline ShowSqueeze / licensing issues project...
IG89, One more thing. You did a great job of identifying how to read meta-data from MPG and WMV files. Do you happen to know of a utility that can write the info to a .AVI file? I am experimenting with converting to xvid (avi) format, and I don't like using the Snapstream API to copy the show attributes since it often times out with an exception and is only useable on the machine SS is running on, etc.
|
|
|||
|
Re: Questions regarding Offline ShowSqueeze / licensing issues project...
Curious ... I know SS keeps a database, and a hex editing of that DB contains the show information. Does SS actually write out the header information to the AVI file upon the usage of its API, or does it just store that data in the database ... to only be lost if the database becomes corrupted?
I'm curious on two fronts... I love hex editing and if it is storing the data in the AVI file, it probably won't be too difficult to figure out exactly how it is doing so, and I, like Soundman, would like to eliminate my usage of the API all together since it is not as reliable as it could be... |
|
|||
|
Re: Questions regarding Offline ShowSqueeze / licensing issues project...
I just answered my own question...
They are stored in the actual AVI file. I'm (obviously) not an expert in multimedia formats, but it appears pretty simple. Easy enough to find by just going to the tail end of the file and you can see ATTR, follwed by a 32-bit integer representing the byte count, followed by 4 bytes of data that I'm not sure of (again, don't know the format well), then a set of null terminated properties and strings. I'm guessing this is some standardized format, or some non-standard format that happens to work because of the way an AVI file is parsed. -- <RIFF>[32-bit size] ---- <AVI >LIST[32-bit size] ------ hrdl[32-bit size] ------ movi[32-bit size] ---- <idx1>[32-bit size] (this appears to be the end of the video/audio stream information on a simple xvid encoded video) ---- ATTR[32-bit size][4 bytes of unknown] ---- series of null terminated strings using <property name>NULL<value>NULL until it reaches the end of the file. That seems like a reasonable method for parsing what's there, and editing it. Haven't had much time to look deeper, the 4 bytes of unknown data probably represent something important but I was only using a single AVI file that I squeezed using my external re-encoding tool and BTV's API to set the properties. After checking out a few others, I'm sure it will reveal itself ... my hope is that I can just drop the ATTR section and recompute it using my own values either scraped from a web site like TV Tome or simply copied (and supplimented with showsqueeze information) from the original MPG. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| HD and showsqueeze issues | nevik | Beyond TV and Beyond TV Link | 0 | 12-18-2007 11:17 AM |
| HD post processing issues / questions | enigma9o7 | Beyond TV and Beyond TV Link User-to-User Troubleshooting & Support Forum | 5 | 12-27-2006 07:56 PM |
| Showsqueeze issues | Terminal | Beyond TV 4.x | 15 | 10-19-2005 02:05 PM |
| Next Project Questions | Deuce911 | Development Discussion | 15 | 02-02-2005 04:49 PM |
| Offline showsqueeze | jip | SnapStream Discussion | 1 | 03-08-2004 02:03 PM |