Skip to content

Instantly share code, notes, and snippets.

@famousgarkin
Created March 18, 2017 18:10
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save famousgarkin/4d8f53e0c7c829ac2a5bb115a5912943 to your computer and use it in GitHub Desktop.
Save famousgarkin/4d8f53e0c7c829ac2a5bb115a5912943 to your computer and use it in GitHub Desktop.
ffmpeg fix "Video uses a non-standard and wasteful way to store B-frames ('packed B-frames'). Consider using the mpeg4_unpack_bframes bitstream filter without encoding but stream copy to fix it."
ffmpeg -i "in.avi" -bsf:v mpeg4_unpack_bframes -vcodec copy "out.avi"
@BlackPepperAPI
Copy link

Hi @famousgrakin. If I would like to change the frame rate as well, is it possible to add -r <frame_rate>>?
From what I understand, it wouldn't work to have -vcodec copy when changing frame rate, but at the same time I want to fix the "packed bit stream issue (packed B-frames)" but -bsf:v mpeg4_unpack_bframes wouldn't work if vcodec is not copy ( as mentioned by the warning, "... without encoding but stream copy"

Do you have any suggestion how to fix this while changing the frame rate? The reason I want to change the frame rate is to make my video constant frame rate, not variable frame rate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment