ffmpeg仅分割我的音频文件的第一部分

编程入门 行业动态 更新时间:2024-10-08 08:27:00
本文介绍了ffmpeg仅分割我的音频文件的第一部分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在实施http直播流服务器将音频文件发送到iOS设备。 没有问题的苹果的工具,媒体片段,我的文件是有效的,它的工作正常。

I'm implementing a http live streaming server to send audio file to iOS devices. No problem with Apple's tools, mediafilesegmenter, my files are valid and it works fine.

我正在尝试使用ffmpeg分割相同的文件。我已经下载了最后一个稳定的版本,现在是0.10.2。

I'm trying now to segment the same file using ffmpeg. I've downloaded the last stable version which is the 0.10.2 for now.

这是我如何分割我的mp3文件:

Here is how I try to segment my mp3 file:

./ffmpeg -re -i input.mp3 -f segment -segment_time 10 -segment_list outputList.m3u8 -acodec libmp3lame -map 0 output%03d.mp3

它像预期一样开始映射,但只有一个.mp3文件完成。

It starts the mapping like expected but finish with only one .mp3 file.

我在这个过程中错过了什么吗? 提前感谢

Did I miss something in the process? Thanks in advance.

编辑

最新的命令行:

ffmpeg -i input.mp3 -c:a libmp3lame -b:a 128k -map 0:0 -f segment -segment_time 10 -segment_list outputlist.m3u8 -segment_format mp3 'output%03d.mp3'

它仍然给我一个文件,但文件是孔歌,不仅仅是一部分。 这是ffmpeg的输出:

It still gives me only one file but the file is the hole song, not only one part. Here is the output of ffmpeg:

ffmpeg version 0.10.2 Copyright (c) 2000-2012 the FFmpeg developers built on Apr 20 2012 07:08:29 with gcc 4.5.2 configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libmp3lame libavutil 51. 35.100 / 51. 35.100 libavcodec 53. 61.100 / 53. 61.100 libavformat 53. 32.100 / 53. 32.100 libavdevice 53. 4.100 / 53. 4.100 libavfilter 2. 61.100 / 2. 61.100 libswscale 2. 1.100 / 2. 1.100 libswresample 0. 6.100 / 0. 6.100 libpostproc 52. 0.100 / 52. 0.100 [mp3 @ 0x8e4f120] max_analyze_duration 5000000 reached at 5015510 Input #0, mp3, from 'BeachHouse-Myth.mp3': Metadata: title : Myth artist : Beach House track : / album : Bloom disc : / genre : Alternative TSRC : USSUB1296501 Duration: 00:04:18.69, start: 0.000000, bitrate: 320 kb/s Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16, 320 kb/s Output #0, segment, to 'stream%03d.mp3': Metadata: title : Myth artist : Beach House track : / album : Bloom disc : / genre : Alternative TSRC : USSUB1296501 encoder : Lavf53.32.100 Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16, 128 kb/s Stream mapping: Stream #0:0 -> #0:0 (mp3 -> libmp3lame) Press [q] to stop, [?] for help Truncating packet of size 1024 to 105ate= 0.0kbits/s Truncating packet of size 1024 to 1 size= 0kB time=00:04:18.71 bitrate= 0.0kbits/s video:0kB audio:4042kB global headers:0kB muxing overhead -100.000000%

推荐答案

仅音频可能是一个错误。我联系了FFMPEG玩家错误列表,并提交了一个错误: ffmpeg/trac / ffmpeg / ticket / 1290

Audio only might be a bug. I contacted the FFMPEG player bug list, and a bug is filed: ffmpeg/trac/ffmpeg/ticket/1290

更多推荐

ffmpeg仅分割我的音频文件的第一部分

本文发布于:2023-10-31 06:56:02,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1545353.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:第一部分   音频文件   ffmpeg

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!