Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

Can't open output file

mgarrettcallcopy_com
291 Views
Hello. I downloaded the 30 day evaluation to see if IPP might be a possible solution for my companies needs. I was using libavcodec but for silverlight we have to encode in h.264 so the mp4 video encoder I wrote no longer is valid, and compiling ffmpeg/libavcodec with h.264 encoding capabilities would make it GPL, which I can't do. Thus I turned my attention here.

Anyways, to get to my problem I stepped through the example code and tried to extract the basics to get a more simple program (I know I will always be encoding in h.264). When I get to the point of opening an output file though fails. Here is the small test project:

#include
#include
#include
#include
#include
#include
#include
#include


using namespace UMC;

int _tmain(int argc, _TCHAR* argv[])
{
Ipp64f FrameRate = 30;
Ipp32s numThreads = 1;
Ipp32s BitRate = 5000000;

BaseCodec *pCodec;
VideoEncoderParams *pEncoderParams;

IppStatus status = ippStaticInit();

Ipp32s mWidth= 640;
Ipp32s mHeight = 480;
if (status < ippStsNoErr)
{
printf("Error: Can't initialize ipp libs!");
return 5;
}

const IppLibraryVersion *libver = ippGetLibVersion();


pEncoderParams = new VideoEncoderParams;
pEncoderParams->info.clip_info.width = mWidth;
pEncoderParams->info.clip_info.height = mHeight;
pEncoderParams->info.framerate = FrameRate;
pEncoderParams->info.bitrate = BitRate;
pEncoderParams->numThreads = numThreads;
const vm_char *DstFileName = "c:\\TestIt2.mp4";
vm_file *dstFile = vm_file_open(DstFileName, VM_STRING("wb"));
if (NULL == dstFile)
{
sprintf("Error: Can't open output file '%s'\n", DstFileName);
return 9;
}
}




Any help is greatly appreciate, thanks.

0 Kudos
2 Replies
mgarrettcallcopy_com
291 Views
Hello. I downloaded the 30 day evaluation to see if IPP might be a possible solution for my companies needs. I was using libavcodec but for silverlight we have to encode in h.264 so the mp4 video encoder I wrote no longer is valid, and compiling ffmpeg/libavcodec with h.264 encoding capabilities would make it GPL, which I can't do. Thus I turned my attention here.

Anyways, to get to my problem I stepped through the example code and tried to extract the basics to get a more simple program (I know I will always be encoding in h.264). When I get to the point of opening an output file though fails. Here is the small test project:

#include
#include
#include
#include
#include
#include
#include
#include


using namespace UMC;

int _tmain(int argc, _TCHAR* argv[])
{
Ipp64f FrameRate = 30;
Ipp32s numThreads = 1;
Ipp32s BitRate = 5000000;

BaseCodec *pCodec;
VideoEncoderParams *pEncoderParams;

IppStatus status = ippStaticInit();

Ipp32s mWidth= 640;
Ipp32s mHeight = 480;
if (status < ippStsNoErr)
{
printf("Error: Can't initialize ipp libs!");
return 5;
}

const IppLibraryVersion *libver = ippGetLibVersion();


pEncoderParams = new VideoEncoderParams;
pEncoderParams->info.clip_info.width = mWidth;
pEncoderParams->info.clip_info.height = mHeight;
pEncoderParams->info.framerate = FrameRate;
pEncoderParams->info.bitrate = BitRate;
pEncoderParams->numThreads = numThreads;
const vm_char *DstFileName = "c:\TestIt2.mp4";
vm_file *dstFile = vm_file_open(DstFileName, VM_STRING("wb"));
if (NULL == dstFile)
{
sprintf("Error: Can't open output file '%s'n", DstFileName);
return 9;
}
}




Any help is greatly appreciate, thanks.



Actually, I figured this out. When I changed the character encoding from Multi-byte to None it was fixed.
0 Kudos
Vladimir_Dudnik
Employee
291 Views
Thanks for letting us know and glad to see you find solution. Thanks again for your interest to Intel IPP, hope you'll find it useful for your company needs.

Regards,
Vladimir
0 Kudos
Reply