ffmpeg concat ts files including subtitles











up vote
0
down vote

favorite












I am encoding with ffmpeg.
What I'm doing right now is to split it into a ts file and then paste it back to the mp4 file via the concat option.
But the problem is that there is a subtitles in this video, but when it is attached to an mp4 file, the subtitles disappears.
-analyzeduration 100M -probesize 100m and -c: s copy option to create ts image and then check with ffprobe.
I am convinced that this stream is a subtitle stream, because the original video also has a 0: 2 portion as a subtitle stream.
I have inserted both images with the concat option -analyzeduration 100M -probesize 100M and -c: s copy, but no subtitles was created in the mp4 file.
If I use the concat option, it does not encode. Is it because of it?
This is my code



ffmpeg -analyzeduration 100M -probesize 100M -y -i Whisper_of_the_Heart.mp4 -ss 00:15:00 -to 00:20:00 -vf "crop=672:432:24:24" -c:v libx264 -c:s copy Whisper_of_the_Heart_10_16.ts
ffmpeg -analyzeduration 100M -probesize 100M -y -i Whisper_of_the_Heart.mp4 -ss 00:20:00.1 -to 00:25:00 -vf "crop=672:432:24:24" -c:v libx264 -c:s copy Whisper_of_the_Heart_16_21.ts
ffprobe -analyzeduration 100M -probesize 100M Whisper_of_the_Heart_10_16.ts


ffmpeg -analyzeduration 100M -probesize 100M -y -i "concat:Whisper_of_the_Heart_10_16.ts|Whisper_of_the_Heart_16_21.ts" -c:v libx264 -c:s copy -c:a copy Whisper_of_the_Heart_10_21.mp4


THis is ffprobe 1



Duration: 00:04:59.94, start: 1.423344, bitrate: 936 kb/s
Program 1
Metadata:
service_name : Service01
service_provider: FFmpeg
Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(progressive), 672x432 [SAR 32:27 DAR 448:243], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
Stream #0:1[0x101](und): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 384 kb/s
Stream #0:2[0x102]: Data: bin_data ([6][0][0][0] / 0x0006)
Unsupported codec with id 100359 for input stream 2


this ffprobe 2



  Duration: 00:05:00.04, start: 1.423344, bitrate: 1089 kb/s
Program 1
Metadata:
service_name : Service01
service_provider: FFmpeg
Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(progressive), 672x432 [SAR 32:27 DAR 448:243], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
Stream #0:1[0x101](und): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 384 kb/s
Stream #0:2[0x102]: Data: bin_data ([6][0][0][0] / 0x0006)
Unsupported codec with id 100359 for input stream 2


this is fforobe orignal



  Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.83.100
Duration: 01:04:39.68, start: 0.000000, bitrate: 912 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 672x432 [SAR 32:27 DAR 448:243], 456 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, 5.1(side), fltp, 448 kb/s (default)
Metadata:
handler_name : SoundHandler
Side data:
audio service type: main
Stream #0:2(und): Subtitle: dvd_subtitle (mp4s / 0x7334706D), 2 kb/s (default)
Metadata:
handler_name : SubtitleHandler


Thank you in advance










share|improve this question









New contributor




이용현 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
























    up vote
    0
    down vote

    favorite












    I am encoding with ffmpeg.
    What I'm doing right now is to split it into a ts file and then paste it back to the mp4 file via the concat option.
    But the problem is that there is a subtitles in this video, but when it is attached to an mp4 file, the subtitles disappears.
    -analyzeduration 100M -probesize 100m and -c: s copy option to create ts image and then check with ffprobe.
    I am convinced that this stream is a subtitle stream, because the original video also has a 0: 2 portion as a subtitle stream.
    I have inserted both images with the concat option -analyzeduration 100M -probesize 100M and -c: s copy, but no subtitles was created in the mp4 file.
    If I use the concat option, it does not encode. Is it because of it?
    This is my code



    ffmpeg -analyzeduration 100M -probesize 100M -y -i Whisper_of_the_Heart.mp4 -ss 00:15:00 -to 00:20:00 -vf "crop=672:432:24:24" -c:v libx264 -c:s copy Whisper_of_the_Heart_10_16.ts
    ffmpeg -analyzeduration 100M -probesize 100M -y -i Whisper_of_the_Heart.mp4 -ss 00:20:00.1 -to 00:25:00 -vf "crop=672:432:24:24" -c:v libx264 -c:s copy Whisper_of_the_Heart_16_21.ts
    ffprobe -analyzeduration 100M -probesize 100M Whisper_of_the_Heart_10_16.ts


    ffmpeg -analyzeduration 100M -probesize 100M -y -i "concat:Whisper_of_the_Heart_10_16.ts|Whisper_of_the_Heart_16_21.ts" -c:v libx264 -c:s copy -c:a copy Whisper_of_the_Heart_10_21.mp4


    THis is ffprobe 1



    Duration: 00:04:59.94, start: 1.423344, bitrate: 936 kb/s
    Program 1
    Metadata:
    service_name : Service01
    service_provider: FFmpeg
    Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(progressive), 672x432 [SAR 32:27 DAR 448:243], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
    Stream #0:1[0x101](und): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 384 kb/s
    Stream #0:2[0x102]: Data: bin_data ([6][0][0][0] / 0x0006)
    Unsupported codec with id 100359 for input stream 2


    this ffprobe 2



      Duration: 00:05:00.04, start: 1.423344, bitrate: 1089 kb/s
    Program 1
    Metadata:
    service_name : Service01
    service_provider: FFmpeg
    Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(progressive), 672x432 [SAR 32:27 DAR 448:243], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
    Stream #0:1[0x101](und): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 384 kb/s
    Stream #0:2[0x102]: Data: bin_data ([6][0][0][0] / 0x0006)
    Unsupported codec with id 100359 for input stream 2


    this is fforobe orignal



      Metadata:
    major_brand : isom
    minor_version : 512
    compatible_brands: isomiso2avc1mp41
    encoder : Lavf57.83.100
    Duration: 01:04:39.68, start: 0.000000, bitrate: 912 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 672x432 [SAR 32:27 DAR 448:243], 456 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)
    Metadata:
    handler_name : VideoHandler
    Stream #0:1(und): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, 5.1(side), fltp, 448 kb/s (default)
    Metadata:
    handler_name : SoundHandler
    Side data:
    audio service type: main
    Stream #0:2(und): Subtitle: dvd_subtitle (mp4s / 0x7334706D), 2 kb/s (default)
    Metadata:
    handler_name : SubtitleHandler


    Thank you in advance










    share|improve this question









    New contributor




    이용현 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.






















      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I am encoding with ffmpeg.
      What I'm doing right now is to split it into a ts file and then paste it back to the mp4 file via the concat option.
      But the problem is that there is a subtitles in this video, but when it is attached to an mp4 file, the subtitles disappears.
      -analyzeduration 100M -probesize 100m and -c: s copy option to create ts image and then check with ffprobe.
      I am convinced that this stream is a subtitle stream, because the original video also has a 0: 2 portion as a subtitle stream.
      I have inserted both images with the concat option -analyzeduration 100M -probesize 100M and -c: s copy, but no subtitles was created in the mp4 file.
      If I use the concat option, it does not encode. Is it because of it?
      This is my code



      ffmpeg -analyzeduration 100M -probesize 100M -y -i Whisper_of_the_Heart.mp4 -ss 00:15:00 -to 00:20:00 -vf "crop=672:432:24:24" -c:v libx264 -c:s copy Whisper_of_the_Heart_10_16.ts
      ffmpeg -analyzeduration 100M -probesize 100M -y -i Whisper_of_the_Heart.mp4 -ss 00:20:00.1 -to 00:25:00 -vf "crop=672:432:24:24" -c:v libx264 -c:s copy Whisper_of_the_Heart_16_21.ts
      ffprobe -analyzeduration 100M -probesize 100M Whisper_of_the_Heart_10_16.ts


      ffmpeg -analyzeduration 100M -probesize 100M -y -i "concat:Whisper_of_the_Heart_10_16.ts|Whisper_of_the_Heart_16_21.ts" -c:v libx264 -c:s copy -c:a copy Whisper_of_the_Heart_10_21.mp4


      THis is ffprobe 1



      Duration: 00:04:59.94, start: 1.423344, bitrate: 936 kb/s
      Program 1
      Metadata:
      service_name : Service01
      service_provider: FFmpeg
      Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(progressive), 672x432 [SAR 32:27 DAR 448:243], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
      Stream #0:1[0x101](und): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 384 kb/s
      Stream #0:2[0x102]: Data: bin_data ([6][0][0][0] / 0x0006)
      Unsupported codec with id 100359 for input stream 2


      this ffprobe 2



        Duration: 00:05:00.04, start: 1.423344, bitrate: 1089 kb/s
      Program 1
      Metadata:
      service_name : Service01
      service_provider: FFmpeg
      Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(progressive), 672x432 [SAR 32:27 DAR 448:243], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
      Stream #0:1[0x101](und): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 384 kb/s
      Stream #0:2[0x102]: Data: bin_data ([6][0][0][0] / 0x0006)
      Unsupported codec with id 100359 for input stream 2


      this is fforobe orignal



        Metadata:
      major_brand : isom
      minor_version : 512
      compatible_brands: isomiso2avc1mp41
      encoder : Lavf57.83.100
      Duration: 01:04:39.68, start: 0.000000, bitrate: 912 kb/s
      Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 672x432 [SAR 32:27 DAR 448:243], 456 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)
      Metadata:
      handler_name : VideoHandler
      Stream #0:1(und): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, 5.1(side), fltp, 448 kb/s (default)
      Metadata:
      handler_name : SoundHandler
      Side data:
      audio service type: main
      Stream #0:2(und): Subtitle: dvd_subtitle (mp4s / 0x7334706D), 2 kb/s (default)
      Metadata:
      handler_name : SubtitleHandler


      Thank you in advance










      share|improve this question









      New contributor




      이용현 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      I am encoding with ffmpeg.
      What I'm doing right now is to split it into a ts file and then paste it back to the mp4 file via the concat option.
      But the problem is that there is a subtitles in this video, but when it is attached to an mp4 file, the subtitles disappears.
      -analyzeduration 100M -probesize 100m and -c: s copy option to create ts image and then check with ffprobe.
      I am convinced that this stream is a subtitle stream, because the original video also has a 0: 2 portion as a subtitle stream.
      I have inserted both images with the concat option -analyzeduration 100M -probesize 100M and -c: s copy, but no subtitles was created in the mp4 file.
      If I use the concat option, it does not encode. Is it because of it?
      This is my code



      ffmpeg -analyzeduration 100M -probesize 100M -y -i Whisper_of_the_Heart.mp4 -ss 00:15:00 -to 00:20:00 -vf "crop=672:432:24:24" -c:v libx264 -c:s copy Whisper_of_the_Heart_10_16.ts
      ffmpeg -analyzeduration 100M -probesize 100M -y -i Whisper_of_the_Heart.mp4 -ss 00:20:00.1 -to 00:25:00 -vf "crop=672:432:24:24" -c:v libx264 -c:s copy Whisper_of_the_Heart_16_21.ts
      ffprobe -analyzeduration 100M -probesize 100M Whisper_of_the_Heart_10_16.ts


      ffmpeg -analyzeduration 100M -probesize 100M -y -i "concat:Whisper_of_the_Heart_10_16.ts|Whisper_of_the_Heart_16_21.ts" -c:v libx264 -c:s copy -c:a copy Whisper_of_the_Heart_10_21.mp4


      THis is ffprobe 1



      Duration: 00:04:59.94, start: 1.423344, bitrate: 936 kb/s
      Program 1
      Metadata:
      service_name : Service01
      service_provider: FFmpeg
      Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(progressive), 672x432 [SAR 32:27 DAR 448:243], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
      Stream #0:1[0x101](und): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 384 kb/s
      Stream #0:2[0x102]: Data: bin_data ([6][0][0][0] / 0x0006)
      Unsupported codec with id 100359 for input stream 2


      this ffprobe 2



        Duration: 00:05:00.04, start: 1.423344, bitrate: 1089 kb/s
      Program 1
      Metadata:
      service_name : Service01
      service_provider: FFmpeg
      Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(progressive), 672x432 [SAR 32:27 DAR 448:243], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
      Stream #0:1[0x101](und): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 384 kb/s
      Stream #0:2[0x102]: Data: bin_data ([6][0][0][0] / 0x0006)
      Unsupported codec with id 100359 for input stream 2


      this is fforobe orignal



        Metadata:
      major_brand : isom
      minor_version : 512
      compatible_brands: isomiso2avc1mp41
      encoder : Lavf57.83.100
      Duration: 01:04:39.68, start: 0.000000, bitrate: 912 kb/s
      Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 672x432 [SAR 32:27 DAR 448:243], 456 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)
      Metadata:
      handler_name : VideoHandler
      Stream #0:1(und): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, 5.1(side), fltp, 448 kb/s (default)
      Metadata:
      handler_name : SoundHandler
      Side data:
      audio service type: main
      Stream #0:2(und): Subtitle: dvd_subtitle (mp4s / 0x7334706D), 2 kb/s (default)
      Metadata:
      handler_name : SubtitleHandler


      Thank you in advance







      ffmpeg mp4 subtitles concatenation






      share|improve this question









      New contributor




      이용현 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question









      New contributor




      이용현 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question








      edited Nov 20 at 9:43





















      New contributor




      이용현 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked Nov 20 at 9:36









      이용현

      11




      11




      New contributor




      이용현 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      이용현 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      이용현 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.



























          active

          oldest

          votes











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "3"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });






          이용현 is a new contributor. Be nice, and check out our Code of Conduct.










           

          draft saved


          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1376917%2fffmpeg-concat-ts-files-including-subtitles%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown






























          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          이용현 is a new contributor. Be nice, and check out our Code of Conduct.










           

          draft saved


          draft discarded


















          이용현 is a new contributor. Be nice, and check out our Code of Conduct.













          이용현 is a new contributor. Be nice, and check out our Code of Conduct.












          이용현 is a new contributor. Be nice, and check out our Code of Conduct.















           


          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1376917%2fffmpeg-concat-ts-files-including-subtitles%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

          Mangá

          Eduardo VII do Reino Unido