I just wanted to give an update on how I fixed it. When demuxing mpegts that is carrying interlaced video, every other video packet read from the demux will have AV_NOPTS_VALUE for PTS and DTS. I had setup a check for when the PTS of the packet is negative, the app would throw the packet away. Turns out that AV_NOPTS_VALUE equates to a very large negative number, and the app was throwing away every other video packet.
After stopping the packets from being thrown away, I found that I now had to generate the DTS for the packets that have AV_NOPTS_VALUE in order to make the DTS monotonically increasing. To do this, I calculate the average duration per packet, and add that to the last packet's DTS value. I know have everything working. Thanks for the help. On Tue, Nov 10, 2015 at 10:19 PM, Luca Barbato <lu_z...@gentoo.org> wrote: > On 10/11/15 17:10, Alex Anderson wrote: > > Hello, > > > > I am using Libav to remux an mpegts stream into an FLV stream and > > publishing the stream to an RTMP server. The TS contains H.264 and AAC. > > Whenever the encoded video is progressive, the remuxing and streaming > > works great. Whenever the encoded video is interlaced and I pull down > > the stream from the server, VLC fails to play the stream. Our in-house > > decoder is able to play the stream, but there are artifacts on the > > parts of the video where there is motion. I should note that we use an > > in-house encoder, and can confirm that it encodes interlaced content > > correctly. > > > So, I was wondering if anyone could tell me how interlaced video needs > > to be handled differently than progressive. Are there some fields I > > need to set in the context structures? Filter to use? Limitation of > > the FLV muxing perhaps? > > My guess is that the problem is in the h264 bitstream parsing/formatting > that avconv does and you probably arent doing. > > check do_streamcopy() and av_parser_change() in particular. > > lu > _______________________________________________ > libav-api mailing list > libav-api@libav.org > https://lists.libav.org/mailman/listinfo/libav-api > -- *Alex Anderson |* Software Engineer w. 814.235.1111 x383 e. alex.ander...@videon-central.com <http://www.videon-central.com> <https://www.linkedin.com/company/videon-central> <https://twitter.com/Videon_Central> <https://www.facebook.com/videon.central> <https://plus.google.com/u/0/104238493788225182046/posts> -- *EMAIL CONFIDENTIALITY STATEMENT: This email, including any attachments hereto, may contain confidential and/or proprietary information of Videon Central, Inc., and/or may include information controlled for export purposes under the U.S. International Traffic in Arms Regulations (ITAR) and is intended for the recipient only. No export, sale, transfer, release or other disposition of this information is permitted without prior authorization. If you are not the intended recipient please 1) do not disclose, copy, distribute or use this message or its contents to any other person or entity. 2) advise the sender by return e-mail, and 3) delete all copies, including attachments, from your computer. Your cooperation is greatly appreciated.* _______________________________________________ libav-api mailing list libav-api@libav.org https://lists.libav.org/mailman/listinfo/libav-api