YouTube dwnload issue

Oct 1, 2014 at 2:55 PM
I am running into issues when the program is trying to download a video from Youtube...

10/1/2014 9:53:13 AM - Next trailer: Tak3n (Trailer)
10/1/2014 9:53:13 AM -
480p       http://www.youtube.com/watch?v=JuU0M2xBasc&fmt=35
720p       http://www.youtube.com/watch?v=JuU0M2xBasc&fmt=22
1080p      http://www.youtube.com/watch?v=JuU0M2xBasc&fmt=37
poster     http://static.hd-trailers.net/images/tak3n-poster-20140930.jpg
10/1/2014 9:53:13 AM - Looking up MovieName on IMDB
10/1/2014 9:53:16 AM - IMDB page was located
10/1/2014 9:53:16 AM - Config Specifies TrailersIdenticaltoTheatricalTrailers
10/1/2014 9:53:16 AM - Extracted download url (1080p): http://www.youtube.com/watch?v=JuU0M2xBasc&fmt=37
10/1/2014 9:53:16 AM - Local directory: \Ds1511\xbmc\Trailers
10/1/2014 9:53:16 AM - YouTube Trailers Download ...
10/1/2014 9:53:16 AM - ERROR: Problem with youtubeDownloader
10/1/2014 9:53:16 AM - System.IO.FileLoadException: Could not load file or assembly 'Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The
located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
File name: 'Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'
at YoutubeExtractor.DownloadUrlResolver.GetDownloadUrls(String videoUrl, Boolean decryptSignature)
at HDTrailersNETDownloader.Program.YouTubeDownload(String downloadURL, String fName, String dirName, String qualPref)

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
Coordinator
Oct 2, 2014 at 10:21 PM
Could you try the lastest version 2.4.1
Oct 3, 2014 at 4:02 PM
Tried the latest, and I am still having the same issues. As a second test, I uninstalled the program and reinstalled it, and it is still giving the same issue. Here is the log for 1 of the movies from today......

10/3/2014 10:58:25 AM - Next trailer: Mommy (Trailer)
10/3/2014 10:58:25 AM -
480p       http://www.youtube.com/watch?v=PlZB2LLjzZY&fmt=35
720p       http://www.youtube.com/watch?v=PlZB2LLjzZY&fmt=22
1080p      http://www.youtube.com/watch?v=PlZB2LLjzZY&fmt=37
poster     http://static.hd-trailers.net/images/mommy-poster-20141002-resized.jpg
10/3/2014 10:58:25 AM - Looking up MovieName on IMDB
10/3/2014 10:58:28 AM - IMDB page was located
10/3/2014 10:58:28 AM - Config Specifies TrailersIdenticaltoTheatricalTrailers
10/3/2014 10:58:28 AM - Extracted download url (1080p): http://www.youtube.com/watch?v=PlZB2LLjzZY&fmt=37
10/3/2014 10:58:28 AM - Local directory: \Ds1511\xbmc\Trailers
10/3/2014 10:58:28 AM - YouTube Trailers Download ...
10/3/2014 10:58:28 AM - ERROR: Problem with youtubeDownloader
10/3/2014 10:58:28 AM - System.IO.FileLoadException: Could not load file or assembly 'Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
File name: 'Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'
at YoutubeExtractor.DownloadUrlResolver.GetDownloadUrls(String videoUrl, Boolean decryptSignature)
at HDTrailersNETDownloader.Program.YouTubeDownload(String downloadURL, String fName, String dirName, String qualPref)

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].


I noticed that if I right click on the Newtonsoft.Json.dll file and go to the Details tab, it shows the product version of 6.0.5.17707. Not sure if this makes a difference or not,

Thanks,
Steve
Coordinator
Oct 3, 2014 at 10:51 PM
Sorry for the painful debugging but I can not replicate here. Try downloading 2.4.2. Uninstall, make sure the program folder is completely deleted and reinstall. There sees to be a version mismatch between the version of JSON installed directly with that installed by YouTubeExtractor.
Oct 9, 2014 at 4:58 PM
Downloaded the latest file 2.4.2, and I am still running into the same issue, I enabled the binding logging feature, and this is what appears in the log files:

