You are not logged in.
I've been doing much research on this, and to be honest A/V editing is not my strong suit. I use a script I wrote two days ago to initiate both screen recording with ffmpeg and compiling the resulting mkv file with ffmpeg as well. The entire script can be seen here:
#!/bin/bash
#Create function to exit program
function quite {
if [ $ANSWER3 = "y" ]; then
exit
else
exit
fi
}
#Create function to start ffmpeg record
function record {
if [ $ANSWER = "y" ]; then
ffmpeg -f alsa -ac 2 -i pulse -f x11grab -r 30 -s 1366x768 -i :0.0 -acodec aac -vcodec libx264 -preset ultrafast -strict -2 -crf 0 -threads 0 $ORIGINALNAME
else
if [ $ANSWER = "n" ]; then
echo "Would you like to convert an existing input file? (y/n)"
read ANSWER4
if [ $ANSWER4 = "y" ]; then
ffmpeg -i $ORIGINALNAME -vcodec libx264 -acodec aac -ab 128k -crf 22 -strict -2 -threads 0 $OUTPUTFILE
echo "The program will now exit"
read
exit
else
exit
fi
else
exit
fi
fi
}
#Function to convert the recorded video
function convert {
if [ $ANSWER2 = "y" ]; then
ffmpeg -i $ORIGINALNAME -vcodec libx264 -acodec aac -ab 128k -crf 22 -strict -2 -threads 0 $OUTPUTFILE
else
exit
fi
}
#Change to Screen Record directory in My Videos
cd ~/My\ Videos/Screen\ Record/
#Clear screen, and ask for input on what to name the origional file and the converted file
clear
echo "Please, enter the name of your file followed by .mkv"
read ORIGINALNAME
echo "You're files name is $ORIGINALNAME!"
echo "Please, enter name of the output file followed by .mp4"
read OUTPUTFILE
echo "You're final file is $OUTPUTFILE!"
clear
#Prompt for continuing with recording
echo "Would you like to continue with screen recording?[y/n]"
read ANSWER
clear
#Run the record function
record
#Prompt for converting the created video
echo "Would you like to convert the file now?"
read ANSWER2
clear
#Run convert function
convert
#Prompt to close command
echo "Operation finished, all done."
echo "The program will now exit."
read ANSWER3For simplicities sake, and because I don't think there's a real problem with my script but something else, here's the two ffmpeg scripts from the above script:
recorder
ffmpeg -f alsa -ac 2 -i pulse -f x11grab -r 30 -s 1366x768 -i :0.0 -acodec aac -vcodec libx264 -preset ultrafast -strict -2 -crf 0 -threads 0 $ORIGINALNAMEcompiler
ffmpeg -i $ORIGINALNAME -vcodec libx264 -acodec aac -ab 128k -crf 22 -strict -2 -threads 0 $OUTPUTFILEAnyway, I have pavucontrol used to set the recording input after I've started recording. I want to be able to record the sound of my voice on my usb headset (which works fine) and be able to hear the sound of music or a youtube video I'm also playing during the recording. I've seen the loopback mixer from Alsamixer gui and the input, output, and record tabs in pulseaudio mixer. To be honest, after researching all this stuff in ffmpeg (which is a ocmplicated program) and whatever amix, dmix, and some other programs I'm not sure what are, I have no idea where to go anymore. I'd continue researching, but I'm only getting more confused the further I go. I'm extremely willing to learn and will follow any instructions you give to help me out. I don't just want to do this one task, like how I learned enough to write a script file, I want to be able to tweak ffmpeg to suit my needs for any purpose it can be used for. This is my first step to being able to do that. Thanks ahead of time for your help.
Offline
here's a fairly easy to follow set of instructions which use pactl and pavucontrol, so it should apply to ffmpeg without problems
http://www.maartenbaert.be/simplescreen … ame-audio/
Offline
ok, I tried to use every method on that particular link (the easy and hard pulseaudio things did record the main audio, but not the mic, and the jack method has completely broken my audio and I'm in the process of fixing my sound now. Now I don't get any audio with or without headphones. Needless to say, that method didn't work with my system, but thank you for responding so quickly.
Offline
I did some tweaking and was able to get both recording (using simpleScreenRecorder) working and the audio in my system back online. I'm still working on modifying my ffmpeg script to record appropriatly and from both audio sources at the same time.
EDIT: Going to be reading this in the meantime and hopefully find some answers, though what I want to do is a bit past basics.
Last edited by Broly Ultimatrix (2014-09-23 22:36:22)
Offline
OK, I've manages to learn enough about jack to not break my system and can work with that, Pulseaudio, and alsa is always installed. Is there a way I can create a virtual device that takes in the input from both the system sound and the headset mic that I can set as the audio input for ffmpeg? I've been looking online and I've got a headache at this point from trying. I have learned to use ffmpeg on a new level, but I still can't do what I want to do. (which is record sound from the headset mic and the system sound at the same time while using ffmpeg. I could make two audio files from each channel and record the screen with x11grab. then combine all that using another utility, but then I have to run three separate programs at the same time (which will eat up my cpu) and still run whatever I'm recording from my screen. Something that will do all this for me would be much appreciated.
Offline