INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Import Thumbnails  (Read 2792 times)

SeaDrive

  • World Citizen
  • ***
  • Posts: 173
Import Thumbnails
« on: November 10, 2008, 12:59:44 pm »

I have an HD-PVR capture device on my system that I use to record TV shows, movies, etc. The device records as .ts files. In an earlier thread I mentioned that MC13 does not convert these files ti iPod video very well. In fact, the playback is too choppy to watch. As a workaround I convert the files outside of MC and then import both files (.ts and .mp4). I record all files to a default recording directory and the PVR software creates an XML file with episode information. I have a program that check for the presence of the .ts, .mp4 and .xml files in the recording folder. If they all exist the .ts and .mp4 files are moved to the folder named for the recorded show. the program also prases the .xml file for episode data such as name, description, original air date, recorded dat, etc. I use this data to automatically build a .MPL file in MC13 format. Once I run the MC auto-import for all moved files I import the .MPL file and all of my library data is updated automatically. I'm happy to say that this whole process has been working great with MC13.

As an extra feature I like to attach movie or TV show posters as the thumbnail image for each file. For example, if i'm Recordning Law and Order and will use the generic Law and Order poster .jpg as the image. I'm able to accomplish this by first manually downloading a .jpg file to the file's folder. For example I will have a 'Law and Order.jpg' file in the \Recorded Shows\Law and Order folder. During the move and rename process my utility will move the file from the default recording folder to the \Recorded Shows\Law and Order folder and name it something like 'Law and Order - Some Great Episode Name'. I figured out that I can then copy the 'Law ad Order.jpg' file to a new file named 'Video -'Law and Order - Some Great Episode Name.jpg' and add that same information to the .MPL file to be imported. Because the playback of .TS files in MC13 tears quite a bit I set it as a Media Type of 'data' and have MC play it in PowerDVD. This too is done in the .MPL import file. That formces me to also have another .jpg image file named 'Data -'Law and Order - Some Great Episode Name.jpg'.

Sorry for the long explaination above but now to the problem. When I import the .MPL file the .ts file with a media type of data automatically gets the thumbnail attached as I would expect. However, the .mp4 file gets shows the imagefile as 'inside file' and actually deletes the 'Video -'Law and Order - Some Great Episode Name.jpg' from the folder. I wanted to confirm that this was indeed an MC issue and not related to my .MPA file so I manually attached a thumbnail file to the .mp4 file and verified that the image file tag contained the correct information. I then exportedthe playlist from MC to a .MPL file. Next I re-imported the .MPL file just created from MC. Once again the image file tag returned to 'inside file' and the image file was deleted.

Am I doing something wrong or is this a bug?

One additional question. Since I have to convert the.ts to a .mp4 file externally and import both files is there any way that I can manually force MC to treat them as a stack? I've been searching for days.
Logged

SeaDrive

  • World Citizen
  • ***
  • Posts: 173
Re: Import Thumbnails
« Reply #1 on: November 10, 2008, 01:20:03 pm »

As I was typing the last post I got to thinking and wanted to test some more options. It seems that the dropping of the image file is not releated to the file extension but rather to the media type tag. Media type of data works fine while video resets the image file. Not really a big surprise. Just for the heck of it I changed the .MPL file format to import all of the tags except for the image file between the <ITEM> and </ITEM> tags. Then I created a new set of <ITEM> and </ITEM> tags for the same file that contain only the filename and the image file tinking this would first upade all tags including media type and then save that information to the database. Then the next section would only update the image file tag. To my surprise that worked.

I can use that approach for now but I'm still wondering if this is a bug or by design.
Logged

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: Import Thumbnails
« Reply #2 on: November 10, 2008, 04:19:49 pm »

Sorry for the long explaination above but now to the problem. When I import the .MPL file the .ts file with a media type of data automatically gets the thumbnail attached as I would expect. However, the .mp4 file gets shows the imagefile as 'inside file' and actually deletes the 'Video -'Law and Order - Some Great Episode Name.jpg' from the folder. I wanted to confirm that this was indeed an MC issue and not related to my .MPA file so I manually attached a thumbnail file to the .mp4 file and verified that the image file tag contained the correct information. I then exportedthe playlist from MC to a .MPL file. Next I re-imported the .MPL file just created from MC. Once again the image file tag returned to 'inside file' and the image file was deleted.

I have hard time to understand how an mpl import can make MC to delete a cover art file from the disk. Does the MP4 file actually contain an embedded image and can MC show that image or is the "Inside File" value erroneous?

