# Concatenate mp4 files from AMB82-mini fails

**URL:** <https://forum.amebaiot.com/t/concatenate-mp4-files-from-amb82-mini-fails/4089>\
**Category:** Multimedia\
**Tags:** evb-amb82\
**Created:** [May 2, 2025, 11:59am UTC](https://forum.amebaiot.com/t/concatenate-mp4-files-from-amb82-mini-fails/4089 "2025-05-02T11:59:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Barryn56](https://avatars.discourse-cdn.com/v4/letter/b/8491ac/32.png) [@Barryn56](https://forum.amebaiot.com/u/Barryn56)\
**Post date:** [May 2, 2025, 11:59am UTC](https://forum.amebaiot.com/t/concatenate-mp4-files-from-amb82-mini-fails/4089/1 "2025-05-02T11:59:54Z")

</div>

I was attempting to concatenate a number of individual mp4 files recorded with AMB82-mini using ffmpeg. However, the operation failed with error ‘Invalid NAL size’. Is this a known limitation of the mp4 file structure used by AMB82-mini? Is there a quick way to combine the files? Thanks.

---

<div class="post-metadata">

**Author:** ![Kelvin\_Huang](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/kelvin_huang/32/2130_2.png) [@Kelvin\_Huang](https://forum.amebaiot.com/u/Kelvin_Huang)\
**Post date:** [May 6, 2025, 1:53am UTC](https://forum.amebaiot.com/t/concatenate-mp4-files-from-amb82-mini-fails/4089/2 "2025-05-06T01:53:21Z")

</div>

Hi @Barryn56,

I am able to concatenate 2 or more mp4 files via ffmpeg.

I am using this command `ffmpeg -i input1.mp4 -i input2.mp4 -filter_complex "[0:v:0][1:v:0]concat=n=2:v=1:a=0[outv]" -map "[outv]" output.mp4`.

For this command, I saved two mp4 files that consists only of video and no audio (using our Arduino example.)

There is probably a faster way which is to remux the mp4s to mpeg-ts and then concatenate using ffmpeg.

Thank you.

---

<div class="post-metadata">

**Author:** ![Barryn56](https://avatars.discourse-cdn.com/v4/letter/b/8491ac/32.png) [@Barryn56](https://forum.amebaiot.com/u/Barryn56)\
**Post date:** [May 6, 2025, 4:50am UTC](https://forum.amebaiot.com/t/concatenate-mp4-files-from-amb82-mini-fails/4089/3 "2025-05-06T04:50:04Z")

</div>

Thanks for the quick response, Kelvin - I shall try that out.  
Barry
