How can I insert a frame at a specific index into a video using ffmpeg or opencv

We are designing the data hiding in the video. We want to hide the data in one of the frames of the video file, and the frame number will be saved in the audio file. Hiding information in a frame works in our case.

I have 2 questions 1. I can extract the frame from position N in the video, but I do not know how to insert the modified frame back into the video. I tried the following command, but this leads to video loss

[ ffmpeg -i Wildlife.wmv -f image2 -i "D:/testing/2.png" -f image2 -filter_complex "[0:v][1:v]overlay=enable='between(n,450,451)'[out]" -map "[out]" -r 25 -c:v png "D:/testing/output.wmv" -y ]

  1. Extracting the output video changes the quality and size of the video.

Please help me with ffmpeg or any other infrastructure that provides this functionality

+4
source share

Source: https://habr.com/ru/post/1570279/


All Articles