Cloudfront issue streaming certain video files with VP6F and MPEG audio - amazon-cloudfront

Greetings fellow amazonians
We have certain f4v files from webtvinteractive.com that are not working from a streaming distribution. The cloudfront diagnostic tool indicates the file is not found but from a download distribution they play all ok fine ??
When inspecting the codec the only difference we see is that the audio is encoded as MPEG audio layer 1/2/3 (mpga) instead of AAC (mp4a)
Also noticed that VP6F is used but that is a Abobe proprietary codec so it should stream all ok from Flash Media Server
Here is the test tool url:
http://d1k5ny0m6d4zlj.cloudfront.net/diag/CFStreamingDiag.html
s3dbhkulzq9ndp.cloudfront.net
teaser.f4v (ok)
EM2_H264.f4v (NOT ok)
StreamLen Response: 0 ??

Received an answer from AWS team member
Posted by: RonS#AWS
Posted on: Oct 10, 2011 7:29 AM
https://forums.aws.amazon.com/message.jspa?messageID=284676
Hi, I downloaded both of your video objects and ran flvcheck (http://help.adobe.com/en_US/FlashMediaServer/3.5_AdminGuide/WS5b3ccc516d4fbf351e63e3d119f29261b7-7ffc.html) against them.
The teaser.f4v is apparently OK according to flvcheck, but EM2_H264 gets this:
11-10-10 07:10:25 Error: -26 File appears to be FLV with wrong extension. EM2_H264.f4v
If I rename the file to have a .flv extension, I get "Found backward timestamp".
I suspect the FMS software we're using will have the same complaints about that file that flvcheck does.
flvcheck is available for download here (you'll need to register with Adobe): http://www.adobe.com/products/flashmediaserver/tool_downloads/

Related

Add movflags to top of mp4 file without using ffmpeg for a live RTSP stream

Update:
I have a video player in browser which plays mp4 videos though websocket. The player only supports mp4 file. When i checked normal mp4 fiels does not play in the player, a mp4 file with a "moovflags faststart " will only play on that player. For a allready stored file , this will work properly.
But In case of an livestream(RTSP), using ffmpeg will only work once the RTSP connection has terminated since the "moovflags faststart " flags will work once a connection has terminated properly.
Hope the above statements makes more sense.
Due to this behavior, am checking if there is any way to get the moovflasg at first or something
I am having RTSP live source and i need it to convert the RTSP to a mp4 file which has moov flags in the begining of the file.
I have checked with openrtsp to take a mp4 dump of the rtsp, but it only adds moov flags and other info on the footer of the mp4(onlky when openrtsp has closes the rtsp stream).
Ffmpeg has " -movflags faststart" to move the footer info to the header of the mp4 container.
Since i am having a RTSP live source, the video data will be comming back to back and there wont be any termination. The above ffmpeg command only works once the rtsp stream has terminated.
Is there any way we can make a mp4 container which contains the mp4 footer info present in the header itself so that i can use it for a live source?
EDIT #1
I have video player which plays mp4 video files , it only support playback of a recorded mp4 file which is createtd using "-movflags faststart" , normal mp4 files does not play in that.
This is the player
https://github.com/sonysuqin/WasmVideoPlayer.
Since i am tryng to stream live video to the player, its not possible to use movflags faststart.
The mp4 header can not be added to the file before it is complete. It’s not possible because of how mp4 files are structured. The header needs to know the frame type, timestamp, size, and file offset of every frame in the file. That can’t be known until the file is complete. You can not stream an mp4 while it is being created. You need to use a protocol such as HLS or DASH to accomplish this.

Creating M4A file from MP4

I want to create an M4A file from an MP4, I want to attempt this from scratch without using other libraries but just the raw data.
So far I am able to locate the atom moov and parser it. And as a result I can pull the audio data from the mdat. So then I create my own M4A file with the right ftyp (M4A isomiso2) then add a new mdat with just the audio data I previously recovered, finally I add the moov with the same mvhd, and only the audio trak but with an updated stco to reflect the change in offsets of the chunks of audio data (as they are just one after each other now). I am sure I am doing all of this right.
However the M4A file just plays silence. I believe it is because I have to edit more in the moov but I am not sure what - I put it into FFmpeg corruption and I got:
"Sample rate index in program config element does not match the sample rate index configured by the container."
"Too large remapped id is not implemented."
So as a result I think it is something to do with the stsd atom but I am not sure how to change it.

iOS - Convert Audio Format (opus to mp3)

Recently I started to develop application that work with .opus file (Audio Format).
I am working with external SDK that can processor a mp3/wav file, unfortunately my local file is a .opus file and I need to convert it to mp3/wav format in order to process the file.
I read and research a lot around the network to find a solution,
I found the FFmpegWrapper library that can convert two type of Audio Format but when I try to convert .opus to .mp3/ , I get this error: opus codec not supported in WAVE format
I do not know what can be done, I'll be happy to help.
Any information about how to convert .Opus format to any other format will be appreciated.
Thanks
Have you tried using this pod: https://github.com/chrisballinger/Opus-iOS
You can use it to convert your Opus-encoded file to wav, then feed it into your SDK.

How to detect if a file is encoded using mp3PRO?

I have a folder which contains lot of MP3 files, some of them are encoded using mp3PRO.
Since this format is now obsolete, I'd like to convert them back to MP3 (converters can be found easily).
Is there is a way to detect programatically if a file is encoded using mp3PRO format ? (eg : by looking at file header or specific signatures using an hex editor)
The official player is able to detect if file is encoded using mp3PRO (the logo is highlighted or not) so I suppose this is technically possible.
What I found so far is that bitrate of mp3PRO file appears to be pretty low (50% of non encoded file) : eg : a 128 kbps file will appears as 64kbps. However a 320 kbps file will appears as 160 kpbs (which are pretty common) so it cannot be used as a rule.
Here is what I found out and how I fixed it. I wrote in here in case somebody would need it :
MP3Pro files does not contains any special flag in the mp3 header that would help to recognize them.
They are technically very similar to usual mp3 files, except they are encoded half the bit and sample rate (eg : a 128kpbs 44100hz file will be encoded as a 64kps 22050hz file, resulting in mp3pro file being approx half the size of original file).
This has been made for compatibility, so default players can play them without any change.
They also contains some SBR data, which allow to synthetically rebuild the lost audio part (high frequencies) and to play them it was before the mp3 pro conversion.
Detecting the SBR data seems very hard if not impossible : it would require to decode the actual mp3 frames. Also there is no documentation to be found about mp3pro format.
What I did (which works but required some manual effort) : I added all files to be checked to playlist of an mp3 player (foobar 2000 in my case) then sorted the files on the sample rate column : most 22050 hz mp3 files were indeed mp3 pro files.
They were converted back to mp3 using winamp + the mp3pro plugin made for it, available here : http://www.wav-mp3.com/mp3pro-to-mp3.htm

MOV file directly from camera error while encoding in Azure Media Services

I'm trying to upload & convert a MOV file (GSpot says it's Motion JPEG video codec) just as it's off the camera (Panasonic LX3), however I get the following error with the encoding job:
nb:jid:UUID:f3855e24-5993-6d4c-a1c6-12079b73fb04 My encoding job Error 8/19/2012 11:22:13 PM 00:00:12.4880000
My encoding task Error
Apple QuickTime must be installed in order to playback Apple Quicktime files.
Can I do something around this ? I have to build a website where users will upload their movies, and this MOV format should be very common as it's directly from the camera.
Thanks!
At the moment MOV does not seem to be a valid import format. You can see the whole list here: Media Encoder Import Formats. Note that Windows Azure Media Services is still in preview, the list of supported formats might change in the final version of the product.

Resources