<div dir="ltr"><font face="arial, helvetica, sans-serif">Hello,</font><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">I'm currently trying to record a blank/black video with audio only from a microphone in. The end goal is to have 1 video that's a recording of my desktop with the left channel from a mic in as the audio, and another video that's a black screen with only the right channel of the same mic in. </font><font face="arial, helvetica, sans-serif"> </font><span style="font-family:arial,helvetica,sans-serif">As stupid as a 'blank video with audio' sounds, it does need to be a video and not just a mp3/sound file due to customer restrictions with the software I must use to play the file back.</span><span style="font-family:arial,helvetica,sans-serif"> I'm using screen capture recorder for my desktop capturing and have the desktop video with both channels of audio working fine based off the transcoding.c example, but I'm having some issues getting the blank video with audio video working.</span></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">I can record a blue video with audio from command line with the following</font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">'ffmpeg -f lavfi -i color=c=blue:s=320x240 -f dshow -i audo=virtual-audio-capturer output.mpg'</font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">but I haven't been able to get my C code to work I just never get video and the audio frames are always empty, I'm basing what I'm doing off the transcoding.c example again, but unsure of a few things.</font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">1. How do I handle handle 2 input formats? Do I need to use 2 AVFormatContext's (one for video and one for audio)? Or can I use 1 and have the input format for the video and audio be different?</font></div><div><font face="arial, helvetica, sans-serif">2. How do I only get the right channel of audio using the C API? Do I need to use a filter? eg: </font></div><div><span style="white-space:inherit;color:rgb(34,36,38);font-size:13px;background-color:rgb(238,238,238)"><font face="arial, helvetica, sans-serif"><br></font></span></div><div><span style="background-color:rgb(255,255,255)"><font face="arial, helvetica, sans-serif"><span style="white-space:inherit;color:rgb(34,36,38);font-size:13px">ffmpeg -f lavfi </span>-i color=c=blue:s=320x240 -f dshow -i qaudio='any-mic-device' <span style="color:rgb(34,36,38);font-size:13px;white-space:inherit">-map_channel 1.0.1 output.mpg</span></font></span></div><div><span style="background-color:rgb(255,255,255)"><span style="color:rgb(34,36,38);font-size:13px;white-space:inherit"><font face="arial, helvetica, sans-serif"><br></font></span></span></div><div><span style="background-color:rgb(255,255,255)"><span style="color:rgb(34,36,38);font-size:13px;white-space:inherit"><font face="arial, helvetica, sans-serif">current code: </font></span></span><font color="#222426" face="arial, helvetica, sans-serif"><a href="http://pastebin.com/ccagQvqs">http://pastebin.com/ccagQvqs</a></font></div><div><span style="background-color:rgb(255,255,255)"><span style="color:rgb(34,36,38);font-size:13px;white-space:inherit"><font face="arial, helvetica, sans-serif"><br></font></span></span></div><div><span style="background-color:rgb(255,255,255)"><span style="color:rgb(34,36,38);font-size:13px;white-space:inherit"><font face="arial, helvetica, sans-serif">I'm relatively new to C/C++ so any help/examples/direction would be greatly appreciated.</font></span></span></div><div><span style="background-color:rgb(255,255,255)"><span style="color:rgb(34,36,38);font-size:13px;white-space:inherit"><font face="arial, helvetica, sans-serif"><br></font></span></span></div><div><span style="background-color:rgb(255,255,255)"><span style="color:rgb(34,36,38);font-size:13px;white-space:inherit"><font face="arial, helvetica, sans-serif">Thanks,</font></span></span></div><div><span style="background-color:rgb(255,255,255)"><span style="color:rgb(34,36,38);font-size:13px;white-space:inherit"><font face="arial, helvetica, sans-serif">Casey</font></span></span></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><span style="background-color:rgb(255,255,255)"><span style="color:rgb(34,36,38);font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,sans-serif;font-size:13px;white-space:inherit"><br></span></span></div></div>