Recherche avancée

Médias (0)

Mot : - Tags -/xmp

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (65)

Sur d’autres sites (13842)

  • An x264-encoded video only with P frames and a different video for I frame

    24 mai 2018, par MSD Paul

    Suppose I have 5 frames, I encode first one as the I or reference frame and all other as P frames in one video using x264 codec.

    In this case, is it possible to have 2 videos, one only with an I frame and another frame only with 4 P frames ?

    To decode all 4 P frames, I require the first I frame video but can we construct the videos in this way ?

  • How to get video frames from h264 video using FFMPEG in ios

    22 avril 2015, par narendrakumar b

    how to use SampleBuffer, for decoding the video in iOS Refer this link .I want to use frames in SampleBuffer. How can i pass the data into SampleBuffer.

    Any Suggestions or reference links can be invited.

    Thanks in Advance

  • Find frames in the video that are similar to the static image, to crop the video

    13 septembre 2024, par Nguyen Van Kufu

    I use opencv with ffmpeg to cut the video. Specifically, find the frame in the video that is the same as the picture, then cut the video at the time the video frame is the same as the picture.

    


    I found the code on google and edited it according to my needs, but when it comes to comparing frames and still images, I don't know how to ask you to add a comparison section to cut the video.

    


    import numpy as np
import cv2
import time
from skimage.metrics import structural_similarity as compare_ssim

hinh = cv2.imread("f:\\x.png")
hinh1 = cv2.resize(hinh, (500, 300))
cap = cv2.VideoCapture('f:\\tt.mp4')
prev_frame_time = 0
new_frame_time = 0
cv2.imshow('hinh', hinh1)

while(cap.isOpened()):
    ret, frame = cap.read()

    if not ret:
        break

    gray = frame

    gray = cv2.resize(gray, (500, 300))
    font = cv2.FONT_HERSHEY_SIMPLEX
    new_frame_time = time.time()

    fps = 1/(new_frame_time-prev_frame_time)
    prev_frame_time = new_frame_time

    fps = int(fps)

    fps = str(fps)

    cv2.putText(gray, fps, (7, 70), font, 3, (100, 255, 0), 3, cv2.LINE_AA)
    ##############

    # displaying the frame with fps

    cv2.imshow('frame', gray)

    # press 'Q' if you want to exit
    if cv2.waitKey(1) & 0xFF == ord('q'):
        break

cap.release()
cv2.destroyAllWindows()