-
Notifications
You must be signed in to change notification settings - Fork 9
Usage Examples
-
Most basic usage:
caterpillar http://live.us.sinaimg.cn/000XDYqUjx07gRaRHSCz070d010002TZ0k01.m3u8
Generates
000XDYqUjx07gRaRHSCz070d010002TZ0k01.mp4
in the current directory. -
Use a different output file:
caterpillar http://live.us.sinaimg.cn/000XDYqUjx07gRaRHSCz070d010002TZ0k01.m3u8 /tmp/20171226.ts
Generates
/tmp/20171226.ts
instead. Note that all container formats that (1) are supported by FFmpeg and (2) can hold the video and audio streams could be used, e.g.,.mp4
,.mov
,.mkv
,.flv
, etc. -
Keep intermediate files for further tweaking:
caterpillar -k http://live.us.sinaimg.cn/000XDYqUjx07gRaRHSCz070d010002TZ0k01.m3u8
-k
is an alias of--keep
. Intermediate files are kept in the000XDYqUjx07gRaRHSCz070d010002TZ0k01
directory and will be reused if you run similar commands later. -
If the desired output file already exists, and you want to overwrite it, use
-f
or--force
:caterpillar -f http://live.us.sinaimg.cn/000XDYqUjx07gRaRHSCz070d010002TZ0k01.m3u8
-
Switch to a non-default concat method (see Notes for details), which is what you should try if the default concat method (
concat_demuxer
) doesn't work or generates an unsatisfactory file:caterpillar -m 1 http://live.us.sinaimg.cn/000XDYqUjx07gRaRHSCz070d010002TZ0k01.m3u8
Here
-m
is an alias for--concat-method
and1
is an alias for theconcat_protocol
method. -
Run
caterpillar -h
for complete help on arguments and options (also reproduced in the Usage section of README).