question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Voice Is Not Working

See original GitHub issue

I’m trying to transmit video to discord with ffmpeg. It opens the file and I can see it reading(I tested it) but I can’t hear anything on discord. The bot is in the voice channel and it is not muted.

private async Task TransmitAudio(Song.Song song)
       {
           // Create FFmpeg 
           try
           {
               var ffmpeg = CreateStream(song);
               var output = ffmpeg.StandardOutput.BaseStream;
               var discord = audioClient.CreatePCMStream(AudioApplication.Mixed);
               await output.CopyToAsync(discord);
               await discord.FlushAsync();
           }
           catch (Exception e)
           {
               Console.WriteLine(e);
           }
       }

       private Process CreateStream(Song.Song song)
       {
           Console.WriteLine(song.filename);
           var ffmpeg = new ProcessStartInfo
           {
               FileName = "ffmpeg",
               Arguments = $"-i \"{song.filename}\" -ac 2 -f s16le -ar 48000 pipe:1",
               UseShellExecute = false,
               RedirectStandardOutput = true,
               CreateNoWindow = false
           };
           return Process.Start(ffmpeg);
       }

output:

22:34:00 Discord     Discord.Net v1.0.1 (API v6)
22:34:01 Gateway     Connecting
22:34:02 Gateway     Connected
22:34:03 Gateway     Ready
Channel botmessaging set as the bot channel.
22:34:09 Audio #1    Connecting
22:34:09 Audio #1    Unknown OpCode (8)
22:34:10 Audio #1    Connected
c:\users\boti\documents\visual studio 2017\Projects\LemonBOT\LemonBOT\bin\Debug\downloads\kXYiU_JCYtU.webm
ffmpeg version N-83657-g7e4f32f Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 6.3.0 (GCC)
  configuration: --enable-gpl --enable-version3 --enable-cuda --enable-cuvid --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-zlib
  libavutil      55. 47.100 / 55. 47.100
  libavcodec     57. 81.100 / 57. 81.100
  libavformat    57. 66.102 / 57. 66.102
  libavdevice    57.  2.100 / 57.  2.100
  libavfilter     6. 74.100 /  6. 74.100
  libswscale      4.  3.101 /  4.  3.101
  libswresample   2.  4.100 /  2.  4.100
  libpostproc    54.  2.100 / 54.  2.100
Input #0, matroska,webm, from 'c:\users\boti\documents\visual studio 2017\Projects\LemonBOT\LemonBOT\bin\Debug\downloads\kXYiU_JCYtU.webm':
  Metadata:
    encoder         : google
  Duration: 00:03:06.14, start: -0.007000, bitrate: 125 kb/s
    Stream #0:0(eng): Audio: opus, 48000 Hz, stereo, fltp (default)
Output #0, s16le, to 'pipe:1':
  Metadata:
    encoder         : Lavf57.66.102
    Stream #0:0(eng): Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s (default)
    Metadata:
      encoder         : Lavc57.81.100 pcm_s16le
Stream mapping:
  Stream #0:0 -> #0:0 (opus (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:19 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
AntiTcbcommented, Sep 30, 2017

The unimplemented opcodes do not have a bearing on this issue.

0reactions
Chailotlcommented, Mar 2, 2019

And now it’s working again after 0 changes, bloody hell.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fix issues with “Hey Google” - Google Search Help
On your Android phone or tablet, go to Assistant settings, or open the Google Assistant app Assistant and say, “Assistant settings.” · Under...
Read more >
Troubleshoot Voice Access - Android Accessibility Help
If Voice Access doesn't recognize your voice commands, try the following: Make sure that your device is connected to the Internet over cellular...
Read more >
OK Google not working? Here's how to fix it
OK Google not working? Here's how to fix it · Check your language and microphone · Make sure Google Assistant is on ·...
Read more >
"Ok Google" Not Working on Android or iPhone? Here's the Fix
Table of contents: · Check the microphone on your device · Turn off Battery saving mode · Update Google app · Retrain "Ok...
Read more >
OK Google Not Working? 12 Ways to Fix It
Make sure the Google smart home device is plugged in and powered on. · Check for an internet connection. · Check that the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found