The only way I can force MC to delete cover art is to select a file (or a bunch of files), run the "Remove cover art" tool and answer yes to the "Do you also want to permanently delete the cover art files from your hard disk" question.

Could you post a small sample MPL file and step by step instructions for reproducing the issue.
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

SeaDrive

  • World Citizen
  • ***
  • Posts: 173
Re: Import Thumbnails
« Reply #3 on: November 11, 2008, 10:54:31 am »

Here are 2 samples of the MPL files. Notice that the older version where all of the tag imports are withing one import rule while the new version has 2 distinct import rules. As far as deleting the jpg it seems that it is not a consistent issue but I know its not related to Remove Cover Art because I didn't do that.

-- Old --
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<MPL Version="2.0" Title="Video Tags">
<Item>
<Field Name="Filename">C:\My Documents\My Videos\Television\Las Vegas\Las Vegas (Wagers of Sin).ts</Field>
<Field Name="Comment">Ed, Danny and Mike bet on who can find the most waste at the Montecito Mary must sell the last residential suite and hopes to entice big money with a performance by John Legend.</Field>
<Field Name="Album">Las Vegas</Field>
<Field Name="Artist">Las Vegas</Field>
<Field Name="Image File">Data - Las Vegas (Wagers of Sin).jpg</Field>
<Field Name="Genre">Crime drama</Field>
<Field Name="Date">39751.4583333333</Field>
<Field Name="Original Air Date">01/20/2007</Field>
<Field Name="First Run">NO</Field>
<Field Name="Media Type">Data</Field>
<Field Name="Media Sub Type">TV Show</Field>
</Item>
<Item>
<Field Name="Filename">C:\My Documents\My Videos\Television\Las Vegas\Las Vegas (Wagers of Sin).mp4</Field>
<Field Name="Comment">Ed, Danny and Mike bet on who can find the most waste at the Montecito Mary must sell the last residential suite and hopes to entice big money with a performance by John Legend.</Field>
<Field Name="Album">Las Vegas</Field>
<Field Name="Artist">Las Vegas</Field>
<Field Name="Image File">Video - Las Vegas (Wagers of Sin).jpg</Field>
<Field Name="Genre">Crime drama</Field>
<Field Name="Date">39751.4583333333</Field>
<Field Name="Original Air Date">01/20/2007</Field>
<Field Name="First Run">NO</Field>
<Field Name="Media Type">Video</Field>
<Field Name="Media Sub Type">TV Show</Field>
</Item>
</MPL>


-- New --
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<MPL Version="2.0" Title="Video Tags">
<Item>
<Field Name="Filename">C:\My Documents\My Videos\Television\Las Vegas\Las Vegas (Wagers of Sin).ts</Field>
<Field Name="Comment">Ed, Danny and Mike bet on who can find the most waste at the Montecito Mary must sell the last residential suite and hopes to entice big money with a performance by John Legend.</Field>
<Field Name="Album">Las Vegas</Field>
<Field Name="Artist">Las Vegas</Field>
<Field Name="Genre">Crime drama</Field>
<Field Name="Date">39751.4583333333</Field>
<Field Name="Episode">Wagers of Sin</Field>
<Field Name="Original Air Date">01/20/2007</Field>
<Field Name="First Run">NO</Field>
<Field Name="Media Type">Data</Field>
<Field Name="Media Sub Type">TV Show</Field>
</Item>
<Item>
<Field Name="Filename">C:\My Documents\My Videos\Television\Las Vegas\Las Vegas (Wagers of Sin).ts</Field>
<Field Name="Image File">Data - Las Vegas (Wagers of Sin).jpg</Field>
</Item>
<Item>
<Field Name="Filename">C:\My Documents\My Videos\Television\Las Vegas\Las Vegas (Wagers of Sin).mp4</Field>
<Field Name="Comment">Ed, Danny and Mike bet on who can find the most waste at the Montecito Mary must sell the last residential suite and hopes to entice big money with a performance by John Legend.</Field>
<Field Name="Album">Las Vegas</Field>
<Field Name="Artist">Las Vegas</Field>
<Field Name="Genre">Crime drama</Field>
<Field Name="Date">39751.4583333333</Field>
<Field Name="Episode">Wagers of Sin</Field>
<Field Name="Original Air Date">01/20/2007</Field>
<Field Name="First Run">NO</Field>
<Field Name="Media Type">Video</Field>
<Field Name="Media Sub Type">TV Show</Field>
</Item>
<Item>
<Field Name="Filename">C:\My Documents\My Videos\Television\Las Vegas\Las Vegas (Wagers of Sin).mp4</Field>
<Field Name="Image File">Video - Las Vegas (Wagers of Sin).jpg</Field>
</Item>
</MPL>
Logged

