<p>It looks like the first input's audio is corrupted, but it it hard to say without accessing to the input sources. Could you try to build the transcoding pipeline by following the tutorial here? <a href="https://www.bugcodemaster.com/article/concatenate-videos-using-ffmpeg" rel="nofollow noreferrer">https://www.bugcodemaster.com/article/concatenate-videos-using-ffmpeg</a>
It might tell FFMPEG more clear which stream to choose to avoid confusion.</p>

CC BY-SA 4.0
2018-10-16T06:14:29.610Z
2018-10-16T06:14:29.610Z
Chien-Yu
<p>I have 4 videos I am trying to string together and here is my command</p>

<pre><code>bin/ffmpeg.exe -f concat -safe 0 -i concat.txt out/documentary_full.MOV
</code></pre>

<p>Here is what's in concat.txt</p>

<pre><code>file '/path/to/clip_with_audio1.MOV'
file '/path/to/clip_with_no_audio1.MOV'
file '/path/to/clip_with_no_audio2.MOV'
file '/path/to/clip_with_audio2.MOV'
</code></pre>

<p>I noticed in the output that when it ends attaching the second clip it gives the following error</p>

<pre><code>[mov,mp4,m4a,3gp,3g2,mj2 @ 05cac5a0] Auto-inserting h264_mp4toannexb bitstream filter
[aac @ 062e05e0] Reserved bit set.
[aac @ 062e05e0] decode_band_types: Input buffer exhausted before END element found
Error while decoding stream #0:1: Invalid data found when processing input
</code></pre>

<p>When I play the final output video, I notice the player when it reaches the point where it begins the second clip portion, it skips the whole portion, seeks a few seconds forward and continues playing the video after seeking from that point. How do I fix this?</p>

<ffmpeg>
ffmpeg concat videos, some have audio some don't
fahadash
# ffmpeg concat videos, some have audio some don't

(Asked by: username_0 on 2018-10-15)

I have 4 videos I am trying to string together and here is my command
bin/ffmpeg.exe -f concat -safe 0 -i concat.txt out/documentary_full.MOV

Here is what's in concat.txt
file '/path/to/clip_with_audio1.MOV'
file '/path/to/clip_with_no_audio1.MOV'
file '/path/to/clip_with_no_audio2.MOV'
file '/path/to/clip_with_audio2.MOV'

I noticed in the output that when it ends attaching the second clip it gives the following error
[mov,mp4,m4a,3gp,3g2,mj2 @ 05cac5a0] Auto-inserting h264_mp4toannexb bitstream filter
[aac @ 062e05e0] Reserved bit set.
[aac @ 062e05e0] decode_band_types: Input buffer exhausted before END element found
Error while decoding stream #0:1: Invalid data found when processing input

When I play the final output video, I notice the player when it reaches the point where it begins the second clip portion, it skips the whole portion, seeks a few seconds forward and continues playing the video after seeking from that point. How do I fix this?

**Tags:** ffmpeg


---

## 1 answers

### Answer by username_1 on 2018-10-16. Score: 0

It looks like the first input's audio is corrupted, but it it hard to say without accessing to the input sources. Could you try to build the transcoding pipeline by following the tutorial here? <https://www.bugcodemaster.com/article/concatenate-videos-using-ffmpeg>
It might tell FFMPEG more clear which stream to choose to avoid confusion.


---

