libstreaming
libstreaming copied to clipboard
Changing Video Quality shows green color on player
I have changed the video quality as follows ,.setAudioEncoder(SessionBuilder.AUDIO_AAC).setVideoQuality(new VideoQuality(480,360,30,500000)).setAudioQuality(new AudioQuality(8000, 16000))
.setVideoEncoder(SessionBuilder.VIDEO_H264).
When i play this video on Test Players at the Wowza server i can see some green colors alone.

@Livinlawrence while working with example 3 i stuck into exactly same problem, did you find any fix????
Yes, but didn't see this anywhere documented. I use the following code to destroy the cache and mSurfaceView.destroyDrawingCache(); try to set the video quality as mSession.setVideoQuality(new VideoQuality(352,288,30,400000)); This works fine for me.
@Livinlawrence i recently noticed that while working with devices with android 4.4.4 version this issue comes more often. did you face any such issue???
I got this problem too.
@khurramengr I maybe know the problem source, the bitrate is the core matter. I used this,
.setVideoQuality(new VideoQuality(800, 480, 20, 250000)).
and it works fine.
@gordonpro it may seem to be working on some devices, but some better approach that i've used is forcing streaming via MediaRecorder.
Also having this issue, tried dozens of different video quality settings. Seems that anything other than 176x144 causes issues:
mSession = SessionBuilder.getInstance()
.setCallback(MainActivity.this)
.setSurfaceView(mSurfaceView)
.setPreviewOrientation(90)
.setContext(getApplicationContext())
.setAudioEncoder(SessionBuilder.AUDIO_NONE)
.setAudioQuality(new AudioQuality(16000, 32000))
.setVideoEncoder(SessionBuilder.VIDEO_H264)
.setVideoQuality(new VideoQuality(176,144,20,500000))// works
//.setVideoQuality(new VideoQuality(176, 144,15,500000))//works
//.setVideoQuality(new VideoQuality(176, 144, 5, 500000))//works
//.setVideoQuality(new VideoQuality(176, 144, 20, 200000))//works
//.setVideoQuality(new VideoQuality(176, 144, 20, 20000))//works but low quality
//.setVideoQuality(new VideoQuality(176, 144, 20, 2000000))//works
//.setVideoQuality(new VideoQuality(128,96,20,500000))// crashed
//.setVideoQuality(new VideoQuality(320,240,20,500000))//green
//.setVideoQuality(new VideoQuality(320,240,20,1000000))//green
//.setVideoQuality(new VideoQuality(320,240,15,1000000000))//crashed decoder
//.setVideoQuality(new VideoQuality(320,240,15,50000))//green
//.setVideoQuality(new VideoQuality(352,288,20,500000))//green
//.setVideoQuality(new VideoQuality(352,288,15,384000))//green
//.setVideoQuality(new VideoQuality(352,288,15,100000000))//green
//.setVideoQuality(new VideoQuality(352,480,15,100000000))//green
.build();
Same results on Nexus 5 and 6 running Lollipop. Decoding the resulting elementary stream using ffmpeg on a MBP.
Hi deano2390, Greetings !!
Thanks a lot for sharing video quality resolution. can you provide some High Resolution or High Quality ?
waiting for your replay.
Hi deano2390, I have tried the setVideoQuality(new VideoQuality(176,144,20,500000)) resolution given by you, It's working fine but the video quality is very poor. Could you please provide the same for high resolution ?
is it possible to get Auto VideoQuality set based on the phone used?
Seems if you want to use 320x240, with code: .setVideoQuality(new VideoQuality(320,240,20,500000))
You must also change VideoQuality.java to make it work: //public final static VideoQuality DEFAULT_VIDEO_QUALITY = new VideoQuality(176,144,20,500000); public final static VideoQuality DEFAULT_VIDEO_QUALITY = new VideoQuality(320,240,20,500000);
don't know why.
@palidium I recommend to use the MediaRecorder API (forcibly) . It can compat more size.
Anyone solved this issue? I saw green stream color too when stream using front camera on nexus only.
Hi to all friends. I have this problem too. Has anyone solved it?