Good Day,

I got an older Sony handycam that makes 00000.MTS type files. It does record the date and time in them, which it can optionally display during playback.

And ffplay also displays the correct date and time as a text overlay while vlc does not and youtube does not show the timestamp.

I would like to simply burn in the timestamps to each frame so the date and time shows on youtube.

I tried this:

ffmpeg -i 00000.MTS -vf "drawtext=fontsize=60:fontcolor=black:text='%{pts\:gmtime}':x=(w-text_w):y=(h-text_h)" -acodec mp3 -y output.mp4

And that almost works, but it starts the date at "1970-01-01 00:00:00" and counts up.

Below is a couple of frames from ffprobe -- the first 117 output lines from ffprobe -show_frames 00000.MTS

I know ffmpeg can do this because ffplay displays it correctly. I just cannot for the life of me figure out how to make it burn it into the frame images!

I notice that timecode is always 00:00:00:00 in the output of ffprobe:

[TIMECODE]
value=00:00:00:00
[/TIMECODE]

And in: TAG:timecode=00:00:00:00

Those fields are always the same.

Thank you very much for any ideas for me to try!

~Jesse

[SUBTITLE]
media_type=subtitle
pts=1016689
pts_time=1.016689
format=0
start_display_time=0
end_display_time=4294967295
num_rects=1
[/SUBTITLE]
[FRAME]
media_type=audio
stream_index=1
key_frame=1
pkt_pts=91502
pkt_pts_time=1.016689
pkt_dts=91502
pkt_dts_time=1.016689
best_effort_timestamp=91502
best_effort_timestamp_time=1.016689
pkt_duration=2880
pkt_duration_time=0.032000
pkt_pos=59520
pkt_size=1024
sample_fmt=fltp
nb_samples=1536
channels=2
channel_layout=stereo
[SIDE_DATA]
side_data_type=AVMatrixEncoding
[/SIDE_DATA]
[SIDE_DATA]
side_data_type=Metadata relevant to a downmix procedure
[/SIDE_DATA]
[/FRAME]
[FRAME]
media_type=video
stream_index=0
key_frame=1
pkt_pts=91502
pkt_pts_time=1.016689
pkt_dts=91501
pkt_dts_time=1.016678
best_effort_timestamp=91502
best_effort_timestamp_time=1.016689
pkt_duration=1501
pkt_duration_time=0.016678
pkt_pos=768
pkt_size=214628
width=1920
height=1080
pix_fmt=yuv420p
sample_aspect_ratio=1:1
pict_type=I
coded_picture_number=0
display_picture_number=0
interlaced_frame=0
top_field_first=0
repeat_pict=0
color_range=unknown
color_space=unknown
color_primaries=unknown
color_transfer=unknown
chroma_location=left
TAG:timecode=00:00:00:00
[SIDE_DATA]
side_data_type=H.26[45] User Data Unregistered SEI message
[/SIDE_DATA]
[SIDE_DATA]
side_data_type=H.26[45] User Data Unregistered SEI message
[/SIDE_DATA]
[SIDE_DATA]
side_data_type=H.26[45] User Data Unregistered SEI message
[/SIDE_DATA]
[SIDE_DATA]
side_data_type=SMPTE 12-1 timecode
[TIMECODE]
value=00:00:00:00
[/TIMECODE]
[/SIDE_DATA]
[/FRAME]
[FRAME]
media_type=video
stream_index=0
key_frame=0
pkt_pts=93003
pkt_pts_time=1.033367
pkt_dts=93003
pkt_dts_time=1.033367
best_effort_timestamp=93003
best_effort_timestamp_time=1.033367
pkt_duration=1501
pkt_duration_time=0.016678
pkt_pos=232320
pkt_size=30575
width=1920
height=1080
pix_fmt=yuv420p
sample_aspect_ratio=1:1
pict_type=P
coded_picture_number=1
display_picture_number=0
interlaced_frame=0
top_field_first=0
repeat_pict=0
color_range=unknown
color_space=unknown
color_primaries=unknown
color_transfer=unknown
chroma_location=left
TAG:timecode=00:00:00:00
[SIDE_DATA]
side_data_type=SMPTE 12-1 timecode
[TIMECODE]
value=00:00:00:00
[/TIMECODE]
[/SIDE_DATA]
[/FRAME]


_______________________________________________
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".

Reply via email to