Hi, NVs,
My env is: jetpack4.6, deepstream6.0, python version
I save the mp4 file by filesink in my pipeline and want to dynamic change the video name in pipeline runing. But I find that I cant open the video from second video, though the size of video is normal. I guess it is caused by my operation and lost some important config.
Can you help me check it? Thanks.
if not on_recording[frame_meta.pad_index]:
# pdb.set_trace()
print("------------------> stream {} start recording".format(frame_meta.pad_index))
on_recording[frame_meta.pad_index] = True
filesink[frame_meta.pad_index].set_state(Gst.State.NULL)
dt = datetime.datetime.now().strftime('%Y-%m-%d-%H-%M-%S')
videoname[frame_meta.pad_index] = "stream_{}_{}.mp4".format(frame_meta.pad_index, dt)
filesink[frame_meta.pad_index].set_property("location", videoname[frame_meta.pad_index])
filesink[frame_meta.pad_index].set_property("sync", 0)
filesink[frame_meta.pad_index].set_property("async", 0)
frame_num[frame_meta.pad_index] = 0
filesink[frame_meta.pad_index].set_state(Gst.State.PLAYING)
elif(frame_num[frame_meta.pad_index] >= RECOEDING_FRAME_NUM):
print("------------------> stream {} stop recording".format(frame_meta.pad_index))
on_recording[frame_meta.pad_index] = False
os.system("mv {} ./result/".format(videoname[frame_meta.pad_index]))
else:
pass