Hi.
I tried to play my streaming file(VIDEO :MJPEG framerate 30, AUDIO: PCM SampleBits 44100, SampleRate 16, Channels 2) in my device as the RTSP server,
and it will connect to my iphone by RTP and play in the VLC player (as RTSP client)
But I can only see the video just run few seconds, and the audio always played the same sound.
I guessed it is the timestamp issue, so I did an experience:
I recorded a MJPEG video(remove audio), and sent one frame per second from my device.
And attached the pts increment to 2000 between every frame.
Send_time(sec) Frame_num pts timestamp
0 frame_0 0 2000000000
1 frame_1 2000 2000180000
2 frame_2 4000 2000360000
3 frame_3 6000 2000540000
...
29 frame_29 58000 2005220000
Because the VLC player should play the video according by the timestamp, and the payload type (m=video 0 RTP/AVP 26 => clock=90000).
I expect the video will show frame_0 in 0 sec, frame_1 in 2 sec, frame_2 in 4 sec, frame_3 in 6 sec, ... frame_29 in 58 sec.
But the real condition in my VLC player is frame_0 in 0 sec, frame_1 in 2 sec, frame_2 in 3 sec, frame_3 in 4 sec, ... frame-29 in 31 sec.
Could someone help me ? Thanks.
---------------------------------------------------------------
The following information is from my RTSP DESCRIBE:
i=MJPG
t=0 0
a=type:broadcast
a=control:*
a=range:npt=0-60.50
a=x-qt-text-nam:Motion JPEG.
a=x-qt-text-inf:MJPG
m=video 0 RTP/AVP 26
c=IN IP4 0.0.0.0
b=AS:12288
a=frmerate:30.0
a=control:track1