Screen Recording with ffmpeg/recording mic and speaker output

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 ANSWER3
For 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 $ORIGINALNAME
compiler
ffmpeg -i $ORIGINALNAME -vcodec libx264 -acodec aac -ab 128k -crf 22 -strict -2 -threads 0 $OUTPUTFILE
Anyway, 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.

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.

Similar Messages

  • I record with a sony ax2000 and use the 1080 60i setting. what should i edit with when using adobe premiere ele 10

    I record with a sony ax2000 and use the 1080 60i setting. what settings should I edit with when using adobe premiere elements 10?

    smannino
    You have duplicate threads on this issue related to project preset suggestion for your 1080 60i video.
    I have responded to your question in the other thread
    if i record with a sony ax2000 using 1080 60 i what is the best editing setting to use with elements 10?
    Please reply in that other thread.
    Thank you.
    ATR

  • Merging local records with device records failed

    Hi,
    I have a macbook with OS X 10.4.11 (Intel procesor)  I did install the latest Pockect mac for blackberry version (the current one in the Blackberry's page), i use to use the old one, since I did the updated I can't get that both, device and Mac SYNC any item, no contacts, no calendar... 
    The message I got last time was: 
    06:06:57:140 merging local records with device records failed. 
    Could some one with me a light on this bug?
    Thanks 

    Hi rguardia,
    Can you try synching one PIM database at a time, e.g. just Contacts by itself, so we can determine which database is experiencing the problem?  The error you are receiving is likely being caused by one specific database.
    Once you have identified the database that is causing problems, can you perform the steps listed below:
    1 - Run Data Purge on the affected database.  Data purge can be found in the following location: 
    Mac HD/users/<Home User>/Library/Application Support/PocketMacSyncManager/Additional Tools. 
    ***Please note this utility will delete all information stored in the selected database on your BlackBerry however once the information has been deleted from your device you can reimport the data to your BlackBerry from the application on your Mac.
    2 - Run Sync Clean, which can be found in the same folder as Data Purge. 
    3 - Disconnect the BB from the Mac, remove the battery from the back of the device, wait 10 seconds then reinsert it
    4 - Reboot the Mac
    5 - Reconnect your BlackBerry to your Mac
    6 - Open PocketMac and select Reset All Devices to First Sync State from the Devices menu
    7 - Configure synchronization settings for the affected PIM database, choosing the option to Overwrite Device.  If the data is successfully transferred to the device, reconfigure PocketMac back to doing a two-way sync.
    If you are still running into the same problem after performing the steps above, try synching one category of the affected database at a time. To do this, click on the tab of the database you are trying to sync, click on Advanced Preferences next to the selected application, and choose the option to sync only selected categories. Try synching with only one category selected at a time, just to see if the issue is related to data within a specific category.
    Let us know how you make out!

  • My ipod was updating overnight. I woke up to find the screen frozen with the itunes logo and the usb charger. I've tried hooking it up to itunes but it says I need to restore and update but I've tried to do that and it won't. What should I do?

    My ipod was updating overnight. I woke up to find the screen frozen with the itunes logo and the usb charger. I've tried hooking it up to itunes but it says I need to restore and update but I've tried to do that and it won't. What should I do?

    - Try placing the iPod in Recovery Mode and restoring via iTunes
    - Next try DFU mode and restore.
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings

  • HT4623 I thought I was updating my IPad, i selected update and came back home to the screen frozen with the Itunes symbol and a plug in cord displayed.  I can not get it to do anything.

    I thought I was updating my IPad, i selected update and came back home to the screen frozen with the Itunes symbol and a plug in cord displayed.  I can not get it to do anything.  Any suggestions?

    Your iPad has gone into recovery mode and it needs to be restored now. The instructions are in this kb article.
    If you can't update or restore your iOS device - Support - Apple

  • Ventrilo Mic Hiss with high quality Mic and X-Fi Titanium PCI-E

    ?Ventrilo Mic Hiss with high quality Mic and X-Fi Titanium PCI-E? I have <a rel="nofollow" href="http://www.astrogaming.com/products/detail/4/A40-Headset/]this headset.[/url]? It works perfectly on other setups and is a very high quality headset.
    Recently, I installed the X-fi Titanium PCI-E card. Everything sounds great and my mic works well in other programs and games, however, when talkin in ventrilo there is?a noticeable high pitch?microphone hiss. The hiss goes away when I put my fist around the mic, but I can't exactly talk like that. Plus putting foam around the mic doesn't make it go away.
    The headset works fine on other setups so it is not at fault. It's almost like there is a mic boost on, but there doesn't seem to be a mic boost feature in the Creative Console.
    Windows 7 Home Premium 64-Bit
    Intel Core I7 920 @ 3.4ghz
    6GB RAM
    4870x2 GPU
    Asus P6T Deluxe MOBO
    Creative Sound Blast X-Fi Titanium PCI-E
    Any ideas. I've tried everything. I used to exact same ventrilo settings on another computer and have had no problems, so it is not ventrilo and is not the mic. It has to be something wrong with the sound card.
    Thanks

    Turned my T.V. off and the hiss went away.
    Must have been some sort of interference.

  • Need help recording with an external mic on garageband!!!

    I'm a singer and i'm trying to figure out how to record vocals on garageband with an external mic that can plug into the powerbook. However, when i record it uses the internal mic instead I have no clue how to change it so it will use the external mic. Please help!!!
    Thanks,
    Stef=)

    You HAVE to use a Mic that is powered! Just plugging a Mic into the Powerbook and switching the input to Line-in doesn't cause it to work.
    I believe Griffin Techologies makes an adapter that will work and there are some other one out there. Google powered mics and see what comes up.

  • No Audio when recording with built -in mic

    i have used imovie HD for a while no and when i record with my macbook, it makes perfect video with sound. i have just done my first recording with imovie '08 and there is no sound at all. my setting are set to internal mic. is there something special i have to do to make it record both sound and audio?
    please help. i have recorded about an hour of work for future keynote presentations and would be destroyed if i had to remember everything i came up with.

    how do you do it?
    1. Create a New Basic Track
    2. Click the record button
    3. There is no step 3.

  • Can I record with an external mic via my DV camera?

    I have a recording setup with a prosumer DV camera with an external mic. I have been using the voiceover tool in FCP to record VO, but now I have Soundtrack Pro and want to use that for recording VO. Can I do this? If so how? Also can someone tell me - does Garageband still have a place fro creating custom scores now that I have ST Pro? Thansk

    Your Mac does not have a microphone input, only a line-level input (in fact, no Mac has included a microphone input in quite a while). So you'll need 1) a self-powered microphone that outputs line level, 2) a USB microphone, or 3) an external audio device that supports microphone inputs, either a mixer that will give you line-level output or a USB audio input device. One possibility for a USB device that works for many people and that is relatively inexpensive (ca $40.00 US) the Griffin iMic. It works with any standard personal computer microphone.
    Hope this helps.

  • Recording with a Roland Keyboard and iMic

    Hello there.
    I have recorded with this setup before, but it has been quite some time and I could use a refresher to make sure that I'm doing everything correctly. In other words, way back then, everything worked beautifully, but now I forgot what to do.
    GarageBand '09, Roland Fantom X8, iMic
    How should I connect the Keyboard and the iMic? I assume I connect from the Phones output (as this is where the sound WOULD come out with headphones as there are no speakers), but is there something better.
    What settings are required for the MacBook Pro?
    What changes do I need to make in preferences in GB? Should I see something new?
    Bear in mind that I am not recording MIDI, but direct-line sound (so the exact sounds coming out of the synthesizer; not a MIDI controller).
    Any help would be epic fantastic. Thanks a bunch!

    Ortaconic wrote:
    I assume I connect from the Phones output
    correct
    but is there something better.
    only if it offers a Line-OUT
    What settings are required for the MacBook Pro?
    none
    What changes do I need to make in preferences in GB?
    http://www.bulletsandbones.com/GB/GBFAQ.html#recordusingaudiointerface
    (Let the page FULLY load. The link to your answer is at the top of your screen)

  • Need help recording with two linked firepods and an outboard mixer

    Hi!
    Well I've been using Logic for a couple of years but always stayed "in the box".
    Now that I started working out of the box I encountered a strange problem. Let me explain...
    Since recently I have an analog Soundcraft Ghost mixer and two firepods. I linked the two firepods (aggregate device) and recorded 16 tracks into Logic. I sent these back to the mixer through the outputs of my firepods (I used the I/O plugin on each track to get a mono output).
    I made the whole mix on the mixer and now I want to record that mix back into logic (in order to have a Stereo mix ready for mastering).
    I thought all I had to do was create a new stereo audio track in Logic (choose input i.e. 1-2), connect the master output from the table to input 1-2 on my firepods, set the gain on the preamps. Arm the track, hit record.
    Now the problem I have is that what is recorded sounds reeeaaaally strange. It's like distorted or some kinda feedback. Bit difficult to explain. But it sure doesn't sound right at all...
    Does anyone knows what the problem could be?
    Could it be that with the firepods you can't use an input if you allready use it's output?
    If you need any more info, let me know!
    By the way, I'm working on a Macbook Pro 2,4 with osx10.5.6 and Logic Pro 8.0.2
    Greetz,
    NLS

    The problem sounds like you have a feedback loop between the outputs and the input. Here's my suggestion:
    1 Turn the Mixer control on the Firepods all the way to the right, to make sure the Input signal is not mixed back in to the outputs
    2 Mute the stereo Input channel that you're recording on (in Logic) before you arm the Record button
    3 After you have recorded your mix into Logic, disarm the Record button, un-mute and solo the channel, then play back

  • My email account has disappeared overnight.  Now a screen appears with several email options and I cannot access my email.  What happened?

    Why would the way I get my email change overnight?   I used to be able to access it immediately upon touching the mail icon.  Now a screen appears with several email account options.

    Does the account still show on the right-hand ide of Settings > Mail, Contacts, Calendars - and if it does if you tap on it and select it is Mail still 'on' for it ? If it's 'off' then changing it to 'on' should get the account to show in the Mail app again.

  • Checking Previous record with current record.

    I have a small problem, i want to compare the previous record with the current record with in cursor declared....
    Please help in this issue.
    Thanks in advance.

    Try the lag analytic function.
    select some_value, lag(some_value) over (order by your_ordering_condition) from x order by your_ordering_condition

  • How many min. can i record with voice record with MuVo V200 1

    Hi,
    I'm going to buy the Creative MuVo V200 GB.
    Now my questions about this player.
    How many minutes can i record over voice recording.
    Maybe someone can tell me how much Megabytes minute of recording will take.
    Are there different quality levels of recording?
    In which format does the player save the recordings?
    I will use the player to record lectures at the uni'versity.
    Did anyone have done this?

  • Problems with Runtime.getRuntime().exe and getting output. Please Help me!!

    I'm creating a program that runs the followings programs written in C and compiled with gcc:
    ==========================The first C program====================================
    #include<stdio.h>
    void leia();
    main()
    int x = 20;
    int y = 2;
    printf( "Marcinho e Danny\n" );
    printf( "Te\n" );
    printf( "Vida\n" );
    printf( "Marciorja: %d.\n", x * y );
    ===============================================================================
    ==========================The second C program====================================
    #include<stdio.h>
    void leia();
    main()
    int x = 20;
    int y = 2;
    printf( "Marcinho e Danny\n" );
    printf( "Te\n" );
    printf( "Vida\n" );
    printf( "Marciorja: %d.\n", x * y );
    scanf( "%d", &x ); //This is the statement added to the latter C program.
    ===============================================================================
    I compiled this C program and generates the a.exe program. I have the following Java program:
    ==================================================================================
    import java.awt.Color;
    import java.awt.event.KeyAdapter;
    import java.awt.event.KeyEvent;
    import java.awt.event.KeyListener;
    import java.io.BufferedReader;
    import java.io.BufferedWriter;
    import java.io.DataOutputStream;
    import java.io.File;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.InputStreamReader;
    import java.io.OutputStream;
    import java.io.OutputStreamWriter;
    import java.io.PrintWriter;
    import java.util.StringTokenizer;
    import javax.swing.JFrame;
    import javax.swing.text.BadLocationException;
    import javax.swing.text.EditorKit;
    import javax.swing.text.MutableAttributeSet;
    import javax.swing.text.Style;
    import javax.swing.text.StyledDocument;
    import javax.swing.text.StyledEditorKit;
    public class Teste
    private BufferedWriter out;
    private BufferedReader in;
    private Style stylePrompt;
    private LeitorDeEntrada le;
    private String entrada = "";
    private AreaDeEdicao areaDeTexto;
    Process p = null;
    public Teste( AreaDeEdicao areaDeTexto )
    this.areaDeTexto = areaDeTexto;
    public void runCommand( String command ) throws IOException
    StringTokenizer strTokenizer = new StringTokenizer( command );
    String mainCommand = null;
    String argument = null;
    StyledDocument doc = areaDeTexto.getStyledDocument( );
    String[] prefix = new String[] { "cmd.exe", "/c", command };
    p = Runtime.getRuntime().exec( prefix, null, new File( System.getProperty( "user.dir" ) ) );
    in = new BufferedReader( new InputStreamReader( p.getInputStream( ) ) );
    out = new BufferedWriter( new OutputStreamWriter( p.getOutputStream( ) ) );
    out.flush();
    Thread t = new Thread( )
    public void run( )
    super.setName( "Marcio" );
    execute( );
    public void execute( )
    String c = null;
    try
    if( !in.ready( ) )
    try
    this.sleep( 1000 );
    catch( InterruptedException e2 )
    e2.printStackTrace( );
    System.out.println( "in.rea: " + in.ready( ) );
    c = in.readLine( );
    catch( IOException e )
    e.printStackTrace( );
    String str = "";
    while( c != null )
    str = c + "\n";
    try
    areaDeTexto.getDocument( ).insertString( areaDeTexto.getDocument( )
    .getLength( ),
    str, null );
    catch( BadLocationException e3 )
    e3.printStackTrace( );
    try
    c = in.readLine( );
    catch( IOException e2 )
    e2.printStackTrace( );
    areaDeTexto.setCaretPosition( areaDeTexto.getDocument( )
    .getLength( ) );
    try
    in.close( );
    catch( IOException e1 )
    e1.printStackTrace( );
    t.setDaemon( true );
    t.start( );
    le = new LeitorDeEntrada( );
    areaDeTexto.addKeyListener( le );
    public static void main( String[] args )
    JFrame janela = new JFrame( );
    AreaDeEdicao areaDeTexto = new AreaDeEdicao( new MyDocument( ) );
    areaDeTexto.setBackground( Color.black );
    areaDeTexto.setForeground( Color.GREEN );
    janela.getContentPane( ).add( areaDeTexto );
    Teste teste = new Teste( areaDeTexto );
    try
    teste.runCommand( "a.exe" );
    catch( IOException e )
    e.printStackTrace( );
    janela.setSize( 500, 300 );
    janela.setVisible( true );
    class LeitorDeEntrada extends KeyAdapter
    public void keyPressed( KeyEvent e )
    char c = e.getKeyChar( );
    System.out.println( "keyPressed" );
    try
    if( c == '\n' )
    areaDeTexto.getDocument().insertString( areaDeTexto.getDocument( )
    .getLength( ),
    c + "", null );
    out.write( c + "" );
    out.flush();
    catch( BadLocationException e2 )
    e2.printStackTrace( );
    } catch (IOException e2) {
    e2.printStackTrace();
    ==================================================================================
    This Java program is very simple. It runs the a.exe using the method Runtime.getRuntime().exec and gets input for a.exe from a JTextPane and shows the output in the same JTextPane.
    If my a.exe represents the binary code of the first C program the text in the JTextPane is the correct output of the a.exe. But, if my a.exe represents the binary code of the second C program, the JTextPane shows the messages ( "Marcinho e Danny\n", "Te\n", "Vida\n", "Marciorja: %d.\n") after I enter the value claimed by the scanf.
    I tested my Java program running programs that require input and all have the same behavior:.
    What can I need to do to solve this bug?
    I read other posts with the same problem and nobody answers what is the problem.
    I'LL pay 10 Duke dollars to the first that answers me.

    The second C program with the statement fflush( stdout ) produces the right output.
    #include<stdio.h>
    void leia();
    main()
    int x = 20;
    int y = 2;
    printf( "Marcinho e Danny\n" );
    printf( "Te\n" );
    printf( "Vida\n" );
    fflush( stdout ); //added statement.
    printf( "Marciorja: %d.\n", x * y );
    scanf( "%d", &x ); //This is the statement added to the latter C program.
    but what can I do to run C programs that doesn't flush the stdout?

Maybe you are looking for

  • How to use GPShells open_sc command for a SC02 option 15 Card (J2A, J3A)?

    Hi, my cards tell me as response to get-data 0066 command, that they are using SC02 option 15: Global Platform version : 2.1.1 Global Platform Secure Channel Protocol: 02 option 15 What are the right parameters for GPShells open_sc command? h3. GPShe

  • 2 Homepages with Iweb ??

    Hi, I am really in trouble...I created 2 homepages with iweb. Homepage 1 is already online. Everything fine so far. The problem is the second homepage as it is apparently using the same index file as homepage number 1 - can this be? I do publish thro

  • Any practical help about XML API for databases

    HI friends, I have a problem, i want to connect to my Database using JSP but by using XML api for database. I want to MAP my database tables, rows columns as xml elements to make it more flexible. Anyone who had practicaly worked on it, please help m

  • Why do I always have to argue with BT?

    Since an engineer visited me on Monday, my noise ration has been gradually creeping up, and my sync speed gradually falling. Obviously they are both related. So, I email the MODS and asked for them to lower my noise ratio to 3 up, 3 down, as it has b

  • PC-made PDF powerpoints on Mac

    I have made some PowerPoints with Office 2007. I have converted them to PDF on my PC--and posted them, with Dreamweaver, on my website. I have viewed them on my PC (Internet Explorer). The nonlinear functions (the action buttons move to appropriate s