10/9/2014 11:55:37 AM - Next trailer: America the Beautiful 3 (Trailer)
10/9/2014 11:55:37 AM -
480p       http://www.youtube.com/watch?v=TZoDGHV0B4A&fmt=35,http://videos.hd-trailers.net/AmerTheBeautiful_Trailer-480p-HDTN.mp4
720p       http://www.youtube.com/watch?v=TZoDGHV0B4A&fmt=22
poster     http://static.hd-trailers.net/images/america-the-beautiful-3-poster-20141009-resized.jpg
10/9/2014 11:55:37 AM - Looking up MovieName on IMDB
10/9/2014 11:55:41 AM - IMDB page was located
10/9/2014 11:55:41 AM - Config Specifies TrailersIdenticaltoTheatricalTrailers
10/9/2014 11:55:41 AM - Extracted download url (720p): http://www.youtube.com/watch?v=TZoDGHV0B4A&fmt=22
10/9/2014 11:55:41 AM - Local directory: \Ds1511\xbmc\Trailers
10/9/2014 11:55:41 AM - YouTube Trailers Download ...
10/9/2014 11:55:41 AM - ERROR: Problem with youtubeDownloader
10/9/2014 11:55:41 AM - System.IO.FileLoadException: Could not load file or assembly 'Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
File name: 'Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'
at YoutubeExtractor.DownloadUrlResolver.GetDownloadUrls(String videoUrl, Boolean decryptSignature)
at HDTrailersNETDownloader.Program.YouTubeDownload(String downloadURL, String fName, String dirName, String qualPref)

=== Pre-bind state information ===
LOG: DisplayName = Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed
(Fully-specified)
LOG: Appbase = file:///C:/Program Files (x86)/HD-Trailers.NET Downloader/
LOG: Initial PrivatePath = NULL

Calling assembly : YoutubeExtractor, Version=0.10.4.0, Culture=neutral, PublicKeyToken=null.

LOG: This bind starts in default load context.
LOG: No application configuration file found.
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Post-policy reference: Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed
LOG: Attempting download of new URL file:///C:/Program Files (x86)/HD-Trailers.NET Downloader/Newtonsoft.Json.DLL.
WRN: Comparing the assembly name resulted in the mismatch: Major Version
ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.
Oct 14, 2014 at 6:42 AM
Getting the exact same issues. Uninstalled 2.4.0, installed 2.4.1 (where's 2.4.2? Can't find it?) but the problem persists every time...
Coordinator
Oct 14, 2014 at 4:08 PM
I have reproduced the error and am trying to figure out how to resolve.
Oct 14, 2014 at 4:44 PM
Funny thing is, used to work just fine before and it just started throwing this error today, without me changing versions. I don't even remember Windows updating anything...
Coordinator
Oct 15, 2014 at 1:16 PM
HD-Trailers.Net rarely posts YouTube videos to the RSS feed so the error only happens infrequently. Somehow I have a version number issue with the Newtonsoft.json dll. Just haven't been able to figur eout why.
Ian
Oct 18, 2014 at 2:27 PM
I was looking at the logs, since I have upgraded to v2.4.2, along with the original issue with the Newtonsoft version, I am also getting the "Trailer size is smaller than MinTrailerSize".

