Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-06-13T20:50:33.933Z
Answers.Text: Quick and simple. Thanks!
Answers.UserDisplayName: angel_30
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-06-16T19:21:25.113Z
Answers.Text: 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
Answers.UserDisplayName: angel_30
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-06-13T19:55:53.907Z
Answers.LastActivityDate: 2019-06-13T19:55:53.907Z
Answers.UserDisplayName: Gyan
Body: <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>
  
Tags: <video><ffmpeg><encoding><mp4><file-formats>
Title: Errors in converting mp4 to ts with FFmpeg
UserDisplayName: angel_30
ThreadText: # 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  
  
  ---
  
  