Score:0

Problem with MP4/H264 metadata crop values

in flag

I have Ubuntu 20.04 Mate, VLC 3.0.9.2, MPV 0.32.0, MPlayer 1.3.0, AVIdemux 2.7.6.

I have a video file (H264/AAC/MP4) in 16:9 aspect (1024x576p) where the video was accidentaly horizontaly squeezed to 4:3 and letterboxed with black bars at the right and left sides to fill the full 16:9 frame size. I didn't want to re-encode it, so I tried to use MP4 metadata to correct the squeezing and remove the black bars. To do so, I used these two ffmpeg commands:

ffmpeg -i inputfile.mp4 -aspect 235:100 -c copy outputfile.mp4

ffmpeg -i inputfile.mp4 -bsf:v h264_metadata=crop_left=128:crop_right=128:crop_top:0:crop_bottom=0 -codec copy outputfile.mp4

I opened the resulting file with VLC 3.0.9.2, MPV 0.32.0, MPlayer 1.3.0, and AVIdemux 2.7.6 and this was the result:

  • Only MPlayer showed the new aspect ratio and cropped both sides correctly.
  • AVIdemux ignored the new aspect ratio but cropped both sides correctly.
  • MPV showed the new aspect ratio but left the left side uncropped, only the right side was cropped correctly.
  • VLC showed the new aspect ratio but left the left side uncropped, the right side was cropped but not correctly (it seems that the left value was added to the right value).

I will add a screenshot.

I filed this issue on the VLC and the MPV bug lists. But as always when I do so the developers answer that I have an outdated version of their software (which is a general problem with ubuntu repositories) and that I didn't include all the necessary information. Maybe someone else who is more qualified than me can file a "valid" issue.

Or maybe someone knows how to bypass this issue without envolving the developers (maybe it's not even a bug, but I rather doubt that)

screenshot comparison of playback results

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.