[FFmpeg-user] RTP decoded video plays too fast

2018-02-06 Thread Hooman Fazaeli
I am developing a SIP call recording app. To save conversations as
playable media files, I
has done the following:

1.  Track SIP dialogs and save RTP media streams into custom .rtp
files. The files have
a header which contains stream encoding information (extracted form
SDP payloads)
followed by the RTP packets itself, saved consecutively and preceded
w/ a 2 byte length
field.

2. Developed a custom AVInputFormat. The format reads .rtp file header in its
read_header method and sets stream codec and its parameters. It also
creates RTPDemuxContext and RTPDynamicProtocolHandler instances. In
its read_packet method, the format reads rtp packets and passes them
to rtp demuxer.

3. To convert .rtp files to playable media, I use a simple command like below:

> ffmpeg -i vp8-video.rtp -o vp8-video.flv

The output contains the video as expected but it plays almost 2 times
faster in VLC and widows media player. The problem exists w/ other
output formats such as .avi or .mp4, too.

Can anybody suggest what is going wrong? As RTP packets contain timing
information,
why ffmpeg decodes them in a faster rate? How I can fix the problem
w/o using PTS filters?

NOTE: The trans-coded audio streams do not have this problem and play
at correct rate.

Pls. keep me CC'ed as I am not registered to the list.
Thanks.
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-user] RTP decoded video plays too fast

2018-02-05 Thread Hooman Fazaeli
Hi,

I am developing a SIP call recording app. To save conversations as
playable media files, I has done the following:

1.  Track SIP dialogs and save RTP media streams into custom .rtp
files. The files have a header which contains stream encoding
information (extracted
form SDP payloads) followed by the RTP packets itself, saved consecutively and
preceded w/ a 2 byte length field.

2. Developed a custom AVInputFormat. The format reads .rtp file header in its
read_header method and sets stream codec and its parameters. It also
creates RTPDemuxContext and RTPDynamicProtocolHandler instances. In
its read_packet method, the format reads rtp packets and passes them
to rtp demuxer.

3. To convert .rtp files to playable media, I use a simple command like below:

> ffmpeg -i vp8-video.rtp vp8-video.flv

The output contains the video as expected but it plays almost 2 times
faster in VLC and widows media player. The problem exists w/ other
output formats such as .avi or .mp4, too.

Can anybody suggest what is going wrong? As RTP packets contain timing
information, why ffmpeg decodes them in a faster rate? How I can fix the problem
w/o using PTS filters?

NOTE: The trans-coded audio streams do not have this problem and play
w/ right speed.
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".