libstreaming icon indicating copy to clipboard operation
libstreaming copied to clipboard

Changing Video Quality shows green color on player

Open Livinlawrence opened this issue 11 years ago • 14 comments

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. 9-23-2014 9-36-27 pm

Livinlawrence avatar Sep 23 '14 16:09 Livinlawrence

@Livinlawrence while working with example 3 i stuck into exactly same problem, did you find any fix????

khurramengr avatar Oct 11 '14 14:10 khurramengr

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 avatar Oct 13 '14 10:10 Livinlawrence

@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???

khurramengr avatar Oct 18 '14 13:10 khurramengr

I got this problem too.

gordonpro avatar Nov 05 '14 07:11 gordonpro

@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 avatar Nov 05 '14 10:11 gordonpro

@gordonpro it may seem to be working on some devices, but some better approach that i've used is forcing streaming via MediaRecorder.

khurramengr avatar Nov 05 '14 16:11 khurramengr

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.

deano2390 avatar Feb 20 '15 11:02 deano2390

Hi deano2390, Greetings !!

Thanks a lot for sharing video quality resolution. can you provide some High Resolution or High Quality ?

waiting for your replay.

vaibhavTesting avatar Mar 03 '15 11:03 vaibhavTesting

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 ?

rajendrabohra avatar Apr 06 '15 13:04 rajendrabohra

is it possible to get Auto VideoQuality set based on the phone used?

carloskekwa avatar Aug 19 '15 12:08 carloskekwa

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 avatar Mar 15 '16 08:03 palidium

@palidium I recommend to use the MediaRecorder API (forcibly) . It can compat more size.

gordonpro avatar Mar 15 '16 10:03 gordonpro

Anyone solved this issue? I saw green stream color too when stream using front camera on nexus only.

ririsrismawati avatar Apr 15 '16 03:04 ririsrismawati

Hi to all friends. I have this problem too. Has anyone solved it?

meysam-rex avatar Apr 09 '21 09:04 meysam-rex