前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >mpg123 学习进阶1

mpg123 学习进阶1

作者头像
用户4148957
发布2022-06-14 08:14:29
4060
发布2022-06-14 08:14:29
举报
文章被收录于专栏:C/C++与音视频

基本介绍:

It can play MPEG1.0/2.0/2.5 layer I, II, II(1, 2, 3;-) files (VBR files are fine, too) and produce output on a number ofdifferent ways: raw data to stdout and different sound systems depending onyour platform (see INSTALL).

mpg123 is fast. Any faster software playeris probably based on some hacked mpg123;-)

MPlayer included mpg123 source code in it'smp3lib and we have to be thankful for the MPlayer folks adding SSE, 3DNowExtand AltiVec optimizations over the years, which we were able to backport.

The mpg123 engine is able to decode in fullcompliance to ISO/IEC 11172-3, for all three layers, using floating point orinteger math (the latter since 1.8.1).

使用方法:

Mpg123 is a console program - normally itjust plays a list of files you specify on command line and that's it. See theincluded manpage or

       mpg123--help

or, for the full story,

       mpg123--longhelp

on command line syntax/options. I encourageyou to check out the --gapless and --rva-album/--rva-mix options:-)

In the simple "mpg123 file1.mp3file2.mp3" mode, the only thing you can do to interact is to press Ctrl+Cto skip to next track or end the whole playback if pressing it twice.

Note that this Ctrl+C behaviour is specialto this mode; when any of the following is activated, Ctrl+C will just kill theprogram like you would expect normally (this changed from earlier versions).

3.2 Advanced Console Usage

You can specify the option -C to enable aterminal control interface enabling to influence playback on currenttitle/playlist by pressing some key:

 -=terminal control keys =-

[s] or [ ]  interrupt/restartplayback (i.e. 'pause')

[f]   nexttrack

[d]   previoustrack

[b]   backto beginning of track

[p]   pausewhile looping current sound chunk

[.]    forward

[,]    rewind

[:]    fastforward

[;]    fastrewind

[>]   fineforward

[<]   finerewind

[+]   volumeup

[-]   volumedown

[r]   RVAswitch

[v]   verboseswitch

[l]    listcurrent playlist, indicating current track there

[t]    displaytag info (again)

[m]  printMPEG header info (again)

[h]   thishelp

[q]   quit

You can change these bindings to key toyour liking by modifying term.h .

3.参考demo: mpg123.c doc\examples 下面的例子libmpg.c等

Wav.c是wav播放和转码,解析的相关接口的实现。

Mpg123towav.c是mpg格式转码成wav的例子

4.开发api:libmpg123.c

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2014-02-04,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档