[FFmpeg-user] Tactics for file splitting: Does -fs work when copying?

Andrew Skretvedt andrew.skretvedt at gmail.com
Fri Jan 24 02:12:04 CET 2014


Hello,

The essence of my question is the subject line, read-on for a full discussion.

There must be a number of good ways to accomplish this, but one I
selected didn't work as I expected. I'll explain what I did and
repliers can suggest alternatives or correct me. The -fs option could
have a bug, or it may simply be incompletely documented (either case
should be fixed).

Scenario: I have a big video file that I need to split into two chunks
to fit into available media for playback. Precision isn't important.
The output files may overlap a bit in their content from the original
video file, but each must be independently playable. I consulted the
current FFmpeg documentation to help me conjure an appropriate command
line.

Today I'm using ffmpeg version N-60106-ge6d1c66, a Zeranoe static
build for Windows.

Here's what I tried to create the first chunk, limiting output to
available storage space:

ffmpeg -i input.avi -c copy -fs 600MiB output_part1.avi

The result was that the -fs option was not respected, and the command
produced a complete copy of the input instead. Had this worked, my
second step would've been to take note of the time= display on the
console output for the and begin the second chunk from approximately
this time using the -ss option (was that even a sensible approach?).

As a second try, I instead took a guess as to how much duration of the
input video would produce about the same limit filesize and issued
this:

ffmpeg -i input.avi -c copy -to 01:05:00 output_part1.avi

This worked as expected, the output was closed at the specified time,
and I had a file of workable size.

If the -fs option isn't meant for doing what I'd tried to do above,
than the current documentation should be revised to point out limiting
use cases or the scope for which the option may be properly employed.
Otherwise, this looks like a bit of a bug, and perhaps I should file a
ticket?

What if I wanted to divide (copy) an input video into multiple
independently playable segments? Would options like -ss, -to, and/or
-fs be the best approach?

Thanks!
-Andrew


More information about the ffmpeg-user mailing list