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"

SetVideoTrackFrameRate refuses to set framerate

I'm trying to set the framerate of the media player so the frames sync up.

Here's what I have so far:

  for (UMediaPlayer* MediaPlayer : MediaPlayers)
     if (!Streams[i].is360) {
         FString Fs = FString(UTF8_TO_TCHAR(Streams[i].full_url.c_str()));
         FTimespan range = MediaPlayer->GetDuration();
         FTimespan delay = FTimespan(0, 0, 0,0,400);
         FIntPoint dimensions = MediaPlayer->GetVideoTrackDimensions(INDEX_NONE, INDEX_NONE);
         FIntPoint dimensions2 = MediaPlayer->GetVideoTrackDimensions(2, 0);
         MediaPlayer->SetVideoTrackFrameRate(0, 1,Streams[i].fps);
         MediaPlayer->SetVideoTrackFrameRate(0, 0, Streams[i].fps);
         MediaPlayer->SetVideoTrackFrameRate(1, 1, Streams[i].fps);
         MediaPlayer->SetVideoTrackFrameRate(1, 0, Streams[i].fps);
     i = (i + 1 )% streamLength;

I'm assuming the track is the one provided by ffmpeg, and the type is audio for 0 and video for 1. I'm not sure, I can't find documentation on the Track Type or the other one. Help on setting the frame rate would be appreciated - so the frames play with the audio. I'm using VLCMediaPlayer Plugin on an RMTP stream.

Product Version: UE 4.20
more ▼

asked Sep 11 '18 at 06:22 PM in C++ Programming

avatar image

16 1 2 4

(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