【问题标题】:FFmpeg mp4 to m3u8 but audio not workingFFmpeg mp4 到 m3u8 但音频不起作用
【发布时间】:2016-09-30 05:12:35
【问题描述】:

我正在使用的命令

ffmpeg -y -i video.mp4 -vcodec libx264 -preset superfast -r 25 -vb 240000 -s 
426x240 -aspect 1.77 -acodec libfdk_aac -ab 128k -ar 48000 -an -g 30 -r 30 
-hls_time 3 -hls_list_size 0 -hls_allow_cache 1 -hls_playlist_type vod 
-bsf:a aac_adtstoasc video.m3u8

输出显示“无音频”

http://dailymotion.github.io/hls.js/demo/?src=http%3A%2F%2Ftvfiless.com%2Fvideo.m3u8&enableStreaming=true&autoRecoverError=true&enableWorker=true&levelCapping=-1

任何人都可以帮助我的命令有什么问题

更新

ffmpeg -i video.mp4 -c:v libx264 -c:a aac -strict -2 -f hls -hls_list_size 0 output.m3u8

我试过这个命令,它工作正常,用 m3u8 生成音频,但我想把它和我上面的命令集成。

谢谢

【问题讨论】:

    标签: video ffmpeg mp4 m3u8 hls.js


    【解决方案1】:

    尝试删除

    -一个

    从 cli 中,这意味着在 ffmpeg 中生成输出时丢弃音频。

    【讨论】:

    • remove -an 后返回错误“[mpegts @ 0x3800620] AAC 比特流不是 ADTS 格式并且缺少额外数据”
    【解决方案2】:
    ffmpeg -y -i video1.mp4 -f mp4 -vcodec libx264 -preset superfast -r 25 -vb 240000 -s 426x240 -aspect 1.77 -acodec libfdk_aac -ab 128k -ar 48000 -f hls -hls_time 3 -hls_list_size 0 -hls_allow_cache 1 -hls_playlist_type vod output.m3u8
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-06-20
      • 2018-11-18
      • 1970-01-01
      • 2015-10-27
      • 2021-12-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多