-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for AMR NB and AMR WB octet-aligned and bandwidth-efficient modes
- Loading branch information
Showing
9 changed files
with
210 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,3 +22,4 @@ _testmain.go | |
*.exe | ||
*.test | ||
*.prof | ||
!/dist/*/*.exe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,44 @@ | ||
# rtpdump | ||
Extract audio file from RTP streams in pcap format | ||
|
||
Extract media files from RTP streams in pcap format | ||
|
||
## codec support | ||
|
||
This program is intended to support usual audio/video codecs used on IMS networks (VoLTE/VoWiFi). | ||
Therefore, some codecs might be limited to usual scenarios on these networks. | ||
|
||
+ AMR - [RFC 4867](https://tools.ietf.org/html/rfc4867) | ||
Supports bandwidth-efficient and octet-aligned modes. | ||
Single-channel, single-frame per packet only. | ||
+ EVS - [3GPP TS 26.445](http://www.3gpp.org/DynaReport/26445.htm) | ||
*Not yet supported.* | ||
+ H263 - [RFC 2190](https://tools.ietf.org/html/rfc2190) | ||
*Not yet supported.* | ||
+ H264 - [RFC 6184](https://tools.ietf.org/html/rfc6184) | ||
*Not yet supported.* | ||
|
||
## usage | ||
|
||
+ rtpdump streams [pcap] | ||
displays RTP streams | ||
+ rtpdump dump -i [pcap] | ||
dumps a media stream. | ||
`-i` options is for interactive dump. Codecs and modes are choosen via prompt. | ||
**Currently only mode available** | ||
|
||
## compiling | ||
|
||
Checkout [gopacket](https://github.com/google/gopacket). | ||
Linux should be straightforward. | ||
For Windows, make sure mingw(32/64) toolchain is on PATH for gopacket WinPcap dependency. Install WinPcap on standard location `C:\WpdPack` | ||
|
||
## planned features | ||
|
||
1. Support for H264 | ||
2. Include stream analisys, packets lost, jitter, etc | ||
3. Media player directly from pcap. ffmpeg support. | ||
4. Jitter buffer to simulate original condition, i.e. packet loss due to jitter | ||
|
||
## contributions | ||
|
||
Are always appreciated. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
package log | ||
|
||
import ( | ||
"fmt" | ||
) | ||
|
||
var TRACE int = 4 | ||
var DEBUG int = 3 | ||
var INFO int = 2 | ||
var WARN int = 1 | ||
var ERROR int = 0 | ||
|
||
var logLevel int = INFO | ||
|
||
|
||
func SetLevel(level int) { | ||
logLevel = level | ||
} | ||
|
||
func slog(level int, msg string, args ...interface{}) { | ||
if logLevel >= level { | ||
fmt.Printf(msg + "\n", args...) | ||
} | ||
} | ||
|
||
func log(level int, msg string) { | ||
if logLevel >= level { | ||
fmt.Println(msg) | ||
} | ||
} | ||
|
||
func Strace(msg string, args ...interface{}) { | ||
slog(TRACE, msg, args...) | ||
} | ||
func Sdebug(msg string, args ...interface{}) { | ||
slog(DEBUG, msg, args...) | ||
} | ||
func Sinfo(msg string, args ...interface{}) { | ||
slog(INFO, msg, args...) | ||
} | ||
func Swarn(msg string, args ...interface{}) { | ||
slog(WARN, msg, args...) | ||
} | ||
func Serror(msg string, args ...interface{}) { | ||
slog(ERROR, msg, args...) | ||
} | ||
|
||
func Trace(msg string) { | ||
log(TRACE, msg) | ||
} | ||
func Debug(msg string) { | ||
log(DEBUG, msg) | ||
} | ||
func Info(msg string) { | ||
log(INFO, msg) | ||
} | ||
func Warn(msg string) { | ||
log(WARN, msg) | ||
} | ||
func Error(msg string) { | ||
log(ERROR, msg) | ||
} |
Oops, something went wrong.