FFMPEG convert webm to mp4 not working

16,892

Solution 1

You are asking to convert to mp4 but have added .flv output format in your command, try:

ffmpeg -i your_input_filename.webm -qscale 0 your_outfile_name.mp4

Solution 2

The late ffmpeg just need -i param

ffmpeg -i input_file.webm output_file.mp4

Solution 3

ffmpeg -i file.webm -strict -2 file.mp4

seems to be OK.

I use ffmpeg version 0.10.9-7:0.10.9-1~lucid1.

Solution 4

In newer ffmpeg versions, "-sameq" option has been removed, you have to use "-qscale" instead.

ffmpeg -i your_input_filename.webm -qscale 0 your_outfile_name.mp4
Share:
16,892
RussellHarrower
Author by

RussellHarrower

Self taught PHP, HTML, CSS, JAVASCRIPT developer.

Updated on June 19, 2022

Comments

  • RussellHarrower
    RussellHarrower about 2 years

    I have upgrade to the latest ffmpeg which supports webm, but I can't seem to convert webm to mp4

    ffmpeg -i filea.webM -sameq filea.flv
    

    I am getting this error

    swScaler: Unknown format is not supported as input pixel format
    Cannot get resampling context
    

    I am not sure what to do.

  • RussellHarrower
    RussellHarrower over 11 years
    i can convert it to flv but not to webm
  • jduncanator
    jduncanator over 11 years
    Don't use sameq, it DOES NOT mean same quality. See relevant post here: unix.stackexchange.com/questions/24541/…
  • Dinesh Pathak DK
    Dinesh Pathak DK over 6 years
    but this mp4 file is not playable on browser, why?
  • Dinesh Pathak DK
    Dinesh Pathak DK over 6 years
    but this mp4 file is not playable on browser, why?
  • llogan
    llogan over 6 years
    -qscale is only for the legacy MPEG family of encoders: mpeg4, mpeg2video, mpeg1video, mjpeg etc. It is ignored by libx264 and libx265 and just about everything else.