Hopefully someone can explain the following results.
I have a source video.mp4 x264/aac 29.97 fps. Variable Frame rate/ Progressive
It is variable frame rate so in order to convert to Constant frame rate (this always worked before) I use FFMpeg as follows:
Then combining the source-video.h264 and copying the audio from the original and outputting to MP4 again:Code:ffmpeg -i source.mp4 -map 0:v -vcodec copy -bsf:v h264_mp4toannexb source-video.h264
Code:ffmpeg -fflags +genpts -r 29.97 -i "C:\Path\source-video.h264" -i "C:\Path\source.mp4" -map 0:0 -map 1:1 -c:v copy -c:a copy -f mp4 "C:\Path\video_CFR.MP4"
I seems to play fine and merges with other converted (CFR) segments but the PTS times seem to be messed up on this one. FFprobe outputs:
Best Effort Timezstamps are:No. pts_time type
0 0.066733 0 B
1 0.033367 0 B
2 0.100100 0 B
3 0.000000 0 P
4 0.200200 0 B
5 0.166834 0 B
6 0.233567 0 B
7 0.133467 0 P
8 0.333667 0 B
9 0.300300 0 B
10 0.367034 0 B
11 0.266934 0 P
12 0.467134 0 B
13 0.433767 0 B
14 0.500501 0 B
15 0.400400 0 P
16 0.600601 0 B
17 0.567234 0 B
18 0.633967 0 B
19 0.533867 0 P
20 0.734067 0 B
0.066733
0.1001
0.133467
0.166834
0.2002
0.233567
0.266934
0.3003
0.333667
0.367034
0.4004
0.433767
0.467134
0.500501
0.533867
0.567234
0.600601
If anyone knows how it can play ok but have PTS times that bounce forward and then backward, it would really help.
Thank You.
+ Reply to Thread
Results 1 to 3 of 3
-
-
If anyone knows how it can play ok but have PTS times that bounce forward and then backward, it would really help.
The time when the frame needs to be loaded into memory differs from the time it is represented.
This is normal when references can be used into both directions of the time line.
The Decode Time Stamp (DTS) indicates the time at which an access unit should be instantaneously removed from the receiver buffer and decoded. It differs from the Presentation Time Stamp (PTS) only when picture reordering is used for B pictures. If DTS is used, PTS must also be provided in the bit stream.
PTS (or DTS) is entered in the bitstream at intervals not exceeding 700 mS. ATSC further constrains PTS (or DTS) to be inserted at the beginning of each access unit.
Cu Selur
Ps.: when working with ffmpeg and messing with time stamps you should read up on some of the MPEG basics regarding time stamps to understand what you are doing.users currently on my ignore list: deadrats, Stears555, marcorocchini -
@selur. Thank you for that explanation and those links . I had read an thought I understood pts/dts functions but not in the clear manner you gave. I will continue to read and understand more if I get the chance.
It makes a lot if sense also since the produced video has a LOT of B frames between I frames without P frames.
Thank you again
Similar Threads
-
H265 to H264 conversion
By carlmart in forum Video ConversionReplies: 1Last Post: 7th Sep 2019, 10:11 -
FFMPEG Help with PCR / PTS timing
By KPI100 in forum DVB / IPTVReplies: 1Last Post: 7th Jun 2019, 13:22 -
Problem with Virtualdub, wrong frame times
By Alice in forum Newbie / General discussionsReplies: 3Last Post: 4th Jul 2018, 14:27 -
Do all pts times need to be 0 for all merge
By Budman1 in forum Video ConversionReplies: 7Last Post: 8th Jun 2018, 10:31 -
H264 conversion problem Virtualdub
By Shadowofthedarkgod in forum Video ConversionReplies: 11Last Post: 8th Nov 2015, 13:42