fitbrit

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4887
Re: Import Thumbnails
« Reply #4 on: November 11, 2008, 03:42:02 pm »

I have hard time to understand how an mpl import can make MC to delete a cover art file from the disk. Does the MP4 file actually contain an embedded image and can MC show that image or is the "Inside File" value erroneous?

The only way I can force MC to delete cover art is to select a file (or a bunch of files), run the "Remove cover art" tool and answer yes to the "Do you also want to permanently delete the cover art files from your hard disk" question.

Could you post a small sample MPL file and step by step instructions for reproducing the issue.

Actually, something similar happened to me as well. I had made an mpl file of a playlist and tried to change the Image File field to match some changes I'd made. This was based on a work flow description you'd made for me, Alex (thanks). It didn't work, and the thumbnails were actually deleted when I tried to import the mpl file. I figured I'd done something wrng and never tried it again. I believe the files were mostly mkv format.
Logged

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: Import Thumbnails
« Reply #5 on: November 11, 2008, 05:26:27 pm »

Here are 2 samples of the MPL files. Notice that the older version where all of the tag imports are withing one import rule while the new version has 2 distinct import rules. As far as deleting the jpg it seems that it is not a consistent issue but I know its not related to Remove Cover Art because I didn't do that. ...

The latter mpl file is dubious because it first imports a file and populates the library fields and instantly after that updates the same file with a new field value. I have never tested an mpl file that contains the same referenced file twice in a row. Inside MC's GUI tag updates from MPL are normally supposed to work when the MPL file is imported by using the File > Import Playlist menu command, but I don't know how the incoming data is cached, sorted and prosessed before the actual library files on the disk are updated. I also don't know if a commandline import command would work if you use that method. In any case I really don't understand what part of MC would delete unimported image files from the disk.

BTW, what was wrong with your "old" mpl structure? It looks fine to me. Also, you didn't answer my "inside file" question and didn't provide the step by step instructions.

In general, the cover art file doesn't need to be named according to any rule when the Image File filed is populated by MPL or the image is linked manually from a disk file by using the cover art tools. There is no need to use separate image files for the two video file formats.
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

SeaDrive

  • World Citizen
  • ***
  • Posts: 173
Re: Import Thumbnails
« Reply #6 on: November 12, 2008, 08:24:50 am »

No, the MP4 file does not contain an image. If you read my original post you will see that the problem is not related to the file or the extension but rather to the Media Type of VIDEO. I agree, the first MPL file should work. That was the reason for my initial post. The first file causes all VIDEO files to use the 'Inside File' option even though the image is specified and exists. You can easily test this by exporting an existin playlist that contains an image file for a video to an MPL file. Then simple import that MPL. The image file is reset to 'Inside File'. I ended up creating the second MPL that references that same file in 2 separate instances specifically because of this problem. I even played with the order of the tags and placed the Image File last. It seems that the data is cached and only imported when the current ITEM is completely read.
Logged

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: Import Thumbnails
« Reply #7 on: November 12, 2008, 09:40:05 am »

I can now confirm the problem. I created a small test file set, added cover art with MC12 and exported this MPL file:

