ffmpeg仅分割我的音频文件的第一部分 [英] ffmpeg segments only the first part of my audio file

查看:816
本文介绍了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玩家错误列表,并提交了一个错误: http://ffmpeg.org/trac / ffmpeg / ticket / 1290

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

这篇关于ffmpeg仅分割我的音频文件的第一部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