In the meantime, I am going to go back to a previous release.
Coordinator
Oct 19, 2014 at 6:34 PM
I am struggling to find the reason for the problem with Newtonssoft.json (required with the YouTube Extractor dll but there haven't been any changes that would have changed the behavior related to the MinTrailerSize. That is usually a result of the website not reporting the trailer length correctly.

Did going back to a previous release fix the issue with Newtonsoft.json? I tried rolling back that package and recreating the install package but I still see the same error on a test machine I have setup.
Could you post the log to pastebin when you have a chance
Coordinator
Oct 19, 2014 at 8:30 PM
I think I figured out how to get around the issue with Newtonsoft.json. I replaced the version 2.4.2 that I had uploaded last week. Appreciate if you could confirm.

If that works, I will switch over to working on the TrailersSize < MinTrailerSize
Oct 20, 2014 at 3:23 PM
Tested the 2.4.2 version and I did not receive the Newton error today, so looks like that part of it has been fixed. I will check my logs in a few days to confirm that this is no longer an issue.

Here is an example of the trailer size error:

10/20/2014 10:05:24 AM - Next trailer: Words and Pictures (Trailer 1)
10/20/2014 10:05:24 AM -
480p       http://www.hd-trailers.net/yahoo-redir.php?id=0ae47fa2-4e7b-3b54-876d-66f7167fb909&amp;resolution=540
720p       http://www.hd-trailers.net/yahoo-redir.php?id=0ae47fa2-4e7b-3b54-876d-66f7167fb909&amp;resolution=720
1080p      http://www.hd-trailers.net/yahoo-redir.php?id=0ae47fa2-4e7b-3b54-876d-66f7167fb909&amp;resolution=1080
poster     http://static.hd-trailers.net/images/52e7f540-ccbf-11e3-91e9-41e7591b6cf2_words_and_pictures_Poster-resized.jpg
10/20/2014 10:05:24 AM - Looking up MovieName on IMDB
10/20/2014 10:05:27 AM - IMDB page was located
10/20/2014 10:05:27 AM - Config Specifies TrailersIdenticaltoTheatricalTrailers
10/20/2014 10:05:27 AM - Extracted download url (1080p): http://www.hd-trailers.net/yahoo-redir.php?id=0ae47fa2-4e7b-3b54-876d-66f7167fb909&resolution=1080
10/20/2014 10:05:27 AM - Local directory: \Ds1511\xbmc\Trailers
10/20/2014 10:05:28 AM - Filename : Words and Pictures (Trailer 1)_1080p-trailer.mov
10/20/2014 10:05:28 AM - Stream successfully opened
10/20/2014 10:05:28 AM - Trailer size smaller then MinTrailerSize. Skipping ...
Coordinator
Oct 21, 2014 at 7:28 PM
I replaced the version 2.4.2 with a similar version with additional diagnostic information about the mintrailersize error.

I will be working on this on the two machines I have to troubleshoot but if you have a chance, I would appreciate a similar log to the one above with this new version.
Oct 22, 2014 at 8:49 AM
Just ran it, worked fine for me...
Coordinator
Oct 22, 2014 at 10:29 PM
Thanks Exolon. I am not sure what the conditions need to be that results in the MinTrailerSize error message. Keep me posted.
Oct 23, 2014 at 6:19 AM
Third run now, still doing fine... used to get the error every single time since it appeared, but seems to be working ok now :) Thanks!
Oct 23, 2014 at 2:49 PM
Everything is looking good from my end. Still get the odd Trailersize issue, but it is not as frequent as it was last week.

Here are the movies that have popped up over the past couple of days.

note: allMinTrailerSize: 100000

10/23/2014 3:03:56 AM - Next trailer: Love, Rosie (His Awkward Trailer)
10/23/2014 3:03:56 AM -
480p       http://www.hd-trailers.net/yahoo-redir.php?id=ed5b90c1-f209-3089-ac26-245a998100f6&amp;resolution=540
720p       http://www.hd-trailers.net/yahoo-redir.php?id=ed5b90c1-f209-3089-ac26-245a998100f6&amp;resolution=720
1080p      http://www.hd-trailers.net/yahoo-redir.php?id=ed5b90c1-f209-3089-ac26-245a998100f6&amp;resolution=1080
poster     http://static.hd-trailers.net/images/love-rosie-poster-20141021-resized.jpg
10/23/2014 3:03:56 AM - Looking up MovieName on IMDB
10/23/2014 3:03:59 AM - IMDB page was located
10/23/2014 3:03:59 AM - Config Specifies TrailersIdenticaltoTheatricalTrailers
10/23/2014 3:03:59 AM - Extracted download url (1080p): http://www.hd-trailers.net/yahoo-redir.php?id=ed5b90c1-f209-3089-ac26-245a998100f6&resolution=1080
10/23/2014 3:03:59 AM - Local directory: \Ds1511\xbmc\Trailers
10/23/2014 3:03:59 AM - Filename : Love, Rosie (His Awkward Trailer)_1080p-trailer.mov
10/23/2014 3:03:59 AM - Stream successfully opened

