Get PTS from raw H264 mdat generated by iOS AVAssetWriter
问题 I'm trying to simultaneously read and write H.264 mov file written by AVAssetWriter. I managed to extract individual NAL units, pack them into ffmpeg's AVPackets and write them into another video format using ffmpeg. It works and the resulting file plays well except the playback speed is not right. How do I calculate the correct PTS/DTS values from raw H.264 data? Or maybe there exists some other way to get them? Here's what I've tried: Limit capture min/max frame rate to 30 and assume that