2 u010261771 u010261771 于 2016.04.21 10:30 提问

vlc 如何将 mp3 格式转成 wma 格式 ?

我是用这个语句进行转换的:
这样行不sout=#transcode{acode=none}:standard{access=file,mux=asf,dst=Here_Here_Here.wma}
转换成功,但在用windows 自带的播放器时,进行快进时出现卡的状况,导致播放器崩溃。

2个回答

u010261771
u010261771   2016.04.21 10:35

int main(int argc, char* argv[])
{

libvlc_instance_t* inst;
libvlc_media_player_t *mp;
libvlc_media_t *m;          
const char *options[] = {
     ":no-audio",
     ":sout=#transcode{acode=none,ab=128,channels=2, samplerate=44100, threads=2}:standard{access=file,mux=asf,dst=Here_Here_Here.wma} ",
     ":sout-mux-caching=1",
     ":sout-keep"};

            inst = libvlc_new (0, NULL);// Load the VLC engine

const char str[] = "believe.mp3";
m = libvlc_media_new_path (inst, str);// Create a new item
if (!m)
{
    libvlc_release (inst);
    return 0;
}

 for (int i = 0; i < sizeof(options) / sizeof(options[0]); i++)
     libvlc_media_add_option (m, options[i]);

mp = libvlc_media_player_new_from_media (m);// Create a media player playing environment
    if (!mp)
{
    libvlc_release (inst);
    return 0;
}
libvlc_media_player_play (mp);// play the media_player

Sleep(5000);

libvlc_media_player_stop(mp);// Stop playing         

libvlc_media_player_release(mp);// Free the media_player     

//libvlc_media_release (m);// No need to keep the media now
printf("start......");

libvlc_release (inst);
printf("ending......");
return 1;

}

CSDNXIAOD
CSDNXIAOD   2016.04.21 10:55

MP3格式与WMA格式的音乐有什么区别
用VLC转换标准格式mp3
----------------------biu~biu~biu~~~在下问答机器人小D,这是我依靠自己的聪明才智给出的答案,如果不正确,你来咬我啊!

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!