Possible to use directshow device in two ffmpeg instances?

Any other question that don't fit into the other support categorizes.
Post Reply
speaker219
Posts: 3
Joined: Sat Jun 15, 2013 7:21 am

Possible to use directshow device in two ffmpeg instances?

Post by speaker219 »

This may not be 100% ffmpeg-related (although I'm not sure whether or not there'd be a solution within ffmpeg for this) but I figure it's the best place to ask.

Basically, I am using ffmpeg to stream from a directshow device (Blackmagic Intensity card). I planned on running two ffmpeg instances, one for a "high quality" stream and one for a "low quality" stream -- forgot that the directshow device can only be opened in one ffmpeg instance.

Does anyone know of any possible solutions that would allow me to create two seperate streams from a single directshow input device? Perhaps some way to pipe the output from the card to two ffmpeg instances?

Thank you.

rogerdpack
Posts: 1878
Joined: Fri Aug 05, 2011 9:56 pm

Re: Possible to use directshow device in two ffmpeg instance

Post by rogerdpack »

maybe one ffmpeg instance to 2 outputs?
http://ffmpeg.org/trac/ffmpeg/wiki/Crea ... %20outputs

User avatar
Zeranoe
Site Admin
Posts: 704
Joined: Sat May 07, 2011 7:12 pm
Contact:

Re: Possible to use directshow device in two ffmpeg instance

Post by Zeranoe »

As far as I know it can't. Why not save the high quality output and then re-encode after the recoding has finished, into a "low quality" copy?

metalhead82
Posts: 1
Joined: Mon Jul 22, 2013 12:57 pm
Location: Germany

Re: Possible to use directshow device in two ffmpeg instance

Post by metalhead82 »

Just stumbled across this forum and created an account.
So much useful stuff in here... :)

I'm interested in this, too.
Would this be possible with a workaround?

Like Capturing to a short video, which is constantly overwritten and which could then be accesssed/transcoded by other instances of FFmpeg (similar to streaming but with MUCH HIGHER bandwidth)

I need to be able to do this because I want to do some 24/7 capturing - resulting in clips of 1hour length without dropping up to 2 seconds of material until the encoder is finished and then restarted.

Another idea would be to use segmentation. But I would have the same problem once every day.
(There has to be a folder for each day's segments)

I used AmeRecTV but it freezes the output stream like every 3 hours or so... unfortunately not usable for 24/7 capturing...

Hope you understand what I mean...

Greetz.

speaker219
Posts: 3
Joined: Sat Jun 15, 2013 7:21 am

Re: Possible to use directshow device in two ffmpeg instance

Post by speaker219 »

Zeranoe wrote:As far as I know it can't. Why not save the high quality output and then re-encode after the recoding has finished, into a "low quality" copy?
I'm encoding from a DirectShow source for a live stream (to an RTMP server) -- so this wouldn't work unfortunately.

I suppose I could have ffmpeg encode to a file, then run one instances that uses -vcodec copy -acodec copy and sends to the server, and then another instance to re-encode and SD copy, but I was wondering if there was a way to do this with a single instance.

User avatar
Zeranoe
Site Admin
Posts: 704
Joined: Sat May 07, 2011 7:12 pm
Contact:

Re: Possible to use directshow device in two ffmpeg instance

Post by Zeranoe »

Have you tried the two output methods that Roger posted? http://ffmpeg.org/trac/ffmpeg/wiki/Crea ... %20outputs

Post Reply