[FFmpeg-user] Correct way to get preview stream with no encoding?
Jason Runta
jrunta at gmail.com
Fri Oct 11 19:37:04 CEST 2013
Not sure if this is the best way, but here's what I ended up doing:
ffmpeg -y -f dshow -threads 3 -s 640x480 -i video="Microsoft LifeCam
Cinema":audio="Desktop Microphone (Cinema - Mi" -c:v copy -an -f rawvideo
udp://localhost:1234 -f flv -c:v libx264 -tune zerolatency -preset
ultrafast -b:v 400k -pix_fmt yuv420p -c:a libmp3lame -q:a 2 -b:a 56k
-maxrate 750k "myMovie.flv"
and then viewing my video from ffplay:
ffplay -s 640x480 -pix_fmt yuyv422 -f rawvideo -i udp://localhost:1234
I'm processing everything off one ffmpeg call here instead of doing
subsequent calls to ffmpeg, and specifying to use up to 3 threads to
accomplish the raw video output (no audio) and then also encoding and
saving the file out.
Is there a better way? How about getting my stream to ffplay, is streaming
point-to-point over UDP the best option?
On Fri, Oct 11, 2013 at 10:15 AM, Dennis <mediastream at gmail.com> wrote:
> I think you do both in one shot.
> ffmpeg -i v4l -c:v libx264 -s 640x480 OUTPUT -c copy PREVIEW
>
>
> On Wed, Oct 9, 2013 at 5:35 PM, Jason Runta <jrunta at gmail.com> wrote:
>
> > I'm trying to make a program that behaves similar to FMLE where I need to
> > display a preview of the video from my webcam as well as a preview of the
> > encoded output.
> >
> > I was wondering if anyone could suggest the proper way of getting a
> preview
> > stream without any encoding being done to it.
> >
> > Do I need to make one ffmpeg call that uses -vcodec copy -acodec copy and
> > then redirect the output from that into subsequent ffmpeg calls?
> >
> > If anyone has a good idea of how to get the preview stream into a C# app
> > I'm all ears as well =) I'm pretty sure FMLE basically runs on top of
> > ffmpeg so if they're doing it, I should be able to do it...
> > _______________________________________________
> > ffmpeg-user mailing list
> > ffmpeg-user at ffmpeg.org
> > http://ffmpeg.org/mailman/listinfo/ffmpeg-user
> >
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
More information about the ffmpeg-user
mailing list