NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums General General Discussion v
« Previous 1 … 26 27 28 29 30 … 159 Next »
Extracting ADS metadata to a seperate file

 
  • 0 Vote(s) - 0 Average
Extracting ADS metadata to a seperate file
ACTCMS
Offline

Posting Freak

UK
Posts: 2,730
Threads: 101
Joined: Jun 2007
#1
2011-10-05, 05:34 PM
Does anyone have a batch file for extracting the ADS metadata.xml from a .ts recording and saving it in a suitably named .xml file?
Reddwarf
Offline

Posting Freak

Posts: 6,629
Threads: 230
Joined: Mar 2007
#2
2011-10-05, 11:31 PM
It should be possible by copying the metadata part from the original .ts file, but when the recording filename contains spaces it does not work. I'v got around this by setting <StoreSeparateMetadataXml>true</StoreSeparateMetadataXml> in config.xml.

"I'd rather have a bottle in front of me than a frontal lobotomy"
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,830
Threads: 954
Joined: May 2006
#3
2011-10-05, 11:50 PM
Here is how you might extract metadata.xml to another file name;

Code:
rem without paths

more < "%~1:metadata.xml" > "%~n1.metadata.xml"

or with paths in %1

more < "%~1:metadata.xml" > "%~f1%~n1.metadata.xml"

Martin
ACTCMS
Offline

Posting Freak

UK
Posts: 2,730
Threads: 101
Joined: Jun 2007
#4
2011-10-05, 11:54 PM
Reddwarf Wrote:It should be possible by copying the metadata part from the original .ts file, but when the recording filename contains spaces it does not work. I'v got around this by setting <StoreSeparateMetadataXml>true</StoreSeparateMetadataXml> in config.xml.
Thanks for that - so instead of playing about with batch files, I can just get the skutters to do it...Big Grin
ACTCMS
Offline

Posting Freak

UK
Posts: 2,730
Threads: 101
Joined: Jun 2007
#5
2011-10-08, 04:59 PM
mvallevand Wrote:Here is how you might extract metadata.xml to another file name;

Code:
rem without paths

more < "%~1:metadata.xml" > "%~n1.metadata.xml"

or with paths in %1

more < "%~1:metadata.xml" > "%~f1%~n1.metadata.xml"

Martin
Thanks for that Martin... I'm using Reddwarf's suggestion to create the xml file, but my video editor loses the ADS, so to put it back in I'm using
Code:
more < "%~n1.metadata.xml" > "%~1:metadata.xml"

Alex
Reddwarf
Offline

Posting Freak

Posts: 6,629
Threads: 230
Joined: Mar 2007
#6
2011-10-08, 08:58 PM
ACTCMS Wrote:Thanks for that Martin... I'm using Reddwarf's suggestion to create the xml file, but my video editor loses the ADS, so to put it back in I'm using
Code:
more < "%~n1.metadata.xml" > "%~1:metadata.xml"

Alex
Interesting, does it work?

"I'd rather have a bottle in front of me than a frontal lobotomy"
ACTCMS
Offline

Posting Freak

UK
Posts: 2,730
Threads: 101
Joined: Jun 2007
#7
2011-10-13, 10:19 PM
Reddwarf Wrote:Interesting, does it work?
Yes and No...

I foolishly Googled "Alternate Data Streams" and ended up disappearing down a rabbit hole from which I've only just emerged...:eek:

I eventually found Frank Heyne's excellent LADS utility which helped clear up a few things.

I ended up with two fairly basic batch files which for ease of use I added to the Windows Explorer context menu for .ts files...

MetadataExtract.bat containing
Code:
echo "Extract metadata"

more < "%~1:metadata.xml" > "%~n1.metadata.xml"

pause
and MetadataInsert.bat containing
Code:
echo "Insert metadata"

more < "%~d1%~p1%~n1.metadata.xml" > "%~1:metadata.xml"

pause
I don't know much about batch files and I'm sure they could be improved on, but both work fine for me and MetadataInsert can also be used to overwrite an existing :metadata.xml ADS.

One problem which confused my early testing was - in Videos, if a .ts file has a corresponding .xml file as created by the config.xml option
Code:
<StoreSeparateMetadataXml>true</StoreSeparateMetadataXml>
then no metadata is displayed.

Alex
speising
Offline

Member

Posts: 57
Threads: 9
Joined: Nov 2008
#8
2011-10-14, 05:40 PM
i'd like to say that %~d1%~p1%~n1 ist the same as %~dpn1
ACTCMS
Offline

Posting Freak

UK
Posts: 2,730
Threads: 101
Joined: Jun 2007
#9
2011-10-14, 08:23 PM
ACTCMS Wrote:I don't know much about batch files and I'm sure they could be improved on,

speising Wrote:i'd like to say that %~d1%~p1%~n1 ist the same as %~dpn1
That's much more elegant - thanks...

Alex
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  Comskip config file spudjg1 0 2,034 2019-08-26, 02:49 PM
Last Post: spudjg1
  TS and PART file? Download/recording tv streams joeijm 5 3,722 2018-03-25, 01:53 AM
Last Post: joeijm
  Not saving in s01e01 file format jeflatt 4 2,965 2015-09-30, 08:26 PM
Last Post: mvallevand
  Replace video file without windows telling apps the original was deleted? ATHiker 0 1,642 2013-11-25, 09:23 PM
Last Post: ATHiker
  get working/batch/file dirs from one line[any dir of it's path too!] pBS 17 12,380 2013-11-05, 12:03 PM
Last Post: pBS
  PLex metadata stustunz 24 8,612 2013-04-21, 09:40 AM
Last Post: stustunz
  Need Help With Video File Types bdgbill 8 3,978 2012-12-30, 11:43 PM
Last Post: Reddwarf
  how to make a dvd from ts file fuzzweed 3 2,286 2012-04-04, 03:46 PM
Last Post: Reddwarf
  How much ram req'd to delete swap file? Elmo Putney 10 3,555 2012-01-28, 09:40 PM
Last Post: johnsonx42
  Batch file help imilne 2 1,611 2010-03-07, 07:12 PM
Last Post: speising

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

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

Linear Mode
Threaded Mode