Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[closed] FFMPEG: sending live recording to standard output before encoding it into a file

Graphical Environments, Managers, Multimedia & Desktop questions.
Post Reply
Message
Author
AoiHana
Posts: 34
Joined: 2016-02-13 08:22

[closed] FFMPEG: sending live recording to standard output before encoding it into a file

#1 Post by AoiHana »

Hi.
Here's my problem: the person that will be recorded needs to see himself while at it.
So it's the issue of monitoring in real timeI found that using the tee pseudomuxer seems to be the simplest and most straightforward.
The tee muxer can be used to write the same data to several outputs, such as files or streams. It can be used, for example, to stream a video over a network and save it to disk at the same time.
Perfect except it's not over a network but just over the screen.

So it gives us something like:
ffmpeg -f v4l2 -i /dev/video0 -framerate 30 -video_size 1280x720 -c:v utvideo -f tee "out.mvk|[f=nut]-" | ffplay -

But it says :

Code: Select all

Output #0, tee, to 'out.mvk|-':
Output file #0 does not contain any stream
pipe:: Invalid data found when processing input
    nan    :  0.000 fd=   0 aq=    0KB vq=    0KB sq=    0B f=0/0
If I need to use the map thing I don't know how I should do it.

Thanks for your help.
Last edited by AoiHana on 2021-09-28 18:50, edited 1 time in total.

AoiHana
Posts: 34
Joined: 2016-02-13 08:22

Re: FFMPEG: sending live recording to standard output before encoding it into a file

#2 Post by AoiHana »

Logically the closest I could up with is: ffmpeg -f v4l2 -i /dev/video2 -framerate 30 -video_size 1280x720 -c:v utvideo -f tee -map 0:v "[f=nut]essai.nut|[f=data](ffplay -)" But ffplay doesn't open.
same result with other container than data.
Please, I'm close !

CwF
Global Moderator
Global Moderator
Posts: 2638
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 41 times
Been thanked: 192 times

Re: FFMPEG: sending live recording to standard output before encoding it into a file

#3 Post by CwF »

As we mentioned the enumerated "/dev/video1" if that is stable you could treat your two requirements as separate jobs and not 'tee'. Once the interface is set, start the recording as a single process - then 'tap' for viewing with mpv from either /dev/video1 or the resulting file from the ffmpeg stream, or BOTH if you have some horsepower.

as mentioned I do a similar thing with /dev/dvb and use 'genmon's to spawn some simplistic menus to tap in various ways, all individual processes.

AoiHana
Posts: 34
Joined: 2016-02-13 08:22

Re: FFMPEG: sending live recording to standard output before encoding it into a file

#4 Post by AoiHana »

I try to run them separately with &&, ffplay doesn't open. I try with different terminals, I get "resource busy".
I don't know what else you mean by that.
Your advices are not useful, and what I ask couldn't be more simple but this program apparently is $h|T on that specific, simple issue. One shouldn't have to learn freagin' bash to do that. I found a way with mpv.

Issue closed... by trying something else, THANKS FFMPEG.

CwF
Global Moderator
Global Moderator
Posts: 2638
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 41 times
Been thanked: 192 times

Re: [closed] FFMPEG: sending live recording to standard output before encoding it into a file

#5 Post by CwF »

AoiHana wrote: 2021-09-28 18:50 Your advices are not useful
Well, sorry...
AoiHana wrote: 2021-09-28 18:50 I get "resource busy".
Yes, you didn't mention if /dev/video1 has a sub directory? I wouldn't know. If some directory is created , a 'front end', then there is where to tap it. /dev/video1 would control(hog) the resource. Some enumerated fe would allow multiple taps.

User avatar
sunrat
Administrator
Administrator
Posts: 6412
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 116 times
Been thanked: 462 times

Re: FFMPEG: sending live recording to standard output before encoding it into a file

#6 Post by sunrat »

AoiHana wrote: 2021-09-28 18:50Your advices are not useful, and what I ask couldn't be more simple but this program apparently is $h|T on that specific, simple issue. One shouldn't have to learn freagin' bash to do that. I found a way with mpv.

Issue closed... by trying something else, THANKS FFMPEG.
Sorry you were unable to get ffmpeg working how you want, but it's not acceptable to rant against it like that.
It could be helpful for someone else trying to enable the same workflow if you detail the way you found to do it in mpv.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

Post Reply