H.264 video packet duration missing I have H.264 files that, when I run FFprobe on them, like this:

ffprobe -i h264_file.ts -show_packets -select_streams v


...it shows that each video packet has no values for duration, and no value for duration_time, like this:


...
[PACKET]
codec_type=video
stream_index=0
pts=8098077717
pts_time=89978.641300
dts=8098077717
dts_time=89978.641300
**duration=N/A
duration_time=N/A
convergence_duration=N/A
convergence_duration_time=N/A**
size=2354
pos=14633920
flags=_
[/PACKET]
...



My question is, other than re-encoding the file, and assuming I know the source to be 60 fps, is there a way to correct this video packet duration?

I know I can do it by re-encoding - I have done so successfully.  But I am wondering if there is an easier and faster way of doing it.
I don't have a sample of your file so I don't know if this fixes it or not, but have you tried a simple remux?

ffmpeg -y -i h264_file.ts -c copy remuxed.ts


This is also basically the same thing, but helpful if you want video and audio in separate files before you remux:

ffmpeg -y -i h264_file.ts -map 0:0 -c:v copy -muxdelay 0 video.ts -map 0:1 -c:a copy -muxdelay 0 audio.ts
ffmpeg -y -copyts -i video.ts -i audio.ts -c copy remuxed.ts


You could also try reencoding audio but copying video.  Encoding audio but copying video will be fast and usually concerns about reencoding loss is a lot less significant with audio.  (Use audio synchronization, see -async in documentation.)