Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Streaming Problem


This question is answered.


Permlink Replies: 13 - Last Post: Jan 11, 2017 10:36 AM Last Post By: roca robin Threads: [ Previous | Next ]
roca robin

Posts: 140
Registered: 9/10/06
Streaming Problem  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 10, 2017 12:51 PM
after testing a couple of times I finally got it by the help of Remy Lebeau (TeamB)
His suggestions are good using Resource Protocol

The problem is when I Play Movie from Stream(LARGE movie from my Resource File(990_MB(.AVI file))), so I got huge file .EXE size(999_MB) too, but no error!

It does not PLAY, it only prompting "opening media....." but I doesn't PLAY

I test it with small file Videos, it has no Problem with any format(avi,mp4,mkv,etc.,)

Where could be the possible problem WHY playing in HUGE video files doesn't Play? Protocol Problem?
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: Streaming Problem [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 10, 2017 1:24 PM   in response to: roca robin in response to: roca robin
roca wrote:

The problem is when I Play Movie from Stream(LARGE movie from
my Resource File(990_MB(.AVI file))), so I got huge file .EXE
size(999_MB) too, but no error!

You really should not store large resources in an EXE directly. As you noticed,
it affects the EXE's size, and that affects the EXE's performance. Large
data belongs in a separate file. Why can't you save the video to an AVI
file that is deployed alongside your app?

Where could be the possible problem WHY playing in HUGE video
files doesn't Play?

It are likely running out of available memory trying to load such a large
EXE resource.

--
Remy Lebeau (TeamB)
roca robin

Posts: 140
Registered: 9/10/06
Re: Streaming Problem [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 10, 2017 1:43 PM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
Remy Lebeau (TeamB) wrote:
roca wrote:

The problem is when I Play Movie from Stream(LARGE movie from
my Resource File(990_MB(.AVI file))), so I got huge file .EXE
size(999_MB) too, but no error!

You really should not store large resources in an EXE directly. As you noticed,
it affects the EXE's size, and that affects the EXE's performance. Large
data belongs in a separate file. Why can't you save the video to an AVI
file that is deployed alongside your app?

Where could be the possible problem WHY playing in HUGE video
files doesn't Play?

It are likely running out of available memory trying to load such a large
EXE resource.

--
Remy Lebeau (TeamB)
Remy Lebeau (TeamB) wrote:
roca wrote:

The problem is when I Play Movie from Stream(LARGE movie from
my Resource File(990_MB(.AVI file))), so I got huge file .EXE
size(999_MB) too, but no error!

You really should not store large resources in an EXE directly. As you noticed,
it affects the EXE's size, and that affects the EXE's performance. Large
data belongs in a separate file. Why can't you save the video to an AVI
file that is deployed alongside your app?

Where could be the possible problem WHY playing in HUGE video
files doesn't Play?

It are likely running out of available memory trying to load such a large
EXE resource.

--
Remy Lebeau (TeamB)

yes, I understand why I should not store a large file in a resource file,
but I need too.

are like running out of available memory?
but I have 8gb ram installed

Ok, I'll trying to find another solution,
thank you
roca robin

Posts: 140
Registered: 9/10/06
Re: Streaming Problem [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 10, 2017 1:47 PM   in response to: roca robin in response to: roca robin
Ok,
I tried a resource Hacker, then it plays the large avi, confusing...
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: Streaming Problem [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 10, 2017 2:03 PM   in response to: roca robin in response to: roca robin
roca wrote:

yes, I understand why I should not store a large file in a
resource file, but I need too.

No, you don't. And if you did, putting the resource in the EXE itself
is a bad idea. At least put it in a resource DLL instead, and then
the EXE can load that DLL if/when needed.

are like running out of available memory?
but I have 8gb ram installed

Is your app 32bit or 64bit?

--
Remy Lebeau (TeamB)
roca robin

Posts: 140
Registered: 9/10/06
Re: Streaming Problem [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 10, 2017 2:29 PM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
Remy Lebeau (TeamB) wrote:
roca wrote:

yes, I understand why I should not store a large file in a
resource file, but I need too.

No, you don't. And if you did, putting the resource in the EXE itself
is a bad idea. At least put it in a resource DLL instead, and then
the EXE can load that DLL if/when needed.

are like running out of available memory?
but I have 8gb ram installed

Is your app 32bit or 64bit?

--
Remy Lebeau (TeamB)
Remy Lebeau (TeamB) wrote:
roca wrote:

yes, I understand why I should not store a large file in a
resource file, but I need too.

No, you don't. And if you did, putting the resource in the EXE itself
is a bad idea. At least put it in a resource DLL instead, and then
the EXE can load that DLL if/when needed.

are like running out of available memory?
but I have 8gb ram installed

Is your app 32bit or 64bit?

--
Remy Lebeau (TeamB)

I'm using 32Bit, Ok I'm going to try 64Bit after this!

you want me to save the resource file(huge video) to another file(dll) external.
then I'll embed dll to the exe, trowing it out then call the resource file under dll resources.

good idea,
thank you
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: Streaming Problem [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 10, 2017 3:02 PM   in response to: roca robin in response to: roca robin
roca wrote:

I'm using 32Bit

Then your app can only access 2GB of memory by default (3-4GB with the /LARGEADDRESSWARE
flag enabled on the EXE and the /3gb flag enabled on Windows itself, but you are still
effectively limited to 2GB unless you actually write LAA-capable code and use a LAA-capable
memory manager).

Your AVI is almost 1GB, and Windows also reserves a chunk of your app's address space.
So you likely don't have enough memory to load your giant AVI in a 32bit process.

On the other hand, what are you actually using to play the AVI that requires the entire
AVI to be loaded in memory at one time, instead of loading it in small manageable
chunks?

you want me to save the resource file(huge video) to another
file(dll) external.

If you store it in a file, it may as well be stored as a standard AVI file. There is no
reason it should be in a resource at all.

then I'll embed dll to the exe

I did not say anything about embedding the DLL in the EXE. Do you understand
how DLLs work in general? Do you understand how resource DLLs work?

trowing it out

Throw out the AVI resource in the EXE file itself, yes.

then call the resource file under dll resources.

Load the AVI from the DLL resources, yes.

--
Remy Lebeau (TeamB)
roca robin

Posts: 140
Registered: 9/10/06
Re: Streaming Problem [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 10, 2017 3:14 PM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
Remy Lebeau (TeamB) wrote:
roca wrote:

I'm using 32Bit

Then your app can only access 2GB of memory by default (3-4GB with the /LARGEADDRESSWARE
flag enabled on the EXE and the /3gb flag enabled on Windows itself, but you are still
effectively limited to 2GB unless you actually write LAA-capable code and use a LAA-capable
memory manager).

Your AVI is almost 1GB, and Windows also reserves a chunk of your app's address space.
So you likely don't have enough memory to load your giant AVI in a 32bit process.

On the other hand, what are you actually using to play the AVI that requires the entire
AVI to be loaded in memory at one time, instead of loading it in small manageable
chunks?

you want me to save the resource file(huge video) to another
file(dll) external.

If you store it in a file, it may as well be stored as a standard AVI file. There is no
reason it should be in a resource at all.

then I'll embed dll to the exe

I did not say anything about embedding the DLL in the EXE. Do you understand
how DLLs work in general? Do you understand how resource DLLs work?

trowing it out

Throw out the AVI resource in the EXE file itself, yes.

then call the resource file under dll resources.

Load the AVI from the DLL resources, yes.

--
Remy Lebeau (TeamB)
Remy Lebeau (TeamB) wrote:
roca wrote:

I'm using 32Bit

Then your app can only access 2GB of memory by default (3-4GB with the /LARGEADDRESSWARE
flag enabled on the EXE and the /3gb flag enabled on Windows itself, but you are still
effectively limited to 2GB unless you actually write LAA-capable code and use a LAA-capable
memory manager).

Your AVI is almost 1GB, and Windows also reserves a chunk of your app's address space.
So you likely don't have enough memory to load your giant AVI in a 32bit process.

On the other hand, what are you actually using to play the AVI that requires the entire
AVI to be loaded in memory at one time, instead of loading it in small manageable
chunks?

you want me to save the resource file(huge video) to another
file(dll) external.

If you store it in a file, it may as well be stored as a standard AVI file. There is no
reason it should be in a resource at all.

then I'll embed dll to the exe

I did not say anything about embedding the DLL in the EXE. Do you understand
how DLLs work in general? Do you understand how resource DLLs work?

trowing it out

Throw out the AVI resource in the EXE file itself, yes.

then call the resource file under dll resources.

Load the AVI from the DLL resources, yes.

--
Remy Lebeau (TeamB)

Ok,
I put the resource files in external file, in another exe(b.exe).
i tried to call the resource file from (b.exe)

still the same, opening media......

I'll try to answer you back...got to go, on hurry
thank you
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: Streaming Problem [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 10, 2017 3:26 PM   in response to: roca robin in response to: roca robin
roca wrote:

I put the resource files in external file, in another exe(b.exe).

<sigh> Clearly you did not read what I said. Moving it to another EXE is
just as bad as leaving it in the original EXE. It does not belong in an
EXE **AT ALL**! Why do you insist on putting it in an EXE file? What is
your actual requirement?

i tried to call the resource file from (b.exe)
still the same, opening media......

Of course, for the same reasons that it doesn't work in the original EXE.

--
Remy Lebeau (TeamB)
roca robin

Posts: 140
Registered: 9/10/06
Re: Streaming Problem [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 10, 2017 5:45 PM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
Remy Lebeau (TeamB) wrote:
Of course, for the same reasons that it doesn't work in the original EXE.

Ok, I don't want to exposed the original video or movie file, that's why I want to keep it under the EXE

and I only want a standalone EXE,

in-case if would only work with external file(a encrypted file video), then I would do that,

BUT it would take many disk access, read(from resource exe) then write(to disk(encrypted)), then read again(decrypting), then PLAY.
Take so much time with large Files.

Do you have any suggestion or idea?

ps.
I compiled it under DelphiXE6 64Bit with 850mb, it message RTLINK out of memory,
so I test with 200mb file, then it was Ok, BUT it did not show(opening media... then nothing)

I compiled it under DelphiXE Settle 32Bit with 200mb file, the video PLAY was fine, only less than or equal to 200mb(+or-) will PLAY.

so, with 64bit is much worst.
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: Streaming Problem [Edit] [Edit]
Correct
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 10, 2017 6:54 PM   in response to: roca robin in response to: roca robin
roca wrote:

Ok, I don't want to exposed the original video or movie file,
that's why I want to keep it under the EXE

Do you realize how futile that exercise actually is? If anyone wants to
access your video, they will still be able to do so. Resource viewers/editors
are readible available (you yourself used one). You are making your EXE
extremely bloated and memory-inefficient for no real benefit whatsoever.

I only want a standalone EXE,

Why? And why would you ever want a 1GB EXE file?

in-case if would only work with external file (a encrypted file video),
then I would do that, BUT it would take many disk access, read
(from resource exe) then write (to disk(encrypted)), then read again
(decrypting), then PLAY.

And you think storing the video in a resource within the EXE is any better?
It is not. And besides, if you are using a media player/framework that
supports working with memory buffers, you can skip half of that work, you
would only need to read from disk, decrypt, and play.

Take so much time with large Files.

It is not any faster or easier with resources.

ps. I compiled it under DelphiXE6 64Bit with 850mb, it message RTLINK
out of memory, so I test with 200mb file, then it was Ok, BUT it did
not show(opening media... then nothing)

Still too big for a resource. Resources should be SMALL. LARGE data should
be outside of the EXE.

--
Remy Lebeau (TeamB)
roca robin

Posts: 140
Registered: 9/10/06
Re: Streaming Problem [Edit] [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 11, 2017 10:13 AM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
Actually our project is to copy this software:
http://www.password-protect-video.com/

we are still figuring it out why the video file is not stored in the resource file and WHY it still can PLAY a large file size of directly, and the video is encrypted.

what protocol they are using? or what are the procedure's they follow?
roca robin

Posts: 140
Registered: 9/10/06
Re: Streaming Problem [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 10, 2017 7:16 PM   in response to: roca robin in response to: roca robin
Ok, I understand your expertise. I will TRY to follow your suggestions......
again! thank you so much!
roca robin

Posts: 140
Registered: 9/10/06
Re: Streaming Problem  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 10, 2017 2:31 PM   in response to: roca robin in response to: roca robin
glad to be back here.

ps.
resource protocol doesn't support 64bit system.

Edited by: roca robin on Jan 10, 2017 11:37 PM
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02