logo

Live Production Software Forums


Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
purposemedia  
#1 Posted : Friday, October 10, 2014 7:03:46 AM(UTC)
purposemedia

Rank: Newbie

Groups: Registered
Joined: 10/10/2014(UTC)
Posts: 1
Location: Sweden

Was thanked: 3 time(s) in 1 post(s)
Hi!

Thought I'd share a solution to all those who would like to record with FFmpeg.
Since vMix has an option of outputting through a directshow filter (vMix/vMix Audio) we can use that with FFmpeg.

Enable "External" in vMix and make a batch file with notepad or another text editor and copy-paste the code below. A batch file is just a text file with the extension changed to .bat.

We can use the ffmpeg.exe provided by vMix. This version of FFmpeg is rather stripped thought so if you want more options I'd suggest you download one of the Zeranoe builds. Choose a static version.

Code:
"C:\Program Files (x86)\vMix\streaming\FFMPEG" -re -rtbufsize 1024M -framerate 25 -f dshow -video_size 1280x720 -channels 2 -i video="vMix Video":audio="vMix Audio" -c:v libx264 -pix_fmt yuv420p -g 50 -crf 20 -profile:v high -preset:v veryfast -tune film -c:a libfaac -b:a 256k -f mp4 "D:\recordedfile.mp4"


You can adjust the quality by changing the -crf and -preset:v value.
-crf sets a certain quality level and -preset:v the efficiency of the encoding.
For example, -preset:v medium and -crf 20 will result in a smaller file with higher cpu usage than -preset:v veryfast and -crf 20.

I would recommend a -crf value of between 17-22.
For -preset you can choose between ultrafast, superfast, veryfast, faster, fast, medium, slow, slower and veryslow.

If you want a set bitrate you can change -crf 20 to, for example, -b:v 8000k.

You must also make sure "-framrate 25" and "-video_size 1280x720" match the output settings in vMix.

Run the batch file you created by double clicking it. When you want to stop recording you press "q" with the batch window selected.

I you run into a lot of buffer underrun messages in ffmpeg you can play with the -rtbufsize value.

Sven
thanks 3 users thanked purposemedia for this useful post.
doggy on 10/10/2014(UTC), Ittaidv on 11/13/2014(UTC), studiodelta on 9/16/2021(UTC)
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.