Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

agnos.is Forums

  1. Home
  2. Linux
  3. what ffmpeg command do I need to cut a portion of a larger mkv file and bind the 2 resulting files into 1?

what ffmpeg command do I need to cut a portion of a larger mkv file and bind the 2 resulting files into 1?

Scheduled Pinned Locked Moved Linux
linux
14 Posts 8 Posters 0 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M This user is from outside of this forum
    M This user is from outside of this forum
    [email protected]
    wrote on last edited by
    #1

    debian 12.9 with ffmpeg.

    The mkv file is 68 minutes long, I want to get rid of minutes 05:50 to 11:00 and 58:00 to 68:00. I want the resulting parts (00:00 to 05:00 and 11:00 to 58:00) bind together as a single mkv file.

    the ffmpeg command I've always used for similar but easier purposes:

    ffmpeg -i "E01 - Part One [x265].mkv" -ss 00:00:00 -to 00:07:28 -c copy output.mkv

    can I do this with ffmpeg or do I have to bind the 2 resulting files with mkvtoolnix?

    ETA: would it be a better idea to use ffmpeg installed from flatpak instead of debian's default sources? I don't know if ffmpeg is updated regularly

    S J X N 4 Replies Last reply
    0
    • System shared this topic on
    • M [email protected]

      debian 12.9 with ffmpeg.

      The mkv file is 68 minutes long, I want to get rid of minutes 05:50 to 11:00 and 58:00 to 68:00. I want the resulting parts (00:00 to 05:00 and 11:00 to 58:00) bind together as a single mkv file.

      the ffmpeg command I've always used for similar but easier purposes:

      ffmpeg -i "E01 - Part One [x265].mkv" -ss 00:00:00 -to 00:07:28 -c copy output.mkv

      can I do this with ffmpeg or do I have to bind the 2 resulting files with mkvtoolnix?

      ETA: would it be a better idea to use ffmpeg installed from flatpak instead of debian's default sources? I don't know if ffmpeg is updated regularly

      S This user is from outside of this forum
      S This user is from outside of this forum
      [email protected]
      wrote on last edited by
      #2

      Look into ffmpeg's "concat" feature. It can do what you want. https://trac.ffmpeg.org/wiki/Concatenate

      1 Reply Last reply
      0
      • M [email protected]

        debian 12.9 with ffmpeg.

        The mkv file is 68 minutes long, I want to get rid of minutes 05:50 to 11:00 and 58:00 to 68:00. I want the resulting parts (00:00 to 05:00 and 11:00 to 58:00) bind together as a single mkv file.

        the ffmpeg command I've always used for similar but easier purposes:

        ffmpeg -i "E01 - Part One [x265].mkv" -ss 00:00:00 -to 00:07:28 -c copy output.mkv

        can I do this with ffmpeg or do I have to bind the 2 resulting files with mkvtoolnix?

        ETA: would it be a better idea to use ffmpeg installed from flatpak instead of debian's default sources? I don't know if ffmpeg is updated regularly

        J This user is from outside of this forum
        J This user is from outside of this forum
        [email protected]
        wrote on last edited by
        #3

        This question does not belong here.

        C 1 Reply Last reply
        0
        • M [email protected]

          debian 12.9 with ffmpeg.

          The mkv file is 68 minutes long, I want to get rid of minutes 05:50 to 11:00 and 58:00 to 68:00. I want the resulting parts (00:00 to 05:00 and 11:00 to 58:00) bind together as a single mkv file.

          the ffmpeg command I've always used for similar but easier purposes:

          ffmpeg -i "E01 - Part One [x265].mkv" -ss 00:00:00 -to 00:07:28 -c copy output.mkv

          can I do this with ffmpeg or do I have to bind the 2 resulting files with mkvtoolnix?

          ETA: would it be a better idea to use ffmpeg installed from flatpak instead of debian's default sources? I don't know if ffmpeg is updated regularly

          X This user is from outside of this forum
          X This user is from outside of this forum
          [email protected]
          wrote on last edited by
          #4

          You should be able to pass multiple -ss and -to flags. Should look something like this;

          ffmpeg -i "E01 - Part One [x265].mkv" -ss 00:05:50 -to 00:11:00 -c copy 1.mkv -ss 00:58:00 -to 00:68:00 -c copy 2.mkv
          ffmpeg -i 1.mkv -i 2.mkv -filter_complex "[0:0][0:1][1:0][1:1]concat=n=2:v=1:a=1[outv][outa]" -map "[outv]" -map "[outa]" output.mkv
          

          I've confirmed that this works fine.

          1 Reply Last reply
          0
          • J [email protected]

            This question does not belong here.

            C This user is from outside of this forum
            C This user is from outside of this forum
            [email protected]
            wrote on last edited by
            #5

            Technically you are correct, but is there a more relevant community?

            J 1 Reply Last reply
            0
            • M [email protected]

              debian 12.9 with ffmpeg.

              The mkv file is 68 minutes long, I want to get rid of minutes 05:50 to 11:00 and 58:00 to 68:00. I want the resulting parts (00:00 to 05:00 and 11:00 to 58:00) bind together as a single mkv file.

              the ffmpeg command I've always used for similar but easier purposes:

              ffmpeg -i "E01 - Part One [x265].mkv" -ss 00:00:00 -to 00:07:28 -c copy output.mkv

              can I do this with ffmpeg or do I have to bind the 2 resulting files with mkvtoolnix?

              ETA: would it be a better idea to use ffmpeg installed from flatpak instead of debian's default sources? I don't know if ffmpeg is updated regularly

              N This user is from outside of this forum
              N This user is from outside of this forum
              [email protected]
              wrote on last edited by
              #6

              After some fiddling arround my self I had some Audio sync/frame gone missing issues with ffmpeg, I would recommend to use mkvtoolnix to cut and merge your mkv files together.

              1 Reply Last reply
              0
              • C [email protected]

                Technically you are correct, but is there a more relevant community?

                J This user is from outside of this forum
                J This user is from outside of this forum
                [email protected]
                wrote on last edited by
                #7

                On the R-site there was a "Linux Questions" one. I guess it needs to be recreated here.

                R 1 Reply Last reply
                0
                • J [email protected]

                  On the R-site there was a "Linux Questions" one. I guess it needs to be recreated here.

                  R This user is from outside of this forum
                  R This user is from outside of this forum
                  [email protected]
                  wrote on last edited by
                  #8

                  Creating a new community for one question is insane.

                  If there's a surge in questions not relevant to 90% of readers then sure but Lemmy isn't there yet

                  J 1 Reply Last reply
                  0
                  • R [email protected]

                    Creating a new community for one question is insane.

                    If there's a surge in questions not relevant to 90% of readers then sure but Lemmy isn't there yet

                    J This user is from outside of this forum
                    J This user is from outside of this forum
                    [email protected]
                    wrote on last edited by
                    #9

                    Insane is a big word. There's a separate one on the R-site so why not here? Then people who want to participate in Stack Exchange-style Q&A can subscribe to that and those who just want to discuss Linux as a subject won't have to bat away spam about the exact syntax to some obscure video-editing utility.

                    R fizz@lemmy.nzF 2 Replies Last reply
                    0
                    • J [email protected]

                      Insane is a big word. There's a separate one on the R-site so why not here? Then people who want to participate in Stack Exchange-style Q&A can subscribe to that and those who just want to discuss Linux as a subject won't have to bat away spam about the exact syntax to some obscure video-editing utility.

                      R This user is from outside of this forum
                      R This user is from outside of this forum
                      [email protected]
                      wrote on last edited by
                      #10

                      There was a discussion about "ghost communities" a few days ago:

                      https://feddit.uk/post/24499702

                      People are quick to create communities but they sit unused, attract few posts and fewer subscribers. Often the mods move on so even if new posts were to appear they'd be unmoderated.

                      The simple reason for that is there isn't enough demand. Lemmy is still small it's too early to be spinning out ever more narrowed niche communities. If you think content belongs elsewhere then report it to the mods and let them decide. If they see a surge in unwanted Q&A topics then they can amend posting guidelines to direct people elsewhere or to a Q&A thread or something.

                      J 1 Reply Last reply
                      0
                      • R [email protected]

                        There was a discussion about "ghost communities" a few days ago:

                        https://feddit.uk/post/24499702

                        People are quick to create communities but they sit unused, attract few posts and fewer subscribers. Often the mods move on so even if new posts were to appear they'd be unmoderated.

                        The simple reason for that is there isn't enough demand. Lemmy is still small it's too early to be spinning out ever more narrowed niche communities. If you think content belongs elsewhere then report it to the mods and let them decide. If they see a surge in unwanted Q&A topics then they can amend posting guidelines to direct people elsewhere or to a Q&A thread or something.

                        J This user is from outside of this forum
                        J This user is from outside of this forum
                        [email protected]
                        wrote on last edited by
                        #11

                        Sure, I get that. The simpler remedy here would just be to ban ultra-niche support questions. Look at the title of this community then look at the title of this topic and ask yourself: were you interested in it? I wasn't.

                        R 1 Reply Last reply
                        0
                        • J [email protected]

                          Sure, I get that. The simpler remedy here would just be to ban ultra-niche support questions. Look at the title of this community then look at the title of this topic and ask yourself: were you interested in it? I wasn't.

                          R This user is from outside of this forum
                          R This user is from outside of this forum
                          [email protected]
                          wrote on last edited by
                          #12

                          Your comment "This question does not belong here." currently has 22 downvotes and 1 upvote.

                          To me that suggests your view is in the minority.

                          J 1 Reply Last reply
                          0
                          • R [email protected]

                            Your comment "This question does not belong here." currently has 22 downvotes and 1 upvote.

                            To me that suggests your view is in the minority.

                            J This user is from outside of this forum
                            J This user is from outside of this forum
                            [email protected]
                            wrote on last edited by
                            #13

                            And your point is... what?

                            1 Reply Last reply
                            0
                            • J [email protected]

                              Insane is a big word. There's a separate one on the R-site so why not here? Then people who want to participate in Stack Exchange-style Q&A can subscribe to that and those who just want to discuss Linux as a subject won't have to bat away spam about the exact syntax to some obscure video-editing utility.

                              fizz@lemmy.nzF This user is from outside of this forum
                              fizz@lemmy.nzF This user is from outside of this forum
                              [email protected]
                              wrote on last edited by
                              #14

                              Became reddit has a user base that is 10000x bigger.

                              1 Reply Last reply
                              0
                              • System shared this topic on
                              Reply
                              • Reply as topic
                              Log in to reply
                              • Oldest to Newest
                              • Newest to Oldest
                              • Most Votes


                              • Login

                              • Login or register to search.
                              • First post
                                Last post
                              0
                              • Categories
                              • Recent
                              • Tags
                              • Popular
                              • World
                              • Users
                              • Groups