使用vlc下载u3m8流媒体并存储为文件

http://superuser.com/questions/156474/how-to-record-a-mp3-m3u-stream-using-vlc


These instructions show how to capture/record directly from a MP3/M3U stream of a radio station, using VLC player, setting up VLC via its graphical user interface (GUI). Using Windows version of VLC but instructions should be usable for other platforms.

Please discuss if necessary and contribute. These are working instructions.

Please abide by copyright rules in your locale. The safest option is to record for your own personal use.

The reason why I am posting this is to give people the opportunity to record programmes for listening at a time that suits them as many stations, particularly smaller, community based ones are not well set up for podcasts/listen anytime/listen again. The intention is that you would discard the recording after use if you wish, to avoid any copyright issues. This is a benevolent endeavour aimed at increasing a station's audience by allowing timeshifting of programmes to suit listeners personal schedules.

Find the website of your favourite radio station, e.g. resonancefm.com. If it uses a .m3u playlist file for streaming, locate the page that holds this within the site. You need the .mp3 file stream url that the .m3u contains. So, first save the .m3u file

enter image description here

Open the file in your text editor

enter image description here

enter image description here

Copy the .mp3 stream URL

enter image description here

Run VLC player. Select open network stream.

enter image description here

Paste in the copied URL from earlier.

enter image description here

Click the thin button with the 'o' symbol at the bottom, and from the drop-down menu, select 'Stream'

enter image description here

Click 'Destinations'

enter image description here

Activate transcoding should be unchecked - we don't need to re-encode the mp3 stream. For 'new destinaton' select file, click Add and choose a path and filename for the recording.

enter image description here

Click stream button on bottom right to start the streaming to the file.

enter image description here


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
使用VLC库实现RTP下载功能并保存成MP4文件,可以按照以下步骤进行操作: 1. 初始化VLC库。使用`libvlc_new()`函数创建一个VLC实例并初始化。 2. 创建一个媒体使用`libvlc_media_new_location()`函数创建一个媒体,并将RTP的URL作为参数传递给它。 3. 创建一个媒体播放器。使用`libvlc_media_player_new_from_media()`函数创建一个媒体播放器,并将上一步创建的媒体作为参数传递给它。 4. 创建一个文件输出使用`libvlc_media_add_option()`函数为媒体对象添加一个输出选项,将输出文件的路径和格式设置为MP4。例如,可以添加类似于`--sout=#transcode{vcodec=h264,acodec=mpga,ab=128,channels=2,samplerate=44100}:std{access=file,mux=mp4,dst=output.mp4}`的选项。 5. 设置回调函数。使用`libvlc_media_player_set_media()`函数将媒体设置给媒体播放器,并使用`libvlc_media_player_set_callbacks()`函数和`libvlc_media_player_set_format()`函数设置回调函数,以便在下载过程中处理数据。 6. 开始播放。使用`libvlc_media_player_play()`函数开始播放RTP。 7. 在回调函数中处理数据。在回调函数中,你将收到RTP的每一帧数据。你可以在回调函数中将数据写入到文件中,实现下载功能。 8. 等待下载完成。可以使用循环来等待下载完成,或者在下载完成时通过回调函数进行通知。 请注意,以上步骤提供了一个基本的框架来实现RTP下载功能,并保存成MP4文件。具体的实现方式可能会有所不同,取决于你使用的编程语言和操作系统。你需要查阅相关的文档和示例代码来获取更详细的信息。另外,请确保你了解并遵守相关的法律和使用协议,以便在使用RTP时不会侵犯版权或违反法律规定。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值