[Libav-user] PTS values and writing encoded audio and video frames ?

Gagandeep Bawa gagandeep.bawa at ironroad.com
Thu Apr 12 08:31:37 CEST 2012


You have to check your video frame rate. I worked on IPhone recorded videos
files and it varies between 15 to 30.

On Thu, Apr 12, 2012 at 11:58 AM, ashika umanga <umanga.forums at gmail.com>wrote:

> When I encode an OGG file with Theora+Speex , my video length is longer
> than the audio playback.
> Anytips on this ?
>
> On Thu, Apr 12, 2012 at 2:51 PM, Gagandeep Bawa <
> gagandeep.bawa at ironroad.com> wrote:
>
>> Hi,
>>
>> These PTS and DTS used for sync between audio and video data while
>> encoding and presentation. Check below link for more details.
>>
>> *http://dranger.com/ffmpeg/tutorial05.html*
>>
>> Thanks,
>> Gagan
>>
>> On Thu, Apr 12, 2012 at 11:14 AM, ashika umanga <umanga.forums at gmail.com>wrote:
>>
>>> Greetings all,
>>>
>>> I am writing a wrapper class for video/audio encoding by following the
>>> "muxing.c".
>>> http://ffmpeg.org/doxygen/trunk/muxing_8c-source.html
>>>
>>> I see in the example that before writing frames to the file ,is checks
>>> whether the PTS value of audiostream is
>>> lesser than that of videostream.
>>>
>>> code snippet:
>>>
>>>  if (!video_st || (video_st && audio_st && audio_pts < video_pts)) {
>>>             write_audio_frame(oc, audio_st);
>>>         } else {
>>>             write_video_frame(oc, video_st);
>>>             picture->pts++;
>>>         }
>>>
>>> Can someone explain why this test is done? Whats the connection between
>>> PTS values ?
>>>
>>>
>>>
>>> _______________________________________________
>>> Libav-user mailing list
>>> Libav-user at ffmpeg.org
>>> http://ffmpeg.org/mailman/listinfo/libav-user
>>>
>>>
>>
>>
>> _______________________________________________
>> Libav-user mailing list
>> Libav-user at ffmpeg.org
>> http://ffmpeg.org/mailman/listinfo/libav-user
>>
>>
>
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user
>
>


-- 

Thanks & Regards,
Gagandeep, Tech Lead Mobility

+91- 7307470044

-------------------------------------------------------------------------------

Ironroad IT India Pvt. Ltd.

IT-6, C-6,SEBIZ SQUARE, Sector-67, Mohali, Punjab, India
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20120412/2360e300/attachment.html>


More information about the Libav-user mailing list