<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
text-align:right;
direction:rtl;
unicode-bidi:embed;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p
{mso-style-priority:99;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
code
{mso-style-priority:99;
font-family:"Courier New";}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0cm;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:0cm;
margin-right:36.0pt;
margin-bottom:0cm;
margin-left:0cm;
margin-bottom:.0001pt;
text-align:right;
direction:rtl;
unicode-bidi:embed;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:"Courier New";}
span.EmailStyle22
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.apple-converted-space
{mso-style-name:apple-converted-space;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;
font-family:"Calibri","sans-serif";}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:316540032;
mso-list-template-ids:-1174241344;}
@list l0:level1
{mso-level-tab-stop:36.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l0:level2
{mso-level-tab-stop:72.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l0:level3
{mso-level-tab-stop:108.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l0:level4
{mso-level-tab-stop:144.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l0:level5
{mso-level-tab-stop:180.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l0:level6
{mso-level-tab-stop:216.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l0:level7
{mso-level-tab-stop:252.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l0:level8
{mso-level-tab-stop:288.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l0:level9
{mso-level-tab-stop:324.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l1
{mso-list-id:2118214349;
mso-list-type:hybrid;
mso-list-template-ids:1612630876 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l1:level1
{mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l1:level2
{mso-level-number-format:alpha-lower;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l1:level3
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
text-indent:-9.0pt;}
@list l1:level4
{mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l1:level5
{mso-level-number-format:alpha-lower;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l1:level6
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
text-indent:-9.0pt;}
@list l1:level7
{mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l1:level8
{mso-level-number-format:alpha-lower;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l1:level9
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
text-indent:-9.0pt;}
ol
{margin-bottom:0cm;}
ul
{margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal" style="text-align:left;line-height:13.5pt;background:white;vertical-align:baseline;direction:ltr;unicode-bidi:embed">
<span style="font-size:10.5pt;font-family:"Arial","sans-serif";color:black">I had fps issues when transcoding from avi to mp4(x264). Eventually the problem was in PTS and DTS values, so lines 12-15 where added before </span><span style="font-size:10.5pt;font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0cm;background:#EEEEEE">av_interleaved_write_frame</span><span style="font-size:10.5pt;font-family:"Arial","sans-serif";color:black"> function:<o:p></o:p></span></p>
<p class="MsoNormal" style="text-align:left;line-height:13.5pt;background:white;vertical-align:baseline;direction:ltr;unicode-bidi:embed">
<span style="font-size:10.5pt;font-family:"Arial","sans-serif";color:black"><o:p> </o:p></span></p>
<p class="MsoListParagraph" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt;text-align:left;text-indent:-18.0pt;mso-list:l1 level1 lfo2;text-autospace:none;direction:ltr;unicode-bidi:embed">
<![if !supportLists]><span style="font-size:10.5pt;font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0cm"><span style="mso-list:Ignore">1.<span style="font:7.0pt "Times New Roman"">
</span></span></span><![endif]><span dir="LTR"></span><span style="font-size:10.5pt;font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0cm;background:#EEEEEE">AVFormatContext* outContainer = NULL;<o:p></o:p></span></p>
<p class="MsoListParagraph" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt;text-align:left;text-indent:-18.0pt;mso-list:l1 level1 lfo2;text-autospace:none;direction:ltr;unicode-bidi:embed">
<![if !supportLists]><span style="font-size:10.5pt;font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0cm"><span style="mso-list:Ignore">2.<span style="font:7.0pt "Times New Roman"">
</span></span></span><![endif]><span dir="LTR"></span><span style="font-size:10.5pt;font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0cm;background:#EEEEEE">avformat_alloc_output_context2(&outContainer, NULL, "mp4", "c:\\test.mp4";<o:p></o:p></span></p>
<p class="MsoListParagraph" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt;text-align:left;text-indent:-18.0pt;line-height:13.5pt;mso-list:l1 level1 lfo2;background:#EEEEEE;vertical-align:baseline;direction:ltr;unicode-bidi:embed">
<![if !supportLists]><span style="font-size:10.5pt;font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0cm"><span style="mso-list:Ignore">3.<span style="font:7.0pt "Times New Roman"">
</span></span></span><![endif]><span dir="LTR"></span><span style="font-size:10.5pt;font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0cm;background:#EEEEEE">AVCodec *encoder = avcodec_find_encoder(AV_CODEC_ID_H264);<o:p></o:p></span></p>
<p class="MsoListParagraph" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt;text-align:left;text-indent:-18.0pt;line-height:13.5pt;mso-list:l1 level1 lfo2;background:#EEEEEE;vertical-align:baseline;direction:ltr;unicode-bidi:embed">
<![if !supportLists]><span style="font-size:10.5pt;font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0cm"><span style="mso-list:Ignore">4.<span style="font:7.0pt "Times New Roman"">
</span></span></span><![endif]><span dir="LTR"></span><span style="font-size:10.5pt;font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0cm;background:#EEEEEE">AVStream *outStream = avformat_new_stream(outContainer, encoder);<o:p></o:p></span></p>
<p class="MsoListParagraph" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt;text-align:left;text-indent:-18.0pt;line-height:13.5pt;mso-list:l1 level1 lfo2;background:#EEEEEE;vertical-align:baseline;direction:ltr;unicode-bidi:embed">
<![if !supportLists]><span style="font-size:10.5pt;font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0cm"><span style="mso-list:Ignore">5.<span style="font:7.0pt "Times New Roman"">
</span></span></span><![endif]><span dir="LTR"></span><span style="font-size:10.5pt;font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0cm;background:#EEEEEE">// outStream->codec initiation<o:p></o:p></span></p>
<p class="MsoListParagraph" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt;text-align:left;text-indent:-18.0pt;line-height:13.5pt;mso-list:l1 level1 lfo2;background:#EEEEEE;vertical-align:baseline;direction:ltr;unicode-bidi:embed">
<![if !supportLists]><span style="font-size:10.5pt;font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0cm"><span style="mso-list:Ignore">6.<span style="font:7.0pt "Times New Roman"">
</span></span></span><![endif]><span dir="LTR"></span><span style="font-size:10.5pt;font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0cm;background:#EEEEEE">// ...<o:p></o:p></span></p>
<p class="MsoListParagraph" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt;text-align:left;text-indent:-18.0pt;mso-list:l1 level1 lfo2;text-autospace:none;direction:ltr;unicode-bidi:embed">
<![if !supportLists]><span style="font-size:10.5pt;font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0cm"><span style="mso-list:Ignore">7.<span style="font:7.0pt "Times New Roman"">
</span></span></span><![endif]><span dir="LTR"></span><span style="font-size:10.5pt;font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0cm;background:#EEEEEE">avformat_write_header(outContainer, NULL);<o:p></o:p></span></p>
<p class="MsoNormal" style="text-align:left;line-height:13.5pt;background:#EEEEEE;vertical-align:baseline;direction:ltr;unicode-bidi:embed">
<span style="font-size:10.5pt;font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0cm;background:#EEEEEE"><o:p> </o:p></span></p>
<p class="MsoListParagraph" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt;text-align:left;text-indent:-18.0pt;line-height:13.5pt;mso-list:l1 level1 lfo2;background:#EEEEEE;vertical-align:baseline;direction:ltr;unicode-bidi:embed">
<![if !supportLists]><span style="font-size:10.5pt;font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0cm"><span style="mso-list:Ignore">8.<span style="font:7.0pt "Times New Roman"">
</span></span></span><![endif]><span dir="LTR"></span><span style="font-size:10.5pt;font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0cm;background:#EEEEEE">// reading and decoding packet<o:p></o:p></span></p>
<p class="MsoListParagraph" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt;text-align:left;text-indent:-18.0pt;line-height:13.5pt;mso-list:l1 level1 lfo2;background:#EEEEEE;vertical-align:baseline;direction:ltr;unicode-bidi:embed">
<![if !supportLists]><span style="font-size:10.5pt;font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0cm"><span style="mso-list:Ignore">9.<span style="font:7.0pt "Times New Roman"">
</span></span></span><![endif]><span dir="LTR"></span><span style="font-size:10.5pt;font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0cm;background:#EEEEEE">// ...<o:p></o:p></span></p>
<p class="MsoListParagraph" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt;text-align:left;text-indent:-18.0pt;line-height:13.5pt;mso-list:l1 level1 lfo2;background:#EEEEEE;vertical-align:baseline;direction:ltr;unicode-bidi:embed">
<![if !supportLists]><span style="font-size:10.5pt;font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0cm"><span style="mso-list:Ignore">10.</span></span><![endif]><span dir="LTR"></span><span style="font-size:10.5pt;font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0cm;background:#EEEEEE">avcodec_encode_video2(outStream->codec,
&encodedPacket, decodedFrame, &got_frame)<o:p></o:p></span></p>
<p class="MsoListParagraph" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt;text-align:left;text-indent:-18.0pt;line-height:13.5pt;mso-list:l1 level1 lfo2;background:#EEEEEE;vertical-align:baseline;direction:ltr;unicode-bidi:embed">
<![if !supportLists]><span style="font-size:10.5pt;font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0cm"><span style="mso-list:Ignore">11.</span></span><![endif]><span dir="LTR"></span><span style="font-size:10.5pt;font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0cm;background:#EEEEEE"><o:p> </o:p></span></p>
<p class="MsoListParagraph" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt;text-align:left;text-indent:-18.0pt;line-height:13.5pt;mso-list:l1 level1 lfo2;background:#EEEEEE;vertical-align:baseline;direction:ltr;unicode-bidi:embed">
<![if !supportLists]><span style="font-size:10.5pt;font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0cm"><span style="mso-list:Ignore">12.</span></span><![endif]><span dir="LTR"></span><span style="font-size:10.5pt;font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0cm;background:#EEEEEE">if
(encodedPacket.pts != AV_NOPTS_VALUE)<o:p></o:p></span></p>
<p class="MsoListParagraph" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt;text-align:left;text-indent:-18.0pt;line-height:13.5pt;mso-list:l1 level1 lfo2;background:#EEEEEE;vertical-align:baseline;direction:ltr;unicode-bidi:embed">
<![if !supportLists]><span style="font-size:10.5pt;font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0cm"><span style="mso-list:Ignore">13.</span></span><![endif]><span dir="LTR"></span><span style="font-size:10.5pt;font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0cm;background:#EEEEEE">encodedPacket.pts
= av_rescale_q(encodedPacket.pts, outStream->codec->time_base, outStream->time_base);<o:p></o:p></span></p>
<p class="MsoListParagraph" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt;text-align:left;text-indent:-18.0pt;line-height:13.5pt;mso-list:l1 level1 lfo2;background:#EEEEEE;vertical-align:baseline;direction:ltr;unicode-bidi:embed">
<![if !supportLists]><span style="font-size:10.5pt;font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0cm"><span style="mso-list:Ignore">14.</span></span><![endif]><span dir="LTR"></span><span style="font-size:10.5pt;font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0cm;background:#EEEEEE">if
(encodedPacket.dts != AV_NOPTS_VALUE)<o:p></o:p></span></p>
<p class="MsoListParagraph" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt;text-align:left;text-indent:-18.0pt;line-height:13.5pt;mso-list:l1 level1 lfo2;background:#EEEEEE;vertical-align:baseline;direction:ltr;unicode-bidi:embed">
<![if !supportLists]><span style="font-size:10.5pt;font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0cm"><span style="mso-list:Ignore">15.</span></span><![endif]><span dir="LTR"></span><span style="font-size:10.5pt;font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0cm;background:#EEEEEE">encodedPacket.dts
= av_rescale_q(encodedPacket.dts, outStream->codec->time_base, outStream->time_base);<o:p></o:p></span></p>
<p class="MsoListParagraph" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt;text-align:left;text-indent:-18.0pt;line-height:13.5pt;mso-list:l1 level1 lfo2;background:#EEEEEE;vertical-align:baseline;direction:ltr;unicode-bidi:embed">
<![if !supportLists]><span style="font-size:10.5pt;font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0cm"><span style="mso-list:Ignore">16.</span></span><![endif]><span dir="LTR"></span><span style="font-size:10.5pt;font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0cm;background:#EEEEEE"><o:p> </o:p></span></p>
<p class="MsoListParagraph" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt;text-align:left;text-indent:-18.0pt;mso-list:l1 level1 lfo2;text-autospace:none;direction:ltr;unicode-bidi:embed">
<![if !supportLists]><span style="font-size:10.5pt;font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0cm"><span style="mso-list:Ignore">17.</span></span><![endif]><span dir="LTR"></span><span style="font-size:10.5pt;font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0cm;background:#EEEEEE">av_interleaved_write_frame(outContainer,
&encodedPacket)<o:p></o:p></span></p>
<p class="MsoListParagraph" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt;text-align:left;text-autospace:none;direction:ltr;unicode-bidi:embed">
<span style="font-size:10.5pt;font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0cm;background:#EEEEEE"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-bottom:12.0pt;text-align:left;line-height:13.5pt;background:white;vertical-align:baseline;direction:ltr;unicode-bidi:embed">
<span style="font-size:10.5pt;font-family:"Arial","sans-serif";color:black">After reading many posts I still do not understand:<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:22.5pt;text-align:left;text-indent:-18.0pt;line-height:13.5pt;mso-list:l0 level1 lfo4;vertical-align:baseline;direction:ltr;unicode-bidi:embed">
<![if !supportLists]><span style="font-size:10.5pt;font-family:"Arial","sans-serif";color:black"><span style="mso-list:Ignore">1.<span style="font:7.0pt "Times New Roman"">
</span></span></span><![endif]><span dir="LTR"></span><span style="font-size:10.5pt;font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0cm;background:#EEEEEE">outStream->codec->time_base</span><span style="font-size:10.5pt;font-family:"Arial","sans-serif";color:black"> =
1/25 and </span><span style="font-size:10.5pt;font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0cm;background:#EEEEEE">outStream->time_base</span><span style="font-size:10.5pt;font-family:"Arial","sans-serif";color:black"> = 1/12800. The
1st one was set by me but I cannot figure out why and who set 12800? I noticed that before line (7)
</span><span style="font-size:10.5pt;font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0cm;background:#EEEEEE">outStream->time_base</span><span style="font-size:10.5pt;font-family:"Arial","sans-serif";color:black"> = 1/90000 and right after
it it changes to 1/12800, why?<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:22.5pt;text-align:left;line-height:13.5pt;vertical-align:baseline;direction:ltr;unicode-bidi:embed">
<span style="font-size:10.5pt;font-family:"Arial","sans-serif";color:black">When I transcode from avi to avi, meaning changing the line (2) to
</span><span style="font-size:10.5pt;font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0cm;background:#EEEEEE">avformat_alloc_output_context2(&outContainer, NULL, "avi", "c:\\test.avi";</span><span style="font-size:10.5pt;font-family:"Arial","sans-serif";color:black">
, so before and after line (7) </span><span style="font-size:10.5pt;font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0cm;background:#EEEEEE">outStream->time_base</span><span style="font-size:10.5pt;font-family:"Arial","sans-serif";color:black">
remains always 1/25 and not like in mp4 case, why?<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:22.5pt;text-align:left;text-indent:-18.0pt;line-height:13.5pt;mso-list:l0 level1 lfo4;vertical-align:baseline;direction:ltr;unicode-bidi:embed">
<![if !supportLists]><span style="font-size:10.5pt;font-family:"Arial","sans-serif";color:black"><span style="mso-list:Ignore">2.<span style="font:7.0pt "Times New Roman"">
</span></span></span><![endif]><span dir="LTR"></span><span style="font-size:10.5pt;font-family:"Arial","sans-serif";color:black">What is the difference between </span><span style="font-size:10.5pt;font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0cm;background:#EEEEEE">time_base</span><span style="font-size:10.5pt;font-family:"Arial","sans-serif";color:black"> of </span><span style="font-size:10.5pt;font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0cm;background:#EEEEEE">outStream->codec</span><span style="font-size:10.5pt;font-family:"Arial","sans-serif";color:black"> and </span><span style="font-size:10.5pt;font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0cm;background:#EEEEEE">outStream</span><span style="font-size:10.5pt;font-family:"Arial","sans-serif";color:black">?<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:22.5pt;text-align:left;text-indent:-18.0pt;line-height:13.5pt;mso-list:l0 level1 lfo4;vertical-align:baseline;direction:ltr;unicode-bidi:embed">
<![if !supportLists]><span style="font-size:10.5pt;font-family:"Arial","sans-serif";color:black"><span style="mso-list:Ignore">3.<span style="font:7.0pt "Times New Roman"">
</span></span></span><![endif]><span dir="LTR"></span><span style="font-size:10.5pt;font-family:"Arial","sans-serif";color:black">To calc the pts </span><span style="font-size:10.5pt;font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0cm;background:#EEEEEE">av_rescale_q</span><span style="font-size:10.5pt;font-family:"Arial","sans-serif";color:black"> does:
takes 2 </span><span style="font-size:10.5pt;font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0cm;background:#EEEEEE">time_base</span><span style="font-size:10.5pt;font-family:"Arial","sans-serif";color:black">, multiplies their fractions
in cross and then compute the pts. Why it does this in this way? As I debugged, the </span><span style="font-size:10.5pt;font-family:Consolas;color:black;border:none windowtext 1.0pt;padding:0cm;background:#EEEEEE">encodedPacket.pts</span><span style="font-size:10.5pt;font-family:"Arial","sans-serif";color:black"> has
value incremental by 1, so why changing it if it does has value?<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:22.5pt;text-align:left;text-indent:-18.0pt;line-height:13.5pt;mso-list:l0 level1 lfo4;vertical-align:baseline;direction:ltr;unicode-bidi:embed">
<![if !supportLists]><span style="font-size:10.5pt;font-family:"Arial","sans-serif";color:black"><span style="mso-list:Ignore">4.<span style="font:7.0pt "Times New Roman"">
</span></span></span><![endif]><span dir="LTR"></span><span style="font-size:10.5pt;font-family:"Arial","sans-serif";color:black">At the beginning the dts value is -2 and after each rescaling it still has negative number, but despite this the video played correctly!
Shouldn't it be positive?<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:22.5pt;text-align:left;line-height:13.5pt;vertical-align:baseline;direction:ltr;unicode-bidi:embed">
<span style="font-size:10.5pt;font-family:"Arial","sans-serif";color:black"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-bottom:12.0pt;text-align:left;line-height:13.5pt;background:white;vertical-align:baseline;direction:ltr;unicode-bidi:embed">
<span style="font-size:10.5pt;font-family:"Arial","sans-serif";color:black">Thanks.<o:p></o:p></span></p>
<p class="MsoNormal" style="text-align:left;direction:ltr;unicode-bidi:embed"><o:p> </o:p></p>
</div>
</body>
</html>