├── .gitignore ├── .gitmodules ├── LICENSE ├── README.md ├── cpili.xcodeproj ├── project.pbxproj └── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ └── cpili.xcscmblueprint ├── include └── cpili │ ├── cpili.h │ └── cpili_version.h └── src ├── h264_defines.h ├── protocol_defines.h ├── protocol_flv.c ├── protocol_flv.h ├── protocol_rtmp.c ├── protocol_rtmp.h ├── tool_callback.h ├── tool_defines.h ├── tool_error.c ├── tool_error.h ├── tool_help.c ├── tool_help.h ├── tool_main.c ├── tool_main.h ├── tool_parser.c ├── tool_parser.h ├── tool_protocol.c ├── tool_protocol.h ├── tool_router.c ├── tool_router.h ├── tool_task.c ├── tool_task.h ├── tool_version.c └── tool_version.h /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | build/ 3 | *.pbxuser 4 | !default.pbxuser 5 | *.mode1v3 6 | !default.mode1v3 7 | *.mode2v3 8 | !default.mode2v3 9 | *.perspectivev3 10 | !default.perspectivev3 11 | xcuserdata 12 | *.xccheckout 13 | *.moved-aside 14 | DerivedData 15 | *.hmap 16 | *.ipa 17 | *.xcuserstate 18 | 19 | # CocoaPods 20 | # 21 | # We recommend against adding the Pods directory to your .gitignore. However 22 | # you should judge for yourself, the pros and cons are mentioned at: 23 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control 24 | # 25 | # Pods/ 26 | 27 | # OS X 28 | .DS_Store 29 | 30 | # Object files 31 | *.o 32 | *.ko 33 | *.obj 34 | *.elf 35 | 36 | # Precompiled Headers 37 | *.gch 38 | *.pch 39 | 40 | # Libraries 41 | *.lib 42 | *.a 43 | *.la 44 | *.lo 45 | 46 | # Shared objects (inc. Windows DLLs) 47 | *.dll 48 | *.so 49 | *.so.* 50 | *.dylib 51 | 52 | # Executables 53 | *.exe 54 | *.out 55 | *.app 56 | *.i*86 57 | *.x86_64 58 | *.hex 59 | 60 | # Debug files 61 | *.dSYM/ 62 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "deps/pili-camera-sdk"] 2 | path = deps/pili-camera-sdk 3 | url = git@github.com:pili-engineering/pili-camera-sdk.git 4 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 0dayZh 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # cpili 2 | 3 | A command line tool for streaming a raw H.264 / flv file over RTMP, it can also convert a raw H.264 file to flv file. 4 | 5 | ## Feature 6 | 7 | - Done 8 | - [x] Flv file -> RTMP Streaming 9 | - TODO 10 | - [ ] H.264 file -> RTMP Streaming 11 | - [ ] AAC file -> RTMP Streaing 12 | 13 | ## Installation (Not ready yet) 14 | 15 | With homebrew: 16 | 17 | ```bash 18 | $ brew install cpili 19 | ``` 20 | 21 | With git: 22 | 23 | ``` 24 | $ git clone git@github.com:pili-engineering/cpili.git /tmp/cpili 25 | $ cd /tmp/cpili 26 | $ make install 27 | ``` 28 | 29 | ## Usage 30 | 31 | ```bash 32 | cpili -i input_file [output options] -o output 33 | 34 | Options 35 | 36 | Generic options 37 | 38 | -h, --help 39 | Show this message. 40 | 41 | -v, --version 42 | Show version information. 43 | 44 | Main options 45 | 46 | -i, --input (input) 47 | Input file path. 48 | 49 | -o, --output (output) 50 | Output RTMP url or output flv file path. 51 | 52 | Video options 53 | 54 | -vf, --video-fps