VideoHelp Forum




+ Reply to Thread
Results 1 to 3 of 3
  1. Member
    Join Date
    Feb 2021
    Location
    Sweden
    Search Comp PM
    I want to use ffmpeg to convert a bunch of 15 years old movie files in AVI format into mp4.
    I also want to rotate some of them so they can be played properly on a TV via KODI.

    1) So what is the most effective ffmpeg command to do the conversion from AVI to MP4?
    If I just use this on a 640x480 px 30 sec video:
    Code:
    ffmpeg -i MVI_2012.AVI  MVI_2012.mp4
    It takes 10 seconds and results in a file shrink from 55 to 12 MB

    I had hoped for a better compression than that given that the pixel size is not that big and the video length is also only 30s.

    2) Some of the files are also shot with the camera (or phone) upright (portrait) but the video plays back in landscape direction so things are 90 degree sideways.
    How can this be corrected using ffmpeg?
    Quote Quote  
  2. for better encoding use
    Code:
    ffmpeg -i MVI_2012.AVI -map 0 -c:v libx264 -crf 20 -c:a mp2 -b:a 192k -ar 48000 20MVI_2012.mp4
    For the videos to rotate post a sample here.
    Quote Quote  
  3. Member
    Join Date
    Feb 2021
    Location
    Sweden
    Search Comp PM
    I decided to not convert the videos to mp4 after all.
    My KODI media player (RaspberryPi4B) could handle the different formats OK anyway and it would be a lot of work for nothing.
    The videos show my grandchildren very young 10-15 years ago and the videos come from various sources like digital cameras and various phone models with differing file types and naming conventions until my Android phones started using the actual timestamp down to the second as the name.

    Originally Posted by ProWo View Post
    For the videos to rotate post a sample here.
    What I am talking about needs no sample, it is just when you take a video sequence and fail to understand that doing that in portrait mode is REALLY BAD since the TV and other displays are normally oriented in landscape mode.
    And if the video (mostly the old sources) does not contain a direction marker then the portrait video is shown in landscape mode with everything rotated 90 degrees...
    In my old video collection I had a number of these, which I have now rotated using the scheme:

    I found a good website where I got the conversion command to rotate 1-2-3 times 90 degrees.

    Code:
    ffmpeg -i 20130714_161030.mp4  -vf "transpose=2" 20130714_161030-90.mp4
    That worked very well.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!