Pipe 如何更改vlc';输入到fifo
我有一个程序可以打开video.m4v并将其发送到fifo。 我想用vlc通过fifo播放这个视频,但我不能,当然了 我是vlc的新手 这是我打开video.m4v并将其发送到fifo的程序:Pipe 如何更改vlc';输入到fifo,pipe,pipeline,vlc,fifo,mkfifo,Pipe,Pipeline,Vlc,Fifo,Mkfifo,我有一个程序可以打开video.m4v并将其发送到fifo。 我想用vlc通过fifo播放这个视频,但我不能,当然了 我是vlc的新手 这是我打开video.m4v并将其发送到fifo的程序: int main(){ char massage[2048]; char testPipe[256]; FILE* sourcefile = fopen("safe.mp4", "rb"); sprintf(testPipe, "/home/milliam/pipe");
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;
}
我测试了上述程序,并了解其工作正常(即打开fifo并正确写入数据)
现在我想用vlc打开管道:
~$ vlc fd://pipe
这不起作用,并给我以下错误:
core debug: no access modules matched
core error: open of `fd://pipe' failed
但当我尝试时:
ffmpeg -i pipe -f asf - | vlc -
然后vlc正常播放视频
如何使vlc在不使用ffmpeg的情况下通过管道播放视频
*我想我需要配置vlm.conf,但我甚至不知道它在哪里以及如何配置?
mkfifo/tmp/管道p
vlc/tmp/管道
cat/tmp/video.avi>/tmp/pipe
在这里工作很有魅力谢谢您的回复。我测试了它,工作正常,但它需要按下播放键在vlc太。