-
-
Notifications
You must be signed in to change notification settings - Fork 808
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
{Question] Stream from file #1774
Comments
I don't understand you. If you want loop a video/audio file using GenericStream, you can use VideoFileSource or AudioFileSource or both. In both, you can select if you want loop in the constructor and change it on real time using setLoopMode method (by default loop enabled). About play the audio of the file using AudioFileSource. Yes, you can do it. You have a method with the same name that using FromFileBase (playAudioDevice and stopAudioDevice). About GenericFromFile and RtmpFromFile. The difference is that GenericFromFile support all stream protocols but you only can use methods and codecs commons in all protocols. Using RtmpFromFile you can use all codecs and methods supported by RTMP. The usage depend of your needs. |
My problem is that when I stream from file I am not getting the video on my device. I can see the stream being published and I see it remotely, just not on my device. If I add playAudioDevice() to the startStream() then I can hear the audio on my device. But ofc , still no video. In your example FromFileActivity it seems to me that video is played (on the device) only if recording? So yeah basically my question is about seeing the video from the file stream on the device screen. Currently, with this code it only shows remotely.
|
Hello, Are you using an OpenGlView in the rtmpfromfile constructor like in the example? |
hi, No, actually. I am using compose for the project and the class looks like this:
|
I understand the issue now. I was rendering using
. Changing to
and using the same openGlView in my file streaming class: did it. |
Hi,
I want to be able to play a file while streaming on the device. Using preview is fine but I want to be able to loop that video.
I see there is a
playAudioDevice()
inFromFileBase
which is exactly what I would like for video, but that part seems to be missing.Any idea on how can I play the video too? Maybe I'm missing something... I am using GenericFromFile, but I don't see any relevant difference with RtmpFromFile from example.
And also, is it possible to achieve the same results (play video+audio on the device too with loop) with
GenericStream
andchangeVideoSource(videoFileSource)
?The text was updated successfully, but these errors were encountered: