<p>a) <code>-bsf h264_mp4toannexb</code> applies the filter to all output streams but it has to be applied to only video streams.</p>

<p>b) In any case, newer versions of ffmpeg, like the one you have, will automatically apply bitstream filters so you don't need to.</p>

<p>Use</p>

<pre><code>ffmpeg -i 1559066401592889640.mp4 -c copy 1559066401592889640.ts
</code></pre>

CC BY-SA 4.0
2019-06-13T20:50:33.933Z
Quick and simple. Thanks!
angel_30
CC BY-SA 4.0
2019-06-16T19:21:25.113Z
I'm facing a problem. Once I convert the .mp4 file to .ts, the caption looks different. Look at 00:34", you see `GARBLED CAPTION INSERTED` in the original. But that's not there in the converted ts. What's happening? Here is the sample .mp4 file: https://www.dropbox.com/s/697c7tuqgkc0bv0/test.mp4?dl=0
angel_30
CC BY-SA 4.0
2019-06-13T19:55:53.907Z
2019-06-13T19:55:53.907Z
Gyan
<p>I was trying to convert a caption-embedded <code>.mp4</code> file into a <code>.ts</code> file. Only command found after some search was this which uses <code>FFmpeg</code>:</p>

<pre><code>ffmpeg -i 1559066401592889640.mp4 -c copy -bsf h264_mp4toannexb 1559066401592889640.ts
</code></pre>

<p>But when running, I get this error:</p>

<pre><code>Codec 'ac3' (86019) is not supported by the bitstream filter 'h264_mp4toannexb'.
</code></pre>

<p>What is going wrong? How to fix it?
I'm using latest FFmpeg:</p>

<pre><code>ffmpeg version N-93649-gd0ca749adb Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 8.3.1 (GCC) 20190414
</code></pre>

<video><ffmpeg><encoding><mp4><file-formats>
Errors in converting mp4 to ts with FFmpeg
angel_30
# Errors in converting mp4 to ts with FFmpeg

(Asked by: username_0 on 2019-06-13)

I was trying to convert a caption-embedded .mp4 file into a .ts file. Only command found after some search was this which uses FFmpeg:
ffmpeg -i 1559066401592889640.mp4 -c copy -bsf h264_mp4toannexb 1559066401592889640.ts

But when running, I get this error:
Codec 'ac3' (86019) is not supported by the bitstream filter 'h264_mp4toannexb'.

What is going wrong? How to fix it?
I'm using latest FFmpeg:
ffmpeg version N-93649-gd0ca749adb Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 8.3.1 (GCC) 20190414

**Tags:** video, ffmpeg, encoding, mp4, file-formats


---

## 1 answers

### Answer by username_1 on 2019-06-13. Score: 4 | Accepted answer

a) -bsf h264_mp4toannexb applies the filter to all output streams but it has to be applied to only video streams.
b) In any case, newer versions of ffmpeg, like the one you have, will automatically apply bitstream filters so you don't need to.
Use
ffmpeg -i 1559066401592889640.mp4 -c copy 1559066401592889640.ts

> **Comments:**
> **username_0**: Quick and simple. Thanks!  
> **username_0**: I'm facing a problem. Once I convert the .mp4 file to .ts, the caption looks different. Look at 00:34", you see `GARBLED CAPTION INSERTED` in the original. But that's not there in the converted ts. What's happening? Here is the sample .mp4 file: https://www.dropbox.com/s/697c7tuqgkc0bv0/test.mp4?dl=0  

---

