作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试制作一个简单的 av 播放器,在某些情况下,我可以正确获取如下值:
checking /media/timecapsule/Music/02 Baawre.mp3
[mp3 @ 0x7f0698005660] Skipping 0 bytes of junk at 2102699.
dur is 4396400640
duration is 311
checking /media/timecapsule/Music/01 Just Chill.mp3
[mp3 @ 0x7f0694005f20] Skipping 0 bytes of junk at 1318922.
dur is -9223372036854775808
duration is -653583619391
最佳答案
我建议两件事:
1. 确保失败的文件没有损坏,即您可以使用 ffmpeg 命令行工具转储详细信息。
2. 把这个分成2个if条件来避免操作顺序,确保打开成功。
if(!(avformat_open_input(&container, name, NULL, NULL) < 0 && avformat_find_stream_info(container, NULL) < 0)) {
您也可以使用 av_dump_format 来确保它的标题是正确的。见前 - https://www.ffmpeg.org/doxygen/2.8/avio_reading_8c-example.html#a24
克坦
关于gcc - libav 将音频持续时间设为负数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40437920/
由“CreateWindowEx(WS_EX_CLIENTEDGE, "EDIT", "", ES_MULTILINE.."创建的文本框需要\r\n 换行。我将我的 stdoutput 重定向到那个文
我是一名优秀的程序员,十分优秀!