[FFmpeg-trac] #6451(avformat:new): ffmpeg not able to decrypt mp4 fragment files
FFmpeg
trac at avcodec.org
Thu Jun 8 17:07:44 EEST 2017
#6451: ffmpeg not able to decrypt mp4 fragment files
----------------------------------+--------------------------------------
Reporter: jero3000 | Type: defect
Status: new | Priority: critical
Component: avformat | Version: git-master
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
----------------------------------+--------------------------------------
I am trying to decrypt a mp4 fragment file with ffmpeg.
The mp4 fragment file (attached) has the first three segments unencrypted
('senc' box is not present in the first three segments).
Ffmpeg only parses the first 'senc' box and assumes that has the enough
information to decrypt the entire content. When the first 'senc' box
(owned by the fourth segment) is parsed, the subsample info is correctly
added to the "cenc" structure (MOVStreamContext), but when the reader
tries to get the first packet from the forth segment, it assumes that the
current segment is the forth encypted, however it is just first one. As a
result, the offsets accessing the "cenc" structure are incorrect and these
errors are showed in the output:
{{{
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f82c00015a0] auxiliary info offset 4800
greater than auxiliary info size 1600
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f82c00015a0] auxiliary info offset 4816
greater than auxiliary info size 1600
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f82c00015a0] auxiliary info offset 4832
greater than auxiliary info size 1600
...
}}}
How to reproduce:
1. Start the playback with "ffplay" specifying the decryption key:
{{{
% ./ffplay ~/Descargas/cenc.mp4 -decryption_key
"00112233445566778899AABBCDEEFF"
}}}
2. Wait for the fourth segment (10 seconds aprox).
'''The problem was reproduced in the last stable version (3.3.1), but also
in git-master SHA1 id: "35c76f2e138b713928a77a8aa5734bf5c8f9368f"'''
--
Ticket URL: <https://trac.ffmpeg.org/ticket/6451>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list