Re: [FFmpeg-user] To make a PTS, FFmpeg is truncating *up*
On 15/02/2024 13.55, Diederick C. Niehorster wrote: Hi Mark, On Thu, Feb 15, 2024, 19:42 Mark Filipak wrote: Here is my first finding. Can someone who reads 'C' code locate the code and investigate? As told to you many times now, you need to provide a complete command line, with accessible input files, so that others can reproduce. Else no one can help investigate, should they wish to. This is not an ordinary how-do-I-make-this-work issue. This is part of a long investigation. Typical commands I've used are these: ffmpeg -copyts -i this.m2ts -map 0 -bsf:v noise=drop='lt(pts\,2854113)+gt(pts\,504223732)' -bsf:a noise=drop='lt(pts\,2854113)+gt(pts\,504223732)' -bsf:s noise=drop='lt(pts\,2854113)+gt(pts\,504223732)' %CODE% -muxdelay 0 that.m2ts -- which worked. ffmpeg -copyts -i "concat:that1.m2ts|that2.m2ts" -map 0 -c copy -dn -muxdelay 0 that3.m2ts -- which worked. that3.m2ts has beautiful structure, like it was mastered as a single video, not joined from trims of two other videos. Except, it has a glitch. The glitch appears to result from bad PTSs. I noticed that FFmpeg is truncating badly. I don't know what I would post, or how. I have tons of material. I need someone who has great knowledge of the source code to help me. Contact me directly and I'll share all I have. I'll tell you one thing: ffmpeg -ss -i this.m2ts -map 0 -c copy -sn -dn that.m2ts is junk. --Mark. ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] To make a PTS, FFmpeg is truncating *up*
Hi Mark, On Thu, Feb 15, 2024, 19:42 Mark Filipak wrote: > Here is my first finding. > Can someone who reads 'C' code locate the code and investigate? > As told to you many times now, you need to provide a complete command line, with accessible input files, so that others can reproduce. Else no one can help investigate, should they wish to. Cheers, Dee > ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-user] To make a PTS, FFmpeg is truncating *up*
Here is my first finding. Can someone who reads 'C' code locate the code and investigate? It looks suspicious to me because everywhere else, timestamps appear to be truncated in the usual way. Here, to make a PTS, FFmpeg is truncating _up_. If N*3753.75 is an integer, it's used as PTS. But if N*3753.75 is a decimal, the PTS becomes int(N*3753.75 + 1). Here's the proof: 133559*3753.75+2854113=504201209.25 /¯¯¯ 0, 504201210, 504201210, 3753, 608, 0xdece0f07 Frame 133559 is a B-frame near where I've joined two sections that have both been trimmed on both ends. I chose that frame for no particular reason. The joined video and audio packet streams appear to be perfectly timestamped, but there is 3 frames of flashing ...black-black-picture-black-picture-black-picture-black-picture-picture... at the join preceded by a 1 second jump in MPV. I'm crawling through the framecrc listings of three videos: The 'prefix' video that has been trimmed. The 'suffix' video that has been trimmed. The 'join' video after 'prefix' & 'suffix' have been joined. Everything looks beautiful. Even the audio packets appear to be smoothly joined. But I'm crawling thorough it all checking everything. I stopped to compose this message because the truncations bother me. I really need some assistance. This is insanely meticulous work. --Mark. ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".