1

I am use FFmpeg v4.1 . I want to change H264 profile and level but I want other settings to stay the same. I just want to change the profile of H264.

I'm using this code, but I'm getting the error.

-vcodec copy -profile:v high -level 4.0

How can I do that?

9
  • With vcodec copy, you can only change the level using a bitstream filter. Why do you want to do this?
    – Gyan
    Jan 18 '19 at 17:03
  • @Gyan Thanks for comment bro. Forget the reason. How can I do this?
    – user18109
    Jan 18 '19 at 18:47
  • 1
    Use -vcodec copy -bsf:v h264_metadata level=4.0. Profile can't be changed. ffmpeg version 4.0 or newer required.
    – Gyan
    Jan 19 '19 at 4:52
  • @Gyan it didn't work bro. I have encountered an error: [NULL @ 00000072411504c0] Unable to find a suitable output format for 'level=4.0' level=4.0: Invalid argument
    – user18109
    Jan 19 '19 at 13:07
  • 1
    Oops. -bsf:v h264_metadata=level=4
    – Gyan
    Jan 19 '19 at 13:17
0

I guess you cannot copy the video codec as you are changing the video profile, using this command worked for me

ffmpeg -i input.mp4 -acodec copy -profile:v high -level 4.0 output.mp4

Here I am only copying audio codec.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy