>* The first error you quoted (non monotonic timestamps) means that you
*>* called av_write_frame() two times with the dame PTS or DTS value. Since
*>* two different frames cannot have the same timestamp, this is an error,
*>* and the library is complaining. If you do not believe this theory, try
*>* printing the PTS and DTS before calling av_write_frame().
*>*
*>*                             Luca*




Hi, i have the same problem as you did Vladimir and i didnt understand how
you fixed it.  I'm using av_rescale_q() and the return value is always 0. My
problem is at the audio stream and i'm using av_interleaved_write_frame().

I tried this Luca and the values are this ones.

Input #0, mpeg, from '/dev/video':
  Duration: N/A, start: 3.889422, bitrate: 8224 kb/s
    Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 720x480 [PAR 8:9 DAR
4:3], 8000 kb/s, 29.97 tb(r)
    Stream #0.1[0x1c0]: Audio: mp2, 48000 Hz, stereo, 224 kb/s
Output #0, mpeg, to '/home/tempvideo/video1.mpeg':
    Stream #0.0: Video: mpeg2video, yuv420p, 720x480, q=2-31, 8000 kb/s,
29.97 tb(r)
    Stream #0.1: Audio: mp2, 48000 Hz, stereo, 224 kb/s
audio_coded_frame [ 0]
audio pkt dts  [-9223372036854775808.00]
audio pkt pts  [0.00]
audio_out coded pts[ 0]
audio out codec cur_dts [-9223372036854775808.00]
audio out start_time [1206481418467034.00]
audio out last_IP [-9223372036854775808.00]
=================================
video_coded_frame [ 0]
video pkt dts [-9223372036854775808.00]
video pkt pts [0.00]
video codec pts [0.00]
video out cur_dts [-9223372036854775808.00]
video out start_time [1206480605184519.00]
video out last_IP [-9223372036854775808.00]
=================================
video_coded_frame [ 1]
video pkt dts [-9223372036854775808.00]
video pkt pts [3600.00]
video codec pts [1.00]
video out cur_dts [0.00]
video out start_time [1206481418466617.00]
video out last_IP [-9223372036854775808.00]
==================================
audio_coded_frame [ 0]
audio pkt dts  [-9223372036854775808.00]
audio pkt pts  [0.00]
audio_out coded pts[ 0]
audio out codec cur_dts [-9223372036854775808.00]
audio out start_time [1206481418467034.00]
audio out last_IP [-9223372036854775808.00]
=====================================
error, non monotone timestamps 28800 >= 0
error writing audio Frame


Do i have to start another variable or what do i need to add to the code to
make it work.
Thanks in advance.
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to