x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Get sounds being played

Suppose you need to save the game play as video file or you want to live stream the game, as far as I know there is no simple way to do this with blueprints nor there are plugins for this purpose. To solve this you need to somehow get the video and audio of game play. After some research I found a way to get the video of game play from Viewport. You can achieve this by inheriting from UGameViewportClient and overriding Draw method.

     void UMyGameViewportClient::Draw(FViewport* Viewport, FCanvas* SceneCanvas) 

You can call ReadPixel on Viewport to get an RGBA representation and encode this color buffer using FFmpeg library.

     TArray<FColor> ColorBuffer;
 
     if (!Viewport->ReadPixels(ColorBuffer, FReadSurfaceDataFlags(),
         FIntRect(0, 0, ViewportSize.X, ViewportSize.Y)))
     {
         UE_LOG(LogTemp, Error, TEXT("Cannot read from viewport"));
         return;
     }

Here is the answer to question Encoding frames to video with ffmpeg

So far so good. Now what about audio? Which class in Unreal Engine is responsible for mixing all audios to get a single, final audio to be played? How to get the audio from that class?

Product Version: UE 4.16
Tags:
more ▼

asked Oct 24 '17 at 08:06 AM in C++ Programming

avatar image

Mher
6 2

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question