Recording and streaming emu frames
Moderator: Moderators
Re: Recording and streaming emu frames
what is a "scanline stride"??
What i have is all the pixels retriving a pointer to my D3d9 texture, wich acttually contain the RGB info (from botton to up) wich i actually invert the image by code.
What i have is all the pixels retriving a pointer to my D3d9 texture, wich acttually contain the RGB info (from botton to up) wich i actually invert the image by code.
ANes
Re: Recording and streaming emu frames
I assume the number of bytes between the start of one scanline and the start of the next.Anes wrote:what is a "scanline stride"??
Re: Recording and streaming emu frames
what's the problem, and how do you fix it ?Anes wrote:I solved it... thanks
Re: Recording and streaming emu frames
Yes, you are right.tepples wrote:I assume the number of bytes between the start of one scanline and the start of the next.Anes wrote:what is a "scanline stride"??
Re: Recording and streaming emu frames
No, no it was a noob thing from my part. I realized that i had the .def empty.rockcarry wrote:what's the problem, and how do you fix it ?Anes wrote:I solved it... thanks
Then what i did was to add to the .def file:
Code: Select all
EXPORTS
ffencoder_audio
ffencoder_free
ffencoder_init
ffencoder_video
Code: Select all
lib /def:ffencoder.def /OUT:ffencoder.lib
and then inside the code:
Code: Select all
extern "C" {
#include <ffencoder.h>
}
And solved it
ANes
Re: Recording and streaming emu frames
I'll be honest, i don't know how to encode the video.
If i have a ptr to all the ARGB pixels of frame how do i do?
thanks.
If i have a ptr to all the ARGB pixels of frame how do i do?
thanks.
ANes
Re: Recording and streaming emu frames
Anes wrote:I'll be honest, i don't know how to encode the video.
If i have a ptr to all the ARGB pixels of frame how do i do?
thanks.
Code: Select all
BYTE vbuf[256 * 240 * 4];
void *vdata [8] = { vbuf };
int linesize[8] = { 256 * 4 };
ffencoder_video(encoder, vdata, linesize);
-
nIghtorius
- Posts: 48
- Joined: Tue Apr 29, 2014 1:31 pm
Re: Recording and streaming emu frames
Why use arrays? (vdata[8], linesize[8])rockcarry wrote:Anes wrote:I'll be honest, i don't know how to encode the video.
If i have a ptr to all the ARGB pixels of frame how do i do?
thanks.vbuf stored the 32bit ARGB data, then vdata[0] = vbuf, linesize[0] = 256 * 4Code: Select all
BYTE vbuf[256 * 240 * 4]; void *vdata [8] = { vbuf }; int linesize[8] = { 256 * 4 }; ffencoder_video(encoder, vdata, linesize);
why not just
void* vdata
int* linesize
or
int linesize =256 * 4;
ffencoder_video (encoder, &vbuf, &linesize);
why the arrays of 8 elements?
Re: Recording and streaming emu frames
ffmpeg using many many different pixel and audio formats, some format is using multi-paneled or multi-channel data.
Re: Recording and streaming emu frames
Damn!! my video only shows green colour with some garbage. Could it be a codec problem? i mean i have "k lite codec pack" installed.rockcarry wrote:Anes wrote:I'll be honest, i don't know how to encode the video.
If i have a ptr to all the ARGB pixels of frame how do i do?
thanks.vbuf stored the 32bit ARGB data, then vdata[0] = vbuf, linesize[0] = 256 * 4Code: Select all
BYTE vbuf[256 * 240 * 4]; void *vdata [8] = { vbuf }; int linesize[8] = { 256 * 4 }; ffencoder_video(encoder, vdata, linesize);
ANes
Re: Recording and streaming emu frames
wtf!!! i tried a lot of configurations and still canno't acchive a good .mp4 file...
ANes
Re: Recording and streaming emu frames
What i fool i was.. it was "pixel format", anyway i the emu turns very slow as it encode the video. it's my emu performance thing.
ANes
Re: Recording and streaming emu frames
That's another reason for encoding in a separate process: it lets you use all cores of your multi-core CPU.
Re: Recording and streaming emu frames
Is it worth to try to encode in a different thread?
I made the following: i created a thread like this:
so at the end of the frame i set "video_record" to "1".
The emu run fast, but when i play the video runs too fast, i don't know why.
I made the following: i created a thread like this:
Code: Select all
DWORD WINAPI ThreadProc(
_In_ LPVOID lpParameter
)
{
for (;;)
{
if (video_record)
{
data[0] = pixels;
video_record = 0;
ffencoder_video(ffhandle, data, linesize);
//Sleep(1000);
}
}
}
The emu run fast, but when i play the video runs too fast, i don't know why.
ANes