1

1. Shift audio

I use ffmpeg / avconv quite often ... and usually I hate it. Those tools do what they are instructed to do about 30% of the time. I could give you countless examples but I don't want to start flame war, so please help me with my current problem (really easy one).

I wanted to shift audio (content is standard mp4 file with aac and h264 tracks), so I have found a "highly upvoted" solution:

https://superuser.com/a/983153/758887

the only problem with it is that it doesn't work. I downloaded latest stable ffmpeg (even on windows as in the thread, so it's version was 3.4.1) and executed command without changing literaly anything:

ffmpeg.exe -i "movie.mp4" -itsoffset 3.84 -i "movie.mp4" -map 0:v -map 1:a -vcodec copy -acodec copy "movie-audio-delayed.mp4"

Result was no shift (I expected audio to be 3.84s late).

2. Remove MPEG4 atoms

I would be also grateful if you could recommend some tool for removing MPEG4 boxes from content. For examining MPEG4 content I use MP4 Explorer / Codec Visa (limited) on Windows and AtomicParsley on Linux, however they only print atoms and I would like to edit / remove them. For example MP4Box can remove whole moov->track with "-rem" option but what if I would like to remove moov->track->edts only?

LLL
  • 1,510
  • 1
  • 12
  • 27
  • 1
    How are you testing the output? WMP, for example, doesn't honor late start time of the audio in a MP4. – Gyan Jan 09 '18 at 15:35
  • Thank you very much! Indeed I was doing quick checks on WMP and haven't noticed any delays, so I though that it didn't work. In fact ffmpeg adds delay using edts atom (which I also mentioned earlier). Now I've checked different player and it honors delay, so ffmpeg worked ok and it was my mistake. – LLL Jan 09 '18 at 15:55

1 Answers1

1

Shift audio works ok as pointed out by @Mulvya and I have somehow workarounded removing MPEG4 atoms. I've just opened the file with hex editor and changed 'edts' to 'free' ... but if you have better way of doing that the please answer to this question.

LLL
  • 1,510
  • 1
  • 12
  • 27