castlabs / dashencrypt Goto Github PK
View Code? Open in Web Editor NEWDASH fragmenter/segmenter and encrypter
Home Page: http://castlabs.com/products/dash-encrypt/
License: Mozilla Public License 2.0
DASH fragmenter/segmenter and encrypter
Home Page: http://castlabs.com/products/dash-encrypt/
License: Mozilla Public License 2.0
First it was missing com.googlecode.mp4parser 1.1.8, I went and serached for it and I saw that there is no 1.1.8 - so I changed it do 1.1.9.
This worked,
now I have: while building 1.7.21
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /Users/samek/Downloads/dashencrypt-dash.encrypt-1.7.21/dash.fragmencrypter/src/main/java/com/castlabs/dash/dashfragmenter/sequences/DashFileSetSequence.java:[1178,54] cannot find symbol
symbol: variable Base64
location: class com.castlabs.dash.dashfragmenter.sequences.DashFileSetSequence
[ERROR] /Users/samek/Downloads/dashencrypt-dash.encrypt-1.7.21/dash.fragmencrypter/src/main/java/com/castlabs/dash/dashfragmenter/sequences/DashFileSetSequence.java:[1184,50] cannot find symbol
symbol: variable Base64
location: class com.castlabs.dash.dashfragmenter.sequences.DashFileSetSequence
[ERROR] /Users/samek/Downloads/dashencrypt-dash.encrypt-1.7.21/dash.fragmencrypter/src/main/java/com/castlabs/dash/dashfragmenter/representation/AbstractRepresentationBuilder.java:[320,54] cannot find symbol
symbol: variable Base64
location: class com.castlabs.dash.dashfragmenter.representation.AbstractRepresentationBuilder
[ERROR] /Users/samek/Downloads/dashencrypt-dash.encrypt-1.7.21/dash.fragmencrypter/src/main/java/com/castlabs/dash/dashfragmenter/representation/AbstractRepresentationBuilder.java:[321,57] cannot find symbol
symbol: variable Base64
location: class com.castlabs.dash.dashfragmenter.representation.AbstractRepresentationBuilder
[ERROR] /Users/samek/Downloads/dashencrypt-dash.encrypt-1.7.21/dash.fragmencrypter/src/main/java/com/castlabs/dash/dashfragmenter/representation/AbstractRepresentationBuilder.java:[331,57] cannot find symbol
symbol: variable Base64
location: class com.castlabs.dash.dashfragmenter.representation.AbstractRepresentationBuilder
[INFO] 5 errors
I tried it on OSX and Ubuntu 14.04 - same error. Also I've tried compiling com.googlecode.mp4parser and entering it in my own repo.
For inputfiles with name (and audio type):
tearsofsteel_4k.ac3.mp4 or tearsofsteel_4k.ec3.mp4
resulting BaseURLs for both files will be set to:
tearsofsteel_4k.mp4
and Representation ids:
id="tearsofsteel_4k.mp4"
Expected:
id="tearsofsteel_4k.ac3.mp4"
id="tearsofsteel_4k.ec3.mp4"
and
tearsofsteel_4k.ac3.mp4
tearsofsteel_4k.ec3.mp4
Doesn`t happen though for files with name tearsofsteel_4k_ITA.heaac.mp4
According to ISO/IEC 23009-1:2012(5.3.9.2.2), if @timescale is not present on any level, it shall be set to 1. So SegmentListManifestWriterImpl class should check and set @timescale of SegmentList, otherwise the segment timeline cannot be converted properly.
By default it outputs files to the root directory (/), it should be rather current working directory.
Hi,
I am using dashencrypt to create dash streams with cenc encryption.But the output mpd is not having the pssh box. Can you please let me know how to generated mpd for dash cenc for widevine
I.e. dashing a file with name "3450924385.mp4" results in a manifest entry like:
"Representation codecs="avc1.64001f" width="640" height="360" frameRate="25000/1000" sar="1:1" bandwidth="1275400" id="3450924385""
Field "id" may not start with a number though. Ideally this is automatically prefixed or catched in some other way.
When I try to build the source it gives me this error:
Failed to execute goal on project dash.fragmencrypter: Could not resolve dependencies for project
com.castlabs.dash:dash.fragmencrypter:jar:1.7-SNAPSHOT: Failure to find
com.googlecode.mp4parser:isoparser:jar:1.0.7.2-SNAPSHOT in
https://oss.sonatype.org/content/repositories/comgooglecodemp4parser-1062 was cached in the local
repository, resolution will not be reattempted until the update interval of mp4parserstaging has
elapsed or updates are forced
I've used this command
And get the following output. Please suggest.
vid_rep_1.mp4[1]'s starttime after edits: 0.0
vid_rep_2.mp4[1]'s starttime after edits: 0.0
vid_rep_3.mp4[1]'s starttime after edits: 0.0
sou_rep_1.mp4[1]'s starttime after edits: -0.105375
Jan 12, 2015 10:00:22 p.m. com.castlabs.dash.dashfragmenter.sequences.DashFileSetSequence createSingleTrackDashedMp4s
INFO: Creating model for vid_rep_1.mp4...
Jan 12, 2015 10:00:25 p.m. com.castlabs.dash.dashfragmenter.sequences.DashFileSetSequence createSingleTrackDashedMp4s
INFO: Creating model for vid_rep_3.mp4...
Jan 12, 2015 10:00:28 p.m. com.castlabs.dash.dashfragmenter.sequences.DashFileSetSequence createSingleTrackDashedMp4s
INFO: Creating model for vid_rep_2.mp4...
Jan 12, 2015 10:00:31 p.m. com.castlabs.dash.dashfragmenter.sequences.DashFileSetSequence createSingleTrackDashedMp4s
INFO: Creating model for sou_rep_1.mp4...
Jan 12, 2015 10:00:33 p.m. com.castlabs.dash.dashfragmenter.sequences.DashFileSetSequence writeFilesSingleSidx
INFO: Writing...
Jan 12, 2015 10:00:36 p.m. com.castlabs.dash.dashfragmenter.sequences.DashFileSetSequence writeFilesSingleSidx
INFO: Done.
Jan 12, 2015 10:00:36 p.m. com.castlabs.dash.dashfragmenter.sequences.DashFileSetSequence writeFilesSingleSidx
INFO: Writing...
Jan 12, 2015 10:00:40 p.m. com.castlabs.dash.dashfragmenter.sequences.DashFileSetSequence writeFilesSingleSidx
INFO: Done.
Jan 12, 2015 10:00:40 p.m. com.castlabs.dash.dashfragmenter.sequences.DashFileSetSequence writeFilesSingleSidx
INFO: Writing...
Jan 12, 2015 10:00:46 p.m. com.castlabs.dash.dashfragmenter.sequences.DashFileSetSequence writeFilesSingleSidx
INFO: Done.
Jan 12, 2015 10:00:46 p.m. com.castlabs.dash.dashfragmenter.sequences.DashFileSetSequence writeFilesSingleSidx
INFO: Writing...
Exception in thread "main" java.lang.RuntimeException: javax.crypto.IllegalBlockSizeException: 5 trailing bytes
at com.googlecode.mp4parser.boxes.cenc.CencEncryptingSampleList$EncryptedSampleImpl.writeTo(CencEncryptingSampleList.java:147)
at com.googlecode.mp4parser.authoring.builder.FragmentedMp4Builder$1Mdat.getBox(FragmentedMp4Builder.java:223)
at com.castlabs.dash.dashfragmenter.sequences.DashFileSetSequence.writeFilesSingleSidx(DashFileSetSequence.java:375)
at com.castlabs.dash.dashfragmenter.sequences.DashFileSetSequence.writeFiles(DashFileSetSequence.java:247)
at com.castlabs.dash.dashfragmenter.sequences.DashFileSetSequence.run(DashFileSetSequence.java:196)
at com.castlabs.dash.dashfragmenter.cmdlines.DashFileSetEncrypt.run(DashFileSetEncrypt.java:139)
at com.castlabs.dash.dashfragmenter.Main.main(Main.java:48)
Caused by: javax.crypto.IllegalBlockSizeException: 5 trailing bytes
at gnu.javax.crypto.jce.cipher.CipherAdapter.engineDoFinal(libgcj.so.10)
at javax.crypto.Cipher.doFinal(libgcj.so.10)
at javax.crypto.Cipher.doFinal(libgcj.so.10)
at com.googlecode.mp4parser.boxes.cenc.CencEncryptingSampleList$EncryptedSampleImpl.writeTo(CencEncryptingSampleList.java:142)
...6 more
create KDF for key transport. Allow multiple encryption certs.
Whenever a certificate is given in the arguments (something like -c /path/to/cert) only KDF is written.
I'm using Mac OS x 10.10.5 with java -version
java version "1.8.0_31"
Java(TM) SE Runtime Environment (build 1.8.0_31-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.31-b07, mixed mode)
When I run the dash command:
$ java -jar ../dash.fragmencrypter-1.7.18-SNAPSHOT-exe.jar dash vid_rep_1.mp4 vid_rep_2.mp4 vid_rep_3.mp4 vid_rep_4.mp4 sou_rep_1.mp4 .
com.castlabs.dash dash.fragmencrypter 1.7.18-SNAPSHOT
INFO: Adjusted earliest presentation of vid_rep_1.mp4[1]' from 0.0 to 0.036281179138321996
INFO: Adjusted earliest presentation of vid_rep_2.mp4[1]' from 0.0 to 0.036281179138321996
INFO: Adjusted earliest presentation of vid_rep_3.mp4[1]' from 0.0 to 0.036281179138321996
INFO: Adjusted earliest presentation of vid_rep_4.mp4[1]' from 0.0 to 0.036281179138321996
INFO: Adjusted earliest presentation of sou_rep_1.mp4[1]' from -0.036281179138321996 to 0.0
INFO: Creating model for sou_rep_1.mp4...
INFO: Creating model for vid_rep_1.mp4...
INFO: Creating model for vid_rep_2.mp4...
INFO: Creating model for vid_rep_4.mp4...
INFO: Creating model for vid_rep_3.mp4...
INFO: Writing /sou_rep_1.mp4
/sou_rep_1.mp4 (Permission denied)
It tries to write in the root folder.
If I add sudo
it works, but my resulting files are all located in the root folder.
The available documentation does not explain how to change the output folder.
$ sudo java -jar ../dash.fragmencrypter-1.7.18-SNAPSHOT-exe.jar dash vid_rep_1.mp4 vid_rep_2.mp4 vid_rep_3.mp4 vid_rep_4.mp4 sou_rep_1.mp4
Password:
com.castlabs.dash dash.fragmencrypter 1.7.18-SNAPSHOT
INFO: Adjusted earliest presentation of vid_rep_1.mp4[1]' from 0.0 to 0.036281179138321996
INFO: Adjusted earliest presentation of vid_rep_2.mp4[1]' from 0.0 to 0.036281179138321996
INFO: Adjusted earliest presentation of vid_rep_3.mp4[1]' from 0.0 to 0.036281179138321996
INFO: Adjusted earliest presentation of vid_rep_4.mp4[1]' from 0.0 to 0.036281179138321996
INFO: Adjusted earliest presentation of sou_rep_1.mp4[1]' from -0.036281179138321996 to 0.0
INFO: Creating model for vid_rep_2.mp4...
INFO: Creating model for vid_rep_4.mp4...
INFO: Creating model for sou_rep_1.mp4...
INFO: Creating model for vid_rep_3.mp4...
INFO: Creating model for vid_rep_1.mp4...
INFO: Writing /vid_rep_2.mp4
INFO: Writing /vid_rep_4.mp4
INFO: Writing /sou_rep_1.mp4
INFO: Writing /vid_rep_3.mp4
INFO: Writing /vid_rep_1.mp4
INFO: Writing /Manifest.mpd
INFO: Finished fragmenting of 73MB in 1.0s
<groupId>com.googlecode.mp4parser</groupId>
<artifactId>isoparser</artifactId>
<version>1.0.5.6</version>
I'm assuming the 1.0.5.6 is being resolved from this repository as specified in the pom:
https://oss.sonatype.org/content/repositories/comgooglecodemp4parser-1055
This repository doesn't resolve though and I can't complete the build of the fragencrypter. Can someone verify the repository path and version?
Now project have some incompatibles.
On project version 1.7.30 googlecode.mp4parser version 1.1.18
Above 1.7.30 project versions have googlecode.mp4parser version 1.1.19 but In repository its is missing! Another (old) versions have problems too with googlecode.mp4parser versions in that repo (missing at all).
I am novice in JAVA and NetBeans, and I think that now used Maven repo for all in this project (that maybe truth?).
And, your https://oss.sonatype.org/content/repositories/comgooglecodemp4parser-1085 repository with ID="comgooglecodemp4parser-1085" not found. Oh so..
When New dashencrypt (1.0.2x) handles some files, it would generate negative S@t value in manifest (unsigned format) and %Time% in media segment file name (signed format).
I used ffprobe to check these input files and found the problem may be caused by the begining packets with negative DTS and PTS>=0.
Old dashencrypt (1.0.1x) can handle these files and generate segment list correctly.
Depends on sannies/mp4parser#5
The correct behavior is seemingly to always start with zero and completely rely on the edit list box to cope with high profile pts offsets.
I cannot build this project because some problems with repo
I tried to DASH a video file by following the steps described in the wiki. However I cannot play the video in my browser (Chrome version 43) using dash.js player. I get error MEDIA_ERR_SRC_NOT_SUPPORTED
. After looking around a bit I noticed that the audio output of dashencrypt has the codec mp4a.40.5
(the samples on internet use codec mp4a.40.2
and I can play them). I then tried to DASH the video representations only and everything worked fine i.e. I can play it in my browser.
How can I correctly DASH the audio representation into mp4a.40.2
?
When running this command for some video file:
java -jar dashencrypt/dash.fragmencrypter-1.7.31-SNAPSHOT-exe.jar encrypt xxxx.mp4 -o xxxxt.mp4 --secretKey xxxxxxxxxx --uuid xxxxxxx
It failed with this error:
com.castlabs.dash dash.fragmencrypter 1.7.44-SNAPSHOT
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 19
at com.castlabs.dash.dashfragmenter.sequences.DashFileSetSequence.alignEditsToZero(DashFileSetSequence.java:1150)
at com.castlabs.dash.dashfragmenter.sequences.DashFileSetSequence.run(DashFileSetSequence.java:264)
at com.castlabs.dash.dashfragmenter.cmdlines.DashFileSetEncrypt.run(DashFileSetEncrypt.java:98)
at com.castlabs.dash.dashfragmenter.Main.main(Main.java:60)
About 5% of the videos in my collection failed. I am going to debug it tomorrow but any thoughts about this?
I am using the latest master.
With static URLs instead of range requests for one URL - dashed content then can also be hosted on AWS S3.
On many systems standard vm parameters will get exceeded rather fast and OOM Exception is thrown.
Can be prevented by setting:
sysctl -w vm.max_map_count="largevalue"
However less mappings or a hint for the user would be nice-to-have.
Hi guys,
Is there a way to append a new audio track, different language or different bit rate to an existing dash?
typically it's 24000 at the moment but it should rather be 48000 (the value after SBR has been applied)
For some video files dash encryptor is crashing with the below stack
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: -1
at java.util.ArrayList.elementData(ArrayList.java:418)
at java.util.ArrayList.get(ArrayList.java:431)
at org.mp4parser.muxer.container.mp4.FragmentedMp4SampleList$1.getSampleEntry(FragmentedMp4SampleList.java:204)
at com.castlabs.dash.dashfragmenter.representation.RepresentationBuilderImpl.createTraf(RepresentationBuilderImpl.java:514)
at com.castlabs.dash.dashfragmenter.representation.RepresentationBuilderImpl.createMoof(RepresentationBuilderImpl.java:310)
at com.castlabs.dash.dashfragmenter.representation.RepresentationBuilderImpl.get(RepresentationBuilderImpl.java:288)
at com.castlabs.dash.dashfragmenter.representation.RepresentationBuilderImpl.getIndexSegment(RepresentationBuilderImpl.java:338)
at com.castlabs.dash.dashfragmenter.encrypt2.ManifestCreation.addSegmentBase(ManifestCreation.java:166)
at com.castlabs.dash.dashfragmenter.cmdlines.Encrypt2Command.run(Encrypt2Command.java:226)
at com.castlabs.dash.dashfragmenter.Main.main(Main.java:59)
Input files are not closed. When not used as command line app this might result in undelteable files
Setting a version info in Manifest and/or hdlr-Box would be very helpful. Ideally incl. a pointer to the used mp4parser version.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.