Opened 6 years ago
Last modified 4 years ago
#7656 new defect
recording of .mpd list failed after 10 second recording
Reported by: | Anan5a | Owned by: | |
---|---|---|---|
Priority: | minor | Component: | avformat |
Version: | git-master | Keywords: | dash mov |
Cc: | blue-t@web.de | Blocked By: | |
Blocking: | Reproduced by developer: | yes | |
Analyzed by developer: | no |
Description
Summary of the bug:
When trying to record an encrypted video stream (manifest.mpd) file the ffmpeg command record first 10sec and fails with error 'saiz atom found without saio'. The recorded 10 sec has the right audio and video streams
How to reproduce:
% ffmpeg -f dash -i https://cdn.cloud.altbalaji.com/content/2016-11/771-582320d3d2ac9/manifest.mpd -c copy output.mp4 ffmpeg version git master built on Debian testing
Error output :
root@app-server:~# ffmpeg -f dash -i https://cdn.cloud.altbalaji.com/content/2016-11/771-582320d3d2ac9/manifest.mpd -c copy out.mp4 ffmpeg version 4.1-1 Copyright (c) 2000-2018 the FFmpeg developers built with gcc 8 (Debian 8.2.0-12) configuration: --prefix=/usr --extra-version=1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared libavutil 56. 22.100 / 56. 22.100 libavcodec 58. 35.100 / 58. 35.100 libavformat 58. 20.100 / 58. 20.100 libavdevice 58. 5.100 / 58. 5.100 libavfilter 7. 40.101 / 7. 40.101 libavresample 4. 0. 0 / 4. 0. 0 libswscale 5. 3.100 / 5. 3.100 libswresample 3. 3.100 / 3. 3.100 libpostproc 55. 3.100 / 55. 3.100 Input #0, dash, from 'https://cdn.cloud.altbalaji.com/content/2016-11/771-582320d3d2ac9/manifest.mpd': Duration: 01:51:12.00, start: 0.000000, bitrate: 0 kb/s Program 0 Stream #0:0: Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 320x180, 0 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc Metadata: variant_bitrate : 152616 id : 0 Stream #0:1: Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 480x270, 0 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc Metadata: variant_bitrate : 397732 id : 2 Stream #0:2: Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 640x360, 0 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc Metadata: variant_bitrate : 595344 id : 4 Stream #0:3: Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 640x360, 0 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc Metadata: variant_bitrate : 840229 id : 6 Stream #0:4: Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1024x576, 0 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc Metadata: variant_bitrate : 1188553 id : 8 Stream #0:5: Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1024x576, 0 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc Metadata: variant_bitrate : 1778233 id : 10 Stream #0:6: Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1280x720, 1 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc Metadata: variant_bitrate : 2368356 id : 12 Stream #0:7: Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1280x720, 1 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc Metadata: variant_bitrate : 3250611 id : 14 Stream #0:8: Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1920x1080, 2 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc Metadata: variant_bitrate : 4436802 id : 16 Stream #0:9: Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 0 kb/s Metadata: variant_bitrate : 69629 id : 1 Stream #0:10: Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 0 kb/s Metadata: variant_bitrate : 69629 id : 3 Stream #0:11: Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 0 kb/s Metadata: variant_bitrate : 69629 id : 5 Stream #0:12: Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 0 kb/s Metadata: variant_bitrate : 69629 id : 7 Stream #0:13: Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 0 kb/s Metadata: variant_bitrate : 69629 id : 9 Stream #0:14: Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 0 kb/s Metadata: variant_bitrate : 69629 id : 11 Stream #0:15: Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 0 kb/s Metadata: variant_bitrate : 101629 id : 13 Stream #0:16: Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 0 kb/s Metadata: variant_bitrate : 101629 id : 15 Stream #0:17: Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 0 kb/s Metadata: variant_bitrate : 101629 id : 17 File 'out.mp4' already exists. Overwrite ? [y/N] y Output #0, mp4, to 'out.mp4': Metadata: encoder : Lavf58.20.100 Stream #0:0: Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1920x1080, q=2-31, 2 kb/s, 25 fps, 25 tbr, 12800 tbn, 25 tbc Metadata: variant_bitrate : 4436802 id : 16 Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 0 kb/s Metadata: variant_bitrate : 69629 id : 1 Stream mapping: Stream #0:8 -> #0:0 (copy) Stream #0:9 -> #0:1 (copy) Press [q] to stop, [?] for help [dash @ 0x563b93e7f540] No longer receiving stream_index 0 [dash @ 0x563b93e7f540] No longer receiving stream_index 1 [dash @ 0x563b93e7f540] No longer receiving stream_index 2 [dash @ 0x563b93e7f540] No longer receiving stream_index 3 [dash @ 0x563b93e7f540] No longer receiving stream_index 4 [dash @ 0x563b93e7f540] No longer receiving stream_index 5 [dash @ 0x563b93e7f540] No longer receiving stream_index 6 [dash @ 0x563b93e7f540] No longer receiving stream_index 7 [dash @ 0x563b93e7f540] No longer receiving stream_index 10 [dash @ 0x563b93e7f540] No longer receiving stream_index 11 [dash @ 0x563b93e7f540] No longer receiving stream_index 12 [dash @ 0x563b93e7f540] No longer receiving stream_index 13 [dash @ 0x563b93e7f540] No longer receiving stream_index 14 [dash @ 0x563b93e7f540] No longer receiving stream_index 15 [dash @ 0x563b93e7f540] No longer receiving stream_index 16 [dash @ 0x563b93e7f540] No longer receiving stream_index 17 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x563b95bc2000] Failed to seek for auxiliary info, will only parse senc atoms for encryption info [mov,mp4,m4a,3gp,3g2,mj2 @ 0x563b95bc2000] saiz atom found without saio frame= 244 fps=0.0 q=-1.0 Lsize= 2492kB time=00:00:09.98 bitrate=2044.8kbits/s speed= 147x video:2402kB audio:79kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.435219% root@app-server:~#
Change History (6)
comment:1 by , 6 years ago
Component: | ffmpeg → avformat |
---|---|
Keywords: | dash added |
comment:2 by , 6 years ago
Not a bug either. This stream is protected with Widevine DRM. You would need to provide Content Key for decryption, which is delivered only as part of a DRM license.
It is common with some Widevine encryption tools to intentionally leave first 10 seconds unencrypted, that's also why you can get that part and not the encrypted rest.
comment:4 by , 6 years ago
Yes, two methods available:
- each DRM system has its own UUID, this mpd manifest declared in its schemeIdUri attribute that its UUID is edef8ba9-79d6-4ace-a3c8-27dcd51d21ed, which belongs to Widevine, please see for example https://dashif.org/identifiers/content_protection/ for more info.
- utilized DRM system can also be identified by the same UUID in PSSH box of an initialization mp4 segment (I am not too acquainted with webm container, but it appears to also include hints about encryption https://dvcs.w3.org/hg/html-media/raw-file/tip/encrypted-media/encrypted-media-fpwd.html#webm).
There can be more DRM systems utilized for each stream as long as all adhere to CENC standards. Therefore the manifest can list more than one ContentProtection
element for each track and have more than one PSSH box in mp4 initialization segments.
comment:5 by , 6 years ago
Keywords: | mov added |
---|---|
Priority: | normal → minor |
Encryption detection seems useful to me.
comment:6 by , 4 years ago
Cc: | added |
---|
Not a regression.
Does the stream work with other players?