How to convert image sequence to video using opencv and python(010)

Поділитися
Вставка
  • Опубліковано 15 вер 2024
  • How to convert sequence of frames to a video using opencv and python.
    Code: drive.google.c...
    Sorry for bad audio quality.

КОМЕНТАРІ • 31

  • @frames123
    @frames123  Рік тому

    You can also use other videoWriter fourccs' which change the encoding methods, i.e, it can solve your file not supported errors. Just replace 'mp4v' with the fourcc you want, you can get a list of the available fourccs by putting -1 in place of 'video_fourcc' in videoWritter().
    opencv documentation: docs.opencv.org/4.x/dd/d9e/classcv_1_1VideoWriter.html
    to get a full list of all the fourccs you can get them from the links provided in the documentation, you can get what fourccs works for you from the 3 websites provided.

  • @Conning157
    @Conning157 3 місяці тому +2

    THANK YOU! This helps so much

  • @pranavbapat1356
    @pranavbapat1356 Рік тому +4

    Exactly what I was looking for. Thank you very much

  • @xypher_ye8543
    @xypher_ye8543 2 роки тому +2

    Thanks bro didn't help me but since am ur friend from last 10 years I need to support eh xd

  • @DogeUsingAI
    @DogeUsingAI Рік тому +4

    size = list(frame.shape)
    AttributeError: 'NoneType' object has no attribute 'shape'
    PS C:\Users\Genee\OneDrive\Fotos\Saved Pictures>

    • @frames123
      @frames123  Рік тому +3

      There must be some errors associated with the frame variable, please do check, sorry for late reply🥴😁

  • @zerosan8274
    @zerosan8274 3 місяці тому +1

    Thanks bro. ❤

  • @eaintsandi9674
    @eaintsandi9674 2 роки тому +1

    I extracted frame from .mp4 video that output frame are so many, but when I convert this extracted frame to get original video, some image frames intercepted between another frames in the combining video. how to solve this problem??

    • @frames123
      @frames123  2 роки тому +1

      this code adds the images one by one from the starting of the list. so, the intervened frames maybe are in the wrong place in the list. try renaming the frames serialy and sort the list accordingly it may help

  • @swarajpanchal7987
    @swarajpanchal7987 Рік тому +1

    How can I add different time for each frame, for eg. img1 will run for 2 second, img2 will run for 3 second in video, etc.

    • @frames123
      @frames123  Рік тому

      Basically add the image multiple times for eg if you want a img to be there for 2 secs and your frame rate is 24 fps add the img 48 times consecutively, you can use a for loop for this

  • @findingyourfitness
    @findingyourfitness Рік тому +3

    In your video you have 3 different groups of image sequences that have to be converted into 3 different video files.
    Have you developed a way to convert the 3 different groups of image sequences into 3 separate videos by only running the code once?
    Or did you have to run the code 3 separate times for each project?

    • @frames123
      @frames123  Рік тому

      i ran it 3 separate times as I don't use it much
      but you can put the code in a function and run it in a for loop, giving the separate image sequences as a input for the function in each iteration of the code.

  • @mklu0611
    @mklu0611 Рік тому +1

    thanks for the tutorial.

  • @manaswimrityunjay6588
    @manaswimrityunjay6588 Рік тому +1

    I would never use this in my life but for someone who wants to 👍

  • @saurabhkumarsingh334
    @saurabhkumarsingh334 Рік тому +1

    Thank you so much

  • @ruchikabiswal3632
    @ruchikabiswal3632 2 роки тому +2

    Epic!

  • @taominh
    @taominh 2 роки тому +2

    Bro how to add transition image?

    • @frames123
      @frames123  2 роки тому

      For example if you want to add a transition image after the 10th frame, you can check which frame it is currently writing to the video every time a new frame is written and when it hits the 10th frame it will add the transition image.This can be done by adding this code at the end of the last for loop.
      if(i+1==10):
      video.write(cv2.imread(transition image path)

  • @alexandercharles3064
    @alexandercharles3064 2 роки тому +1

    Bro it shows error file isn't playable because the file type is unsupported 😭 everything worked till the last moment

    • @frames123
      @frames123  2 роки тому +2

      Some video players do not support the videos outputed with this method, vlc media player is compatible. I'm working on a solution for this issue. But one work around would be to convert the video using vlc, you can see other videos on how to convert.

    • @alexandercharles3064
      @alexandercharles3064 2 роки тому +1

      @@frames123 ok I will try it out, thank you

    • @alexandercharles3064
      @alexandercharles3064 2 роки тому +1

      Bro even vlc media player doesn't work, it just shows a blank screen even when I click the play button

    • @markpolesznyak7756
      @markpolesznyak7756 2 роки тому +2

      @@alexandercharles3064 Same for me in VLC

    • @frames123
      @frames123  2 роки тому

      It depends on which codecs you have on your PC, you can try putting -1 in the videowriter fourcc to get which codecs you have on your PC. You can try those codes one by one and see which one works the best.
      answers.opencv.org/question/100967/codecs-list/

  • @bonkatomicpunchenjoyer
    @bonkatomicpunchenjoyer 6 місяців тому +1

    thanks, i wanna to make a console yt for urself using this lib and ascii

  • @lakshaysingla7412
    @lakshaysingla7412 Рік тому +1

    code?

    • @frames123
      @frames123  Рік тому

      will be available in a while, please have patience for the mean time, sorry for the inconvenience🥴

    • @frames123
      @frames123  Рік тому

      the code is now availbe, so sorry for such a long wait~~~😔😅