Code: [Select]
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<MPL Version="2.0" Title="Video">
<Item>
<Field Name="Filename">C:\VideoCoverArtBug\chimera.mpg</Field>
<Field Name="Album">2008-11-12</Field>
<Field Name="Name">chimera</Field>
<Field Name="File Type">mpg</Field>
<Field Name="Bitrate">2041</Field>
<Field Name="Image File">chimera.jpg</Field>
<Field Name="Media Type">Video</Field>
<Field Name="File Size">1339870</Field>
<Field Name="Duration">5</Field>
<Field Name="Date Created">1226501060</Field>
<Field Name="Date Modified">1226501060</Field>
<Field Name="Date Imported">1226502038</Field>
<Field Name="Width">320</Field>
<Field Name="Height">240</Field>
<Field Name="Date">39764.6974537037094706</Field>
<Field Name="Use Bookmarking">Default</Field>
<Field Name="Stack Top">-1</Field>
<Field Name="Stack View">0</Field>
</Item>
<Item>
<Field Name="Filename">C:\VideoCoverArtBug\drop.avi</Field>
<Field Name="Album">2008-11-12</Field>
<Field Name="Name">drop</Field>
<Field Name="File Type">avi</Field>
<Field Name="Bitrate">891</Field>
<Field Name="Image File">drop.jpg</Field>
<Field Name="Media Type">Video</Field>
<Field Name="File Size">675840</Field>
<Field Name="Duration">6</Field>
<Field Name="Date Created">1226501111</Field>
<Field Name="Date Modified">1226501111</Field>
<Field Name="Date Imported">1226502042</Field>
<Field Name="Width">256</Field>
<Field Name="Height">240</Field>
<Field Name="Date">39764.6980439814869897</Field>
<Field Name="Use Bookmarking">Default</Field>
<Field Name="Stack Top">-1</Field>
<Field Name="Stack View">0</Field>
</Item>
<Item>
<Field Name="Filename">C:\VideoCoverArtBug\flame.avi</Field>
<Field Name="Album">2008-11-12</Field>
<Field Name="Name">flame</Field>
<Field Name="File Type">avi</Field>
<Field Name="Bitrate">736</Field>
<Field Name="Image File">flame.jpg</Field>
<Field Name="Media Type">Video</Field>
<Field Name="File Size">289280</Field>
<Field Name="Duration">3</Field>
<Field Name="Date Created">1226501126</Field>
<Field Name="Date Modified">1226501126</Field>
<Field Name="Date Imported">1226502044</Field>
<Field Name="Width">256</Field>
<Field Name="Height">240</Field>
<Field Name="Date">39764.6982175925950287</Field>
<Field Name="Use Bookmarking">Default</Field>
<Field Name="Stack Top">-1</Field>
<Field Name="Stack View">0</Field>
</Item>
<Item>
<Field Name="Filename">C:\VideoCoverArtBug\cbw3.avi</Field>
<Field Name="Album">2008-11-12</Field>
<Field Name="Name">cbw3</Field>
<Field Name="File Type">avi</Field>
<Field Name="Bitrate">1071</Field>
<Field Name="Image File">cbw3.jpg</Field>
<Field Name="Media Type">Video</Field>
<Field Name="File Size">837120</Field>
<Field Name="Duration">6</Field>
<Field Name="Date Created">1226501154</Field>
<Field Name="Date Modified">1226501155</Field>
<Field Name="Date Imported">1226502035</Field>
<Field Name="Width">256</Field>
<Field Name="Height">240</Field>
<Field Name="Date">39764.6985532407416031</Field>
<Field Name="Use Bookmarking">Default</Field>
<Field Name="Stack Top">-1</Field>
<Field Name="Stack View">0</Field>
</Item>
<Item>
<Field Name="Filename">C:\VideoCoverArtBug\cirrot.mpg</Field>
<Field Name="Album">2008-11-12</Field>
<Field Name="Name">cirrot</Field>
<Field Name="File Type">mpg</Field>
<Field Name="Bitrate">2028</Field>
<Field Name="Image File">cirrot.jpg</Field>
<Field Name="Media Type">Video</Field>
<Field Name="File Size">2868050</Field>
<Field Name="Duration">11</Field>
<Field Name="Date Created">1226501517</Field>
<Field Name="Date Modified">1226501527</Field>
<Field Name="Date Imported">1226502041</Field>
<Field Name="Width">320</Field>
<Field Name="Height">240</Field>
<Field Name="Date">39764.7028587962995516</Field>
<Field Name="Use Bookmarking">Default</Field>
<Field Name="Stack Top">-1</Field>
<Field Name="Stack View">0</Field>
</Item>
</MPL>

When the MPL file is imported to a new MC12 or MC13 library by using the Import Playlist tool MC deletes the image files from the disk and the Image File field is populated with the "Inside File" value. Apparently MC creates the cached thumbnail images from the jpg files before they are deleted, but naturally the thumbnails cannot be rebuilt later.

The is a very serious bug because it deletes files.

In the past I have imported similar MPL files without problems, but apparently this bug has sneaked in without anyone noticing.

I uploaded a sample files package here: http://rapidshare.com/files/163079789/VideoCoverArtBug.zip (5.3 MB). It contains the small avi and mpg video clips, the cover art images and the MPL file. The package can be used for easily reproducing the bug.
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42373
  • Shoes gone again!
Re: Import Thumbnails
« Reply #8 on: November 12, 2008, 02:02:39 pm »

Normally the image files returned from the file analyzer are temporary images from the tag.

MPL import is the only case where they could be permanent disk files.

This case will be handled nicely in a coming build.
Logged
Matt Ashland, JRiver Media Center

SeaDrive

  • World Citizen
  • ***
  • Posts: 173
Re: Import Thumbnails
« Reply #9 on: November 12, 2008, 02:24:29 pm »

Greate. Thanks.

In the mean time I will use 2 Item import method that seems to work for now.
Logged
Pages: [1]   Go Up