我正在尝试将aac
流转换为破折号。问题是我收到了很多错误,如下所示(虽然它似乎将其分割为多个文件,但我在播放器上也收到了错误)。问题是我为什么会收到这些错误以及如何修复它?如果我简单地将其“复制”为单个mp4文件,它就不会出错。
ffmpeg -i "a.mkv" -y -map 0:1 -c:0 copy -min_seg_duration 1000000
-use_timeline 1 -use_template 1 -init_seg_name init.mp4s
-media_seg_name "\$Number\$.mp4s" -adaptation_sets "id=1,streams=0"
-remove_at_exit 0 -f dash -dash 1
"out/stream.mpd" -loglevel error
输出
[mp4 @ 0x7fbb70819600] Application provided duration: -32 / timestamp: 40475608 is out of range for mov/mp4 format
[mp4 @ 0x7fbb70819600] Application provided duration: -32 / timestamp: 40764376 is out of range for mov/mp4 format
[mp4 @ 0x7fbb70819600] Application provided duration: -32 / timestamp: 40860664 is out of range for mov/mp4 format
[mp4 @ 0x7fbb70819600] Application provided duration: -32 / timestamp: 41149432 is out of range for mov/mp4 format
[mp4 @ 0x7fbb70819600] Application provided duration: -32 / timestamp: 41390056 is out of range for mov/mp4 format
[mp4 @ 0x7fbb70819600] Application provided duration: -32 / timestamp: 41823208 is out of range for mov/mp4 format
复制到单个MP4工作正常ffmpeg-i“a.mkv”-y-映射0:1-c:0复制-f MP4-破折号1“out/out.MP4”-日志级别错误
探针
ffprobe a.mkv
ffprobe version 3.4 Copyright (c) 2007-2017 the FFmpeg developers
built with Apple LLVM version 9.0.0 (clang-900.0.37)
configuration: --prefix=/usr/local/Cellar/ffmpeg/3.4 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-gpl --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-opencl --enable-videotoolbox --disable-lzma
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libavresample 3. 7. 0 / 3. 7. 0
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
libpostproc 54. 7.100 / 54. 7.100
Input #0, matroska,webm, from 'a.mkv':
Metadata:
encoder : libebml v1.3.1 + libmatroska v1.4.2
creation_time : 2017-03-11T02:56:50.000000Z
Duration: 02:12:52.39, start: 0.000000, bitrate: 740 kb/s
Chapter #0:0: start 0.000000, end 520.270000
Metadata:
title : 00:00:00.000
Chapter #0:1: start 520.270000, end 1135.718000
Metadata:
title : 00:08:40.270
Chapter #0:2: start 1135.718000, end 1703.660000
Metadata:
title : 00:18:55.718
Chapter #0:3: start 1703.660000, end 2314.187000
Metadata:
title : 00:28:23.660
Chapter #0:4: start 2314.187000, end 2888.594000
Metadata:
title : 00:38:34.187
Chapter #0:5: start 2888.594000, end 3499.246000
Metadata:
title : 00:48:08.594
Chapter #0:6: start 3499.246000, end 4154.692000
Metadata:
title : 00:58:19.246
Chapter #0:7: start 4154.692000, end 4646.392000
Metadata:
title : 01:09:14.692
Chapter #0:8: start 4646.392000, end 5373.660000
Metadata:
title : 01:17:26.392
Chapter #0:9: start 5373.660000, end 5882.085000
Metadata:
title : 01:29:33.660
Chapter #0:10: start 5882.085000, end 6627.871000
Metadata:
title : 01:38:02.085
Chapter #0:11: start 6627.871000, end 7144.471000
Metadata:
title : 01:50:27.871
Chapter #0:12: start 7144.471000, end 7451.944000
Metadata:
title : 01:59:04.471
Chapter #0:13: start 7451.944000, end 7972.394000
Metadata:
title : 02:04:11.944
Stream #0:0(eng): Video: h264 (High), yuv420p(tv, bt709/unknown/unknown, progressive), 720x300 [SAR 1:1 DAR 12:5], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
Metadata:
title : X264
BPS : 623765
BPS-eng : 623765
DURATION : 02:12:52.311000000
DURATION-eng : 02:12:52.311000000
NUMBER_OF_FRAMES: 191144
NUMBER_OF_FRAMES-eng: 191144
NUMBER_OF_BYTES : 621606403
NUMBER_OF_BYTES-eng: 621606403
_STATISTICS_WRITING_APP: mkvmerge v8.3.0 ('Over the Horizon') 64bit
_STATISTICS_WRITING_APP-eng: mkvmerge v8.3.0 ('Over the Horizon') 64bit
_STATISTICS_WRITING_DATE_UTC: 2017-03-11 02:56:50
_STATISTICS_WRITING_DATE_UTC-eng: 2017-03-11 02:56:50
_STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream #0:1(eng): Audio: aac (LC), 48000 Hz, stereo, fltp (default)
Metadata:
BPS : 114797
BPS-eng : 114797
DURATION : 02:12:52.394000000
DURATION-eng : 02:12:52.394000000
NUMBER_OF_FRAMES: 373706
NUMBER_OF_FRAMES-eng: 373706
NUMBER_OF_BYTES : 114401387
NUMBER_OF_BYTES-eng: 114401387
_STATISTICS_WRITING_APP: mkvmerge v8.3.0 ('Over the Horizon') 64bit
_STATISTICS_WRITING_APP-eng: mkvmerge v8.3.0 ('Over the Horizon') 64bit
_STATISTICS_WRITING_DATE_UTC: 2017-03-11 02:56:50
_STATISTICS_WRITING_DATE_UTC-eng: 2017-03-11 02:56:50
_STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
沙卡调试
Assertion failed: This should be an update of the last segment in a period
shaka.media.SegmentIndex.merge @ segment_index.js:153
shaka.dash.SegmentTemplate.createStream @ segment_template.js:82
shaka.dash.DashParser.parseRepresentation_ @ dash_parser.js:1080
shaka.dash.DashParser.parseAdaptationSet_ @ dash_parser.js:978
shaka.dash.DashParser.parsePeriod_ @ dash_parser.js:722
shaka.dash.DashParser.parsePeriods_ @ dash_parser.js:626
shaka.dash.DashParser.processManifest_ @ dash_parser.js:520
(anonymous) @ dash_parser.js:431
Promise resolved (async)
shaka.dash.DashParser.parseManifest_ @ dash_parser.js:430
(anonymous) @ dash_parser.js:397
Promise resolved (async)
shaka.dash.DashParser.requestManifest_ @ dash_parser.js:390
shaka.dash.DashParser.onUpdate_ @ dash_parser.js:1161
setTimeout (async)
shaka.dash.DashParser.setUpdateTimer_ @ dash_parser.js:1209
(anonymous) @ dash_parser.js:331
Promise resolved (async)
shaka.dash.DashParser.start @ dash_parser.js:329
(anonymous) @ player.js:555
Promise resolved (async)
shaka.util.CancelableChain.then @ cancelable_chain.js:72
shaka.Player.load @ player.js:499
initPlayer @ ?x=149&y=88&q=http%3A%2F%2Flocalhost%3A8080%2Fmeta%2F%3FbucketID%3D%2FVolumes%2FTV%2FFa%26channelID%3D%2FVolumes%2FTV%26containerID%3D%2FUsers%2F%2Fbrev%%2FL1ZvbHVtZXMvVFYvRmFudGFzdGljLkJlYXN0cy5hbmQuV2hlcmUudG8uRmluZC5UaGVtLjIwMTYuQkRSaXAueDI2NC1TUEFSS1MvYS5ta3Y%2F97M4TS6IqnQ.mpd:392
463segment_index.js:145 Refusing to rewrite original references on update!
shaka.media.SegmentIndex.merge @ segment_index.js:145
shaka.dash.SegmentTemplate.createStream @ segment_template.js:82
shaka.dash.DashParser.parseRepresentation_ @ dash_parser.js:1080
shaka.dash.DashParser.parseAdaptationSet_ @ dash_parser.js:978
shaka.dash.DashParser.parsePeriod_ @ dash_parser.js:722
shaka.dash.DashParser.parsePeriods_ @ dash_parser.js:626
shaka.dash.DashParser.processManifest_ @ dash_parser.js:520
(anonymous) @ dash_parser.js:431
Promise resolved (async)
shaka.dash.DashParser.parseManifest_ @ dash_parser.js:430
(anonymous) @ dash_parser.js:397
Promise resolved (async)
shaka.dash.DashParser.requestManifest_ @ dash_parser.js:390
shaka.dash.DashParser.onUpdate_ @ dash_parser.js:1161
setTimeout (async)
shaka.dash.DashParser.setUpdateTimer_ @ dash_parser.js:1209
(anonymous) @ dash_parser.js:331
Promise resolved (async)
shaka.dash.DashParser.start @ dash_parser.js:329
(anonymous) @ player.js:555
Promise resolved (async)
shaka.util.CancelableChain.then @ cancelable_chain.js:72
shaka.Player.load @ player.js:499
initPlayer @ ?x=149&y=88&q=http%3A%2F%2Flocalhost%3A8080%2Fmeta%2F%3FbucketID%3D%2FVolumes%2FTV%2FFa%26channelID%3D%2FVolumes%2FTV%26containerID%3D%2FUsers%2F%2Fbrev%%2FL1ZvbHVtZXMvVFYvRmFudGFzdGljLkJlYXN0cy5hbmQuV2hlcmUudG8uRmluZC5UaGVtLjIwMTYuQkRSaXAueDI2NC1TUEFSS1MvYS5ta3Y%2F97M4TS6IqnQ.mpd:392
舍克船长向我指出了这个问题:)
我没有详细研究它,但从第一眼来看,我认为您的ffmpeg
命令的问题在于,您告诉ffmpeg
创建最小段长为1秒的短跑媒体段,但同时您复制编码的比特流(在指定的粒度下可能没有随机访问点),我更像是一个视频人(这里我假设音频也有说唱等)
以下是我要做的:
选项1,如果您只需要一个表示:
ffmpeg -i a.mkv -map 0:1 -c:a aac -b:a 128k -use_timeline 1 -use_template 1 -remove_at_exit 0 -seg_duration 1 -f dash audio.mpd
选项2,如果您需要多个比特率,这里是一个具有两种表示的示例:
ffmpeg -i a.mkv -map 0:1 -map 0:1 -c:a aac -b:a:0 128k -b:a:1 64k -use_timeline 1 -use_template 1 -remove_at_exit 0 -seg_duration 1 -adaptation_sets "id=0,streams=0,1" -f dash audio.mpd
我很快用dash测试了这些命令。js使用youtube上的内容:
youtube-dl -f 137+140 https://www.youtube.com/watch\?v\=QPC4Kyx-AVw -o in.mp4
ffmpeg -i in.mp4 -c copy a.mkv
它有一个h.264
视频流#0:0
和一个aac
音频流#0:1
我正在寻找一种从“ISO 8601持续时间格式”(P0DT0H0M0S)转换为小时的便捷方法。 到目前为止,我想到了这个: 如您所见,我的方法是将数字拆分并乘以24、1、1/60、1/3600以得到小时。我可以减少代码量吗? 样本数据和所需结果 输入: 'P1DT2H3M44S' (1 天 2 小时 3 分 44 秒) 期望输出: 26.062222222222222 (这是小时)
在我的应用程序中,用户需要能够输入持续时间,包括分钟和秒。 我正在考虑使用Windows中的控件来更改时间,虽然我只需要几分钟和几秒钟,而且箭头也很好,但不是必需的。 JavaFX 2中是否已经有此控件 如果没有,我如何创建这样的控件 上述Windows控件的屏幕截图: 谢谢你的提示!
我使用Android的新Volley框架向我的服务器发出请求。但它会在得到响应之前超时,尽管它确实会响应。 我尝试添加以下代码:
本文向大家介绍php格式化时间戳,包括了php格式化时间戳的使用技巧和注意事项,需要的朋友参考一下 CMS中一般显示时间比较新的文章需要显示几分钟前,几天前这样,但是一般数据库里面记录的都是时间戳(至少我习惯这样),所以就需要一个转化的过程,根据网上的资料加上自己的修改整理封装了两段代码 下面是封装好的方法 或者 更详细的 再分享一个类似的
问题内容: 要获取有关媒体文件的大量信息,可以做 它会输出很多行,特别是一行 我只想输出,所以我尝试 但是它可以打印所有内容,而不仅仅是长度。 甚至输出所有内容。 如何获得持续时间长度? 问题答案: ffmpeg正在将该信息写入,而不是。尝试这个: 注意重定向到: 编辑: 您的陈述也不起作用。尝试这个:
我正在寻找javascript/jquery库,它可以为我提供UI和功能来选择ISO 8601格式的持续时间。 用户界面应包含多个级联选择框,用户可以选择月,小时,天,周...在ISO_8601中定义。 选择后,库应将其转换为标准ISO_8601持续时间格式的代码,反之亦然。 例如,“P3Y6M4DT12H30M5S”表示持续时间为“三年六个月四天十二小时三十分五秒”。