Autor Beitrag
Chrissyx
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 26

Win 98SE, Win XP
Delphi 2005
BeitragVerfasst: Do 06.05.04 14:58 
Hi zusammen,

ich hab eine .res Datei mit einem .wmv Video erstellt. (Video ist nicht gross, nur ca. 50 Sek. und 3MB)
Wie kann ich jetzt diese Video mit TMediaPlayer aus der resource abspielen? Bei Sounds hab ich das immer mit
ausblenden Delphi-Quelltext
1:
PlaySound ('sound', hInstance, SND_SYNC + SND_RESOURCE);					

gemacht. Bei dem Video hab ich mich erstmal damit beholfen, das Video per TResourceStream und SaveToFile ins Windows Temp Verzeichnis zu speichern, es dann mit
ausblenden Delphi-Quelltext
1:
2:
3:
MediaPlayer1.FileName := 'C:\WINDOWS\TEMP\temp.wmv';
MediaPlyer1.Open;
MediaPlayer1.Play;

abgespielt und danach dann per erase(F); wieder gelöscht.
Ist alles etwas umständlich - kann man das Video nicht auch so direkt à la PlaySound (); direkt aus der .res abspielen?
Danke im vorraus! :)
Chrissyx Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 26

Win 98SE, Win XP
Delphi 2005
BeitragVerfasst: Fr 07.05.04 00:40 
So ein Mist: Ich hab mal unter Win XP getestet und da ging gar nichts mehr: Das speichern wohl schon, aber abspielen geht nicht. Man kann das Video hören, aber nicht sehen! Weiss jemand, woran das liegt? :?:
iGoA
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 103

Alle Win´s
D5 Prof
BeitragVerfasst: Fr 07.05.04 09:55 
Das liegt wohl am fehlenden Video-Codec auf Deinem XP-System.

_________________
"Diner for One" objektorientiert:
"The same method as last year, Ms. Sophie?" (was für´n Schwachsinn)
Chrissyx Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 26

Win 98SE, Win XP
Delphi 2005
BeitragVerfasst: Fr 07.05.04 14:06 
Hmm, jo, das könnte sogar hinkommen. :idea: Gibt es eine Möglichkeit, dass per Delphi zu überprüfen?

Und wenn jemand zum eigentlichem Problem eine Lösung hat, bitte posten! Danke! :)
Chrissyx Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 26

Win 98SE, Win XP
Delphi 2005
BeitragVerfasst: So 09.05.04 14:52 
Weiss keiner Rat? :(
Chrissyx Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 26

Win 98SE, Win XP
Delphi 2005
BeitragVerfasst: Di 11.05.04 17:56 
*thread-nach-oben-schieb*
Chrissyx Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 26

Win 98SE, Win XP
Delphi 2005
BeitragVerfasst: Mi 12.05.04 21:26 
Och männo, kann keiner helfen? :cry:
Phobeus
ontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 1280

Linux (FC6), WinXP Pro (Box)
D6 Pers, D7 Pro, FPC 2.x
BeitragVerfasst: Mi 12.05.04 22:25 
Abgesehen davon wird ein sinnloses Pushen des Posts sicherlich nicht dazu führen, dass die Bereitschaft wächst sich dem Problem zu widmen...
evtl. Überprüfung ob entsprechende DLLs des Codecs im Suchpfad liegen?

_________________
"Menschen sterben nicht wenn man sie zu Grabe trägt, sondern wenn sie ihre Träume verlieren..."
Chrissyx Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 26

Win 98SE, Win XP
Delphi 2005
BeitragVerfasst: Fr 14.05.04 23:55 
Jetzt müsste man nur noch wissen, welche DLLs. Naja, das krieg ich schon raus. Aber mir geht's eher um das eigentlich Problem:

Chrissyx hat folgendes geschrieben:
Hi zusammen,

ich hab eine .res Datei mit einem .wmv Video erstellt. (Video ist nicht gross, nur ca. 50 Sek. und 3MB)
Wie kann ich jetzt diese Video mit TMediaPlayer aus der resource abspielen? Bei Sounds hab ich das immer mit
ausblenden Delphi-Quelltext
1:
PlaySound ('sound', hInstance, SND_SYNC + SND_RESOURCE);					

gemacht. Bei dem Video hab ich mich erstmal damit beholfen, das Video per TResourceStream und SaveToFile ins Windows Temp Verzeichnis zu speichern, es dann mit
ausblenden Delphi-Quelltext
1:
2:
3:
MediaPlayer1.FileName := 'C:\WINDOWS\TEMP\temp.wmv';
MediaPlyer1.Open;
MediaPlayer1.Play;

abgespielt und danach dann per erase(F); wieder gelöscht.
Ist alles etwas umständlich - kann man das Video nicht auch so direkt à la PlaySound (); direkt aus der .res abspielen?
Danke im vorraus! :)


Ist das generell erstmal möglich, dass direkt aus der .res abzuspielen, ohen zwischenspeichern? :?:
Chrissyx Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 26

Win 98SE, Win XP
Delphi 2005
BeitragVerfasst: Mo 17.05.04 13:57 
Sorry für's pushen, aber wenn es nicht wirklich wichtig wäre... :roll:
Cruiser23
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 191

WinXP
D7 Prof.
BeitragVerfasst: So 30.05.04 19:47 
Wenn man mit TAnimate ne ani aus ner res laden will muss man noch HInstance angeben, vieleicht hilft dir das ja

_________________
Du steckst immer in der Sch****, das einzige, was sich ändert, ist die Tiefe!
Chrissyx Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 26

Win 98SE, Win XP
Delphi 2005
BeitragVerfasst: So 30.05.04 20:12 
Ich will etwas mit TMediaPlayer wiedergeben. Dieses HInstance braucht man aber wohl so oder so - wie kann man das denn nun mit TMediaPlayer verbinden?