0

I used id3v2 with this command

for i in *.mp4; do id3v2 --artist "Artist Name" "$i";  done

with the intention to populate the otherwise empty tag fields of some mp4 videos in a folder. It worked with the mp3 files but it rendered the videos unplayable. Using a simple

ffmpeg -i unplayable.mp4 restored.mp4

returned

[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55b02df528c0] Format mov,mp4,m4a,3gp,3g2,mj2 detected only with low score of 1, misdetection possible!
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55b02df528c0] moov atom not found
unplayable.mp4: Invalid data found when processing input

Also trying to strip all the id3 tags didn't help.

My guess is that id3v2 somewhat messed up the file headers and it should be easy to restore them. However googling the problem reveals a carnival of software solutions, shareware, online services and such dedicated to repairing mp4 files hence my post here.

maxwhere
  • 133
  • 1
  • 6
  • It probably added the same number of bytes to the beginning of each file. You could probably use `dd` or `sed` to skip this junk data. I ran out of time to write an answer but you could use a hexeditor to view the junk and then trim like `dd if=bad.mp4 bs=1 skip=1724 of=fixed.mp4` – llogan Mar 03 '20 at 01:27

1 Answers1

0

If you're on Windows, you can try to repair the video with "Recover MP4". This is a free Command Prompt tool (no GUI). It fixes headers of the corrupted MP4 files. Here you can find the commands needed to run the tool (scroll down the article till there is a guide on how to fix video files with the tool).

sam_vid
  • 21
  • 1
  • You have linked to the same site [here](https://video.stackexchange.com/a/27735/525) and once [again](https://superuser.com/a/1462689/48078) without responding to my question whether you were affiliated with it. Are you? Your account may be suspended if you continue to promote like this. – slhck Mar 05 '20 at 09:36