[Libav-user] How to open dshow audio input device and work with it

gakwaya daniel wayadn at yahoo.fr
Fri Jan 9 05:16:44 CET 2015


Hi ,I want to open audio and Screen grab devices in my application ( will encode and mux them into an output video) like this 

 AVInputFormat *ifmt=av_find_input_format("gdigrab");    if(avformat_open_input(&pFormatCtx,"desktop",ifmt,&options)!=0){        printf("Couldn't open input stream.\n");        return -1;    }
   //INPUT TO CAPTURE AUDIO    AVInputFormat *ifmtAudio=av_find_input_format("dshow");
    if(avformat_open_input(&pFormatCtxAudio,"audio=MicroPhone (Realtek Hight Defini",ifmtAudio,NULL)!=0){        printf("Couldn't open input audio stream.\n");        return -1;    }
 but the audio is failing to open .Is this even the right way to open them if I plan to mux encoded streams later .This question is part of a program here:     libavcodec : how to encode with h264 codec ,with mp4 container using controllable frame rate and bitrate(through c code) 

|   |
|   |  |   |   |   |   |   |
| libavcodec : how to encode with h264 codec ,with mp4 con...I am trying to record the screen of a pc and encode the recorded frames using h264 encoder and wrap them into a mp4 container.I want to do this because... |
|  |
| Afficher sur stackoverflow.com | Aperçu par Yahoo |
|  |
|   |

  I am working on .I am new to libav* and any assistance will be appreciated.Thanks. 
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20150109/f65d17d6/attachment.html>


More information about the Libav-user mailing list