I have a program that open a video.m4v and send it to a fifo. I want to play this video through fifo using vlc but i can't and of course I'm new to vlc
this is my program which open the video.m4v and send it to a fifo:
int main(){
char massage[2048];
char testPipe[256];
FILE* sourcefile = fopen("safe.mp4", "rb");
sprintf(testPipe, "/home/milliam/pipe");
mkfifo( testPipe, 0777);
int saveErr = 0;
FILE* des = fopen(testPipe,"wb");
saveErr = errno;
printf(" %s\n",strerror(saveErr));
int numOfByte = 1;
int result =0;
while(numOfByte){
numOfByte = fread(massage,1, 2000,sourcefile);
result = fwrite(massage, 1, 2000, des);
memset(massage,0,2047);
}
return 0;
}
i tested the above program and understood it works fine(i.e. open a fifo and write data to it correctly)
Now i want to open the pipe using vlc:
~$ vlc fd://pipe
this doesn't work and give me below error:
core debug: no access modules matched
core error: open of `fd://pipe' failed
but when i try:
ffmpeg -i pipe -f asf - | vlc -
then vlc play video normally.
how i can make vlc to play video through pipe without using ffmpeg?
*I think i need to config vlm.conf but I even didn't know where is it and how to config it?