Hacker Public Radio

HPR4077: FFMPEG Series: Joining and Splitting files


Listen Later

FFMPEG Series
Part 2: Joining and Splitting files
Joining Files
Link: https://trac.ffmpeg.org/wiki/Concatenate
For lossless files of the
same codecs
ffmpeg -i "concat:input1.ts|input2.ts|input3.ts" -c copy output.ts
For mp4 files, using
intermediate files
ffmpeg -i input1.mp4 -c copy intermediate1.ts
ffmpeg -i input2.mp4 -c copy intermediate2.ts
ffmpeg -i "concat:intermediate1.ts|intermediate2.ts" -c copy output.ts
Brief explanation of the options used in the command:
-i: input
-c copy: use codec same codecs as input
Splitting Files
Splitting by Duration:
ffmpeg -i input.mp4 -t 00:05:00 output_part1.mp4
ffmpeg -i input.mp4 -t 00:05:00 -ss 00:05:00 output_part2.mp4
Brief explanation of the options used in the command:
-i: Input file
-t: Duration of the output file
-ss: Start position of the output file (optional)
Splitting by Chapters or
Markers:
Use additional scripting to get out chapter marker times, then use
above
C. Splitting by Size:
ffmpeg -i input.mp4 -map 0 -c copy -segment_size 50M -segment_times 1 output_%03d.mp4
Brief explanation of the options used in the command:
-map 0: Select the first stream (video and audio)
-c copy: Copy the stream without re-encoding
(faster)
-segment_size: Size of each output file segment
-segment_times: Number of segments to create
output_%03d.mp4: printf-style pattern for the output
files
...more
View all episodesView all episodes
Download on the App Store

Hacker Public RadioBy Hacker Public Radio

  • 4.2
  • 4.2
  • 4.2
  • 4.2
  • 4.2

4.2

34 ratings


More shows like Hacker Public Radio

View all
Security Now (Audio) by TWiT

Security Now (Audio)

1,970 Listeners

Off The Hook by 2600 Enterprises

Off The Hook

117 Listeners

No Agenda Show by Adam Curry & John C. Dvorak

No Agenda Show

5,942 Listeners

The Changelog: Software Development, Open Source by Changelog Media

The Changelog: Software Development, Open Source

283 Listeners

LINUX Unplugged by Jupiter Broadcasting

LINUX Unplugged

265 Listeners

BSD Now by JT Pennington

BSD Now

89 Listeners

Open Source Security by Josh Bressers

Open Source Security

43 Listeners

Late Night Linux by The Late Night Linux Family

Late Night Linux

154 Listeners

The Linux Cast by The Linux Cast

The Linux Cast

35 Listeners

Darknet Diaries by Jack Rhysider

Darknet Diaries

7,876 Listeners

This Week in Linux by TuxDigital Network

This Week in Linux

36 Listeners

Linux Dev Time by The Late Night Linux Family

Linux Dev Time

21 Listeners

Hacking Humans by N2K Networks

Hacking Humans

314 Listeners

2.5 Admins by The Late Night Linux Family

2.5 Admins

92 Listeners

Linux Matters by Linux Matters

Linux Matters

20 Listeners