473,473 Members | 1,900 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Thumbnail from Video file

mc
My Problem:
I need some C# code which creates a thumbnail from a video. The only
catch is that I need to run it on a shared host (web server) which will
only support assemblies that have the Allow Partially Trusted Callers
(APTCA) attribute.

Solution background:
I have successfully wrapped the qedit.dll using the tlbimp.exe
application, this enables me to create a strong named assembly however
there appears to be no way of specifying the APTCA attribute.

The Detail:
I have implemented a HttpHandler which when the suffix ".thumb" is
appended to an image returns a Thumbnail of that image to the browser, I
have extended this to include wmv files, The Image thumbnails run ok at
either trust level however as the assembly I have used does not support
the APTCA attribute attempts to create a thumbnail for a video cause the
error "System.Security.SecurityException: That assembly does not allow
partially trusted callers."

Question:
Does anyone have any solutions to add the APTCA attribute to my interop
assembly, or other assembly which may fit the bill?

I'm on a shared host so I'm not able to make any reconfigurations of the
live server.

TIA
MC
Nov 27 '06 #1
3 12756
Hi,

I'm afraid that there is a known limitation on this. We cannot add
attributes to wrapped assemblies generated with tlbimp.exe. In other word,
you shouldn't be able to run it within ASP.net if you do not modify the web
application's trust level.

You can also check manually generate the thumbnail through the
IMediaDet::WriteBitmapBits API. However I assume this may also require the
ASP.net application executing under full trust to make the call be
successful. If you would give it a try, please refer to the following
chapters in the SDK:

IMediaDet Interface
http://msdn.microsoft.com/library/de...us/directshow/
htm/imediadetinterface.asp

Grabbing a Poster Frame
http://msdn2.microsoft.com/en-us/library/ms783752.aspx

Thanks.

Sincerely,

WenJun Zhang

Microsoft Online Community Support

==================================================

Get notification to my posts through email? Please refer to:
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at:

http://msdn.microsoft.com/subscripti...t/default.aspx.

==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 28 '06 #2
mc
As I understand it I was already using the "IMediaDet::WriteBitmapBits"
interface, I had wrapped the qedit.dll with tlbimp to get it strongly
named.

Is there any other way to have refrenced this API (using string naming
and the APTCA) without using tlbimp?

are there any Third party components which could help me perform this step?
WenJun Zhang[msft] wrote:
Hi,

I'm afraid that there is a known limitation on this. We cannot add
attributes to wrapped assemblies generated with tlbimp.exe. In other word,
you shouldn't be able to run it within ASP.net if you do not modify the web
application's trust level.

You can also check manually generate the thumbnail through the
IMediaDet::WriteBitmapBits API. However I assume this may also require the
ASP.net application executing under full trust to make the call be
successful. If you would give it a try, please refer to the following
chapters in the SDK:

IMediaDet Interface
http://msdn.microsoft.com/library/de...us/directshow/
htm/imediadetinterface.asp

Grabbing a Poster Frame
http://msdn2.microsoft.com/en-us/library/ms783752.aspx

Thanks.

Sincerely,

WenJun Zhang

Microsoft Online Community Support

==================================================

Get notification to my posts through email? Please refer to:
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at:

http://msdn.microsoft.com/subscripti...t/default.aspx.

==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
Dec 4 '06 #3
Hi,

Sure, you can manually create the wrapper dll and add attributes to it
without using tlbimp. Please refer to the following MSDN articles:

How to: Create Primary Interop Assemblies Manually
http://msdn2.microsoft.com/en-gb/library/1w557csx.aspx

How to: Create Wrappers Manually
http://msdn2.microsoft.com/en-gb/library/x8fbsf00.aspx

Hope the info helps. If you meet any problem in the process, you can post a
new thread to our interop newsgroup for detailed assistance:

microsoft.public.dotnet.framework.interop

Have a good day.

Sincerely,

WenJun Zhang

Microsoft Online Community Support

==================================================

Get notification to my posts through email? Please refer to:
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at:

http://msdn.microsoft.com/subscripti...t/default.aspx.

==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Dec 6 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Davidb | last post by:
Hello, I am looking for a PHP script to generate thumbnail from a movie file (.AVI, ..MOV, .MPEG, .MPG, .WMV, etc...). Ideally, the file will be "remote" (hosted on another web server than the...
0
by: baroque Chou | last post by:
I want to get thumbnail of video clips (wmv, rm ,etc.) to give the user an idea about what it is before he or she start to enjoy the video. is there some property of video object that get the first...
1
by: Xah Lee | last post by:
The following is a program to generate thumbnail images for a website. Useful, if you want to do that. It is used to generate the thumbnails for my “Banners, Damsels, and Mores” project...
8
by: barb | last post by:
So that the world at large benefits from our efforts, here is one fully documented way to use Windows Irfanview freeware to create thumbnail web galleries (http://www.irfanview.com). STEP 1:...
7
by: cmk128 | last post by:
Hi I have many video on my server, wmv, mpeg, avi, etc... I want to use php to catpure the first frame of the video into a png/jpeg/mpg, how to? thanks from Peter (cmk128@hotmail.com)
0
by: vssp | last post by:
Hai freinds I need get the thumbnile using uploaded video file. How to get the thumbnail when i get the uploaded video file ? Please help me
2
by: Mahesh K. Anajni | last post by:
hi i am working on blog where member can upload his/her video. when member's viewed his blog it should show the thumbnail of video uploaded by him. so the problem is how to create a thumbnail...
1
by: Mahesh K. Anajni | last post by:
hi i am working on blog where member can upload his/her video. when member's viewed his blog it should show the thumbnail of video uploaded by him. so the problem is how to create a thumbnail...
0
by: gowthamkg | last post by:
Hi, I'm developing an video based site, i want to get an thumbnail for videos for creating video gallery,but without ffmpeg,since i dont get any shared hosting which allow ffmpeg.Please ...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.