AWS MediaConvert Throws Error 1076 for Safari Recored Videos - amazon-s3

I'm getting this error
Demuxer: [ReadPacketData File read failed - end of file hit at length [13155941]. Is file truncated?] while trying to process the video with AWS Mediaconvert.
The video is being recorded from the ios safari/chrome browsers with the Mimetype of video/mp4.
I'm using the npm module aws-sdk.
It working fine for all the videos (video/mp4 and other formats as well) selected using file input (means from my device)
Just for an update: Using AWS Elastic Transcoder works with safari recorded videos.

That error is most likely because the source file contained variable size track fragment offsets, which is a characteristic of MediaRecorder outputs. MediaConvert was enhanced with the ability to handle these types of inputs as of November 11th, 2021, so I would recommend testing the assets again.
If you continue to have issues, you can try remuxing the source file in ffmpeg with a command such as:
ffmpeg -i source.mp4 -c copy remuxed_source.mp4

Related

Use File System Access API in Chromium Embedded Framework

My program uses CEF(Chromium Embedded Framework) to implement a simple browser component. I want to use the File System Access API in the CEF to read and write local files but it occurs some problems. https://mburakerman.github.io/file-system-access-api-demo/ is the test page I use to experiment the File System Access API. I used Chrome at first and Chrome behaved well, it read and wrote local files normally. Then I compiled the CEF(The verstion is 96) project and used the cefclient to test whether the CEF also worked well but it could not. CEF could read the local files right but when I clicked the "Save changes" button there was no response and it failed to write the local file I choosed before either. After that I ran the source code of Chromium and CEF to compare the differences in File System Access API. When I was going to write the local file the code of Chromium and CEF ran to the same position as the picture shown below.Chromium and CEF ran to the same position when wrote local files Both of them entered in the DoRequestPermission function. It was very strange that the current_status of Chromium was "ASK" but CEF was "DENIED". The current_status value in CEFThen I checked the stack it showed that the status of the file was initialized at the message dispatch time and I could not find where the status was initialized.The stack of CEF when using File System Access API enter image description hereI wonder why the status in Chromium is "ASK". Does it use some specific command lines or some other methods?

ffmpeg - fragmented mp4 takes long time to start playing on Chrome

When using ffmpeg, to stream the output file to S3, it is required to use "-movflags frag_keyframe", and the generated file will be a fragmented mp4.
When I try to play this files from S3 it takes a long time to start playing. I have tried the recommended movflags from MDN Docs and all the possible combinations.
ffmpeg -i https://notreal-bucket.s3-us-west-1.amazonaws.com/video/video.mov -f mp4 -movflags frag_keyframe+empty_moov pipe:1 | aws s3 cp - s3://notreal-bucket/video/output.mp4
Link of the file: https://happy-testing.s3-eu-west-1.amazonaws.com/stack-overflow/help.mp4
Edit:
I think it's not possible.
1) According to https://www.adobe.com/devnet/video/articles/mp4_movie_atom.html, the moov atom should be at the beginning of the file: "If the planned delivery method is progressive download or streaming (RTMP or HTTP), the moov atom will have to be moved to the beginning of the file. This ensures that the required movie information is downloaded first, enabling playback to start right away."
2) With ffmpeg writing directly to s3, the moov atom at the beginning will be empty.
3) With a fragmented video with empty moov atom, Chrome downloads the moof of each fragment before starting to play.

Cocoa Sandbox App: Spawn FFMPEG