10/23/2014 3:03:59 AM - Trailer size smaller then MinTrailerSize. Skipping ...

10/23/2014 3:03:51 AM - Next trailer: Birdman: Or the Unexpected Virtue of Ignorance (International Trailer)
10/23/2014 3:03:52 AM -
480p       http://www.hd-trailers.net/yahoo-redir.php?id=b3c1ec88-21ca-34c2-a425-dd63d598443b&amp;resolution=540,http://movietrailers.apple.com/movies/fox_searchlight/birdman/birdman-domtlr_h480p.mov
720p       http://www.hd-trailers.net/yahoo-redir.php?id=b3c1ec88-21ca-34c2-a425-dd63d598443b&amp;resolution=720
poster     http://static.hd-trailers.net/images/04bbb610-50de-11e4-84e2-b746db480055_birdman-poster-new-resized.jpg
10/23/2014 3:03:52 AM - Looking up MovieName on IMDB
10/23/2014 3:03:54 AM - IMDB page was located
10/23/2014 3:03:54 AM - Config Specifies TrailersIdenticaltoTheatricalTrailers
10/23/2014 3:03:54 AM - Extracted download url (720p): http://www.hd-trailers.net/yahoo-redir.php?id=b3c1ec88-21ca-34c2-a425-dd63d598443b&resolution=720
10/23/2014 3:03:54 AM - Local directory: \Ds1511\xbmc\Trailers
10/23/2014 3:03:54 AM - Filename : Birdman Or the Unexpected Virtue of Ignorance (International Trailer)_720p-trailer.mov
10/23/2014 3:03:54 AM - Stream successfully opened

10/23/2014 3:03:54 AM - Trailer size smaller then MinTrailerSize. Skipping ...

10/22/2014 11:34:28 AM - Next trailer: Contagion (Trailer)
10/22/2014 11:34:28 AM -
480p       http://www.hd-trailers.net/yahoo-redir.php?id=32f87591-97e0-331c-b4a9-0fe04076dfd9&amp;resolution=480,http://trailers.apple.com/movies/wb/contagion/contagion-tlr1_h480p.mov
720p       http://www.hd-trailers.net/yahoo-redir.php?id=32f87591-97e0-331c-b4a9-0fe04076dfd9&amp;resolution=720
poster     http://static.hd-trailers.net/images/contagion-warner-bros-pictures-2011-62177-resized.jpg
10/22/2014 11:34:28 AM - Looking up MovieName on IMDB
10/22/2014 11:34:31 AM - IMDB page was located
10/22/2014 11:34:31 AM - Config Specifies TrailersIdenticaltoTheatricalTrailers
10/22/2014 11:34:31 AM - Extracted download url (720p): http://www.hd-trailers.net/yahoo-redir.php?id=32f87591-97e0-331c-b4a9-0fe04076dfd9&resolution=720
10/22/2014 11:34:31 AM - Local directory: \Ds1511\xbmc\Trailers
10/22/2014 11:34:31 AM - Filename : Contagion (Trailer)_720p-trailer.mov
10/22/2014 11:34:31 AM - Stream successfully opened

10/22/2014 11:34:31 AM - Trailer size smaller then MinTrailerSize. Skipping ...

Coordinator
Oct 24, 2014 at 1:19 PM
I have uploaded a new release version 2.4.3. I specifically looked at the 3 trailers you listed above as causing the mintrailersize error and could not reproduce but that might not be surprising as I ma not sure I got the same download link as you did.
I have added some additional info the that error message to help troubleshoot moving forward.