fyhertz / libstreaming

A solution for streaming H.264, H.263, AMR, AAC using RTP on Android
Apache License 2.0
3.49k stars 1.08k forks source link

Wrong resolution while playing the stream #260

Open the-information-guy opened 7 years ago

the-information-guy commented 7 years ago

Hi,

I am streaming in 640x480 (VideoQuality(640,480,15,500000)) or others resolutions that are not default with libstreaming to my machine running ffplay to read the stream.

I don't know why but the SDP generated by libstreaming tells ffplay (ffmpeg) that the stream is 176x144 so ffplay takes quite a long time to re-configure (2 min) and actually show the stream in the wanted quality.

SDP :

v=0
o=- 0 0 IN IP4 null
s=Unnamed
i=N/A
c=IN IP4 224.0.0.1
t=0 0
a=recvonly
m=audio 6002 RTP/AVP 96
a=rtpmap:96 AMR/8000
a=fmtp:96 octet-align=1;
a=control:trackID=0
m=video 6004 RTP/AVP 96
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1;profile-level-id=42c029;sprop-parameter-sets=Z0LAKY1oLEyAeEQjUA==,aM4BqDXI;
a=control:trackID=1

Errors while starting to read the stream (ffplay) :

decoding for stream 1 failedq=    0B f=0/0   
Input #0, sdp, from 'multicast.sdp':
  Metadata:
    title           : Unnamed
    comment         : N/A
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0: Audio: amr_nb, 8000 Hz, mono, flt
    Stream #0:1: Video: h264 (Constrained Baseline), yuv420p, 176x144, 90k tbr, 90k tbn, 180k tbc
[h264 @ 0x7f6d100a8ac0] mb_type 51 in P slice too large at 8 1
[h264 @ 0x7f6d100a8ac0] error while decoding MB 8 1
[h264 @ 0x7f6d100a8ac0] concealing 99 DC, 99 AC, 99 MV errors in P frame
[h264 @ 0x7f6d102a3600] out of range intra chroma pred mode at 0 6  
[h264 @ 0x7f6d102a3600] error while decoding MB 0 6
[h264 @ 0x7f6d102a3600] concealing 82 DC, 82 AC, 82 MV errors in P frame
.....

Do I have to change anything in the SDP to get it working instantly or is it anything else ?

Any help's appreciated