I have an application which uses FFMPEG and FFPROBE to perform some tasks on a video the user can open with my application.
For non-sandboxed applications everything works fine, but when my app is running in a sandbox FFPROBE doesn't seem to get started.
The Console says the following:
08.06.15 12:27:55,803 secinitd[281]: ffprobe[4049]: registration request failed: (0x11, 0x0) Container object initialization failed.
failed to get bundleid for app "/Users/Alex/.../ffprobe"
The path to ffprobe mentioned in this messages points to the MacOS directory within the app bundle (a Build Phase copies these two binaries into the executable directory).
I've searched a lot and found some hints regarding entitlements. Of course my sandboxed app has its entitlements and when building my application it gets signed (with --deep signing flag). It even passes the technical App Store check for entitlements.
Now I'm stuck and wonder why my application is not able to launch FFPROBE (and FFMPEG).
Does anybody have a clue?
It seems like I've found a solution. I don't know whether all of these steps are necessary, but here is what I've tried and what seems (!) to work:
I added an entitlements file which contains true for the keys com.apple.security.inheritand com.apple.security.app-sandbox
I added a plist file for each used binary and filled the keys CFBundleName and CFBundleIdentifier with suitable values (I don't know whether this step is necessary)
I added a Run Script build phase which executes codesign -f -s "your certificate" --entitlements ./ffmpeg.entitlements ./Build/Intermediates/ArchiveIntermediates/App\ Store/InstallationBuildProductsLocation/Applications/<my app>/Contents/MacOS/ffmpeg
for each binary used.
These steps result in suitable entitlements when trying to submit the app to the Mac App Store and it results in a correct usage of the embedded binaries (at least on my development Mac and the Mac of some colleagues).

LInephone source code not working with TCP for local SIP calls

I downloaded the source code of Linphone app from GitHub (https://github.com/onmyway133/linphone-iphone) and tried to run it on my iPhone. It is working fine with transport selected as UDP but when I select transport setting as TCP outgoing works fine but the app don't notify about any incoming call.
I also tried to track the network calls by installing Linphone for mac on my macbook but for TCP it not even start any session of network requests.
Any one faced such issue or is there any other way to achieve SIP calling in local network? Any help is welcome.
The source code at the URL mentioned in the question "https://github.com/onmyway133/linphone-iphone" is not latest one. I had to check out the latest version from git url mention at linphone.org and after trying it many times finally I got the complete code and also I had to do few changes to compile the latest source code successfully.
I faced this error while compiling the code on terminal:
Shell script 'Makefile' at path 'linphone-iphone/submodules/build-i386-apple-darwin/mssilk/sdk' was downloading corrupt SILK_SDK_SRC_v1.0.9.zip.
Fix: System terminal was downloading only 600Kbs of file size (i.e. corrupt zipped file) from the URL http://developer.skype.com/silk/SILK_SDK_SRC_v1.0.9.zip due to which next command was not able to unzip it and was displaying file missing error. I changed the default URL to 'http://bkvoice.googlecode.com/files/SILK_SDK_SRC_v1.0.9.zip' thus process was able to download the file that was actually 62.9MBs of size.
Hope it'll help someone.

large file from ec2 to s3

I have a 27GB file that I am trying to move from an AWS Linux EC2 to S3. I've tried both the 'S3put' command and the 'S3cmd put' command. Both work with a test file. Neither work with the large file. No errors are given, the command returns immediately but nothing happens.
s3cmd put bigfile.tsv s3://bucket/bigfile.tsv
Though you can upload objects to S3 with sizes up to 5TB, S3 has a size limit of 5GB for an individual PUT operation.
In order to load files larger than 5GB (or even files larger than 100MB) you are going to want to use the multipart upload feature of S3.
http://docs.amazonwebservices.com/AmazonS3/latest/dev/UploadingObjects.html
http://aws.typepad.com/aws/2010/11/amazon-s3-multipart-upload.html
(Ignore the outdated description of a 5GB object limit in the above blog post. The current limit is 5TB.)
The boto library for Python supports multipart upload, and the latest boto software includes an "s3multiput" command line tool that takes care of the complexities for you and even parallelizes part uploads.
https://github.com/boto/boto
The file did not exist, doh. I realised this after running the s3 commands in verbose mode by adding the -v tag:
s3cmd put -v bigfile.tsv s3://bucket/bigfile.tsv
s3cmd version 1.1.0 supports the multi-part upload as part of the "put" command, but its still in beta (currently.)