App Store preview video error: The frame rate of one or more of your app previews is too high - app-store

When I tried to upload a preview video followed by apple's guide, itunesconenct popup an error:
Any one knows how to solve this? Thanks,
Apple's Guide:
https://developer.apple.com/app-store/app-previews/

Movies in App Reviews are to have max frame rate of 30 fps. Therefore, you have to find ways to reduce your video frame rate. I reduced mine to 24 fps and got accepted by App Store. There are options as discussed below.
A. Using Terminal:
i) install ffmpeg program if you don't have:
brew install ffmpeg --with-chromaprint --with-fdk-aac --with-libass --with-librsvg --with-libsoxr --with-libssh --with-tesseract --with-libvidstab --with-opencore-amr --with-openh264 --with-openjpeg --with-openssl --with-rtmpdump --with-rubberband --with-sdl2 --with-snappy --with-tools --with-webp --with-x265 --with-xz --with-zeromq --with-zimg
ii) run ffmpeg to force changing frame rate to, 24 fps, for example.
ffmpeg -i input.mp4 -r 24 output.mp4
B. Using a graphical program such LumaFusion. You can buy LumaFusion and install on an iPhone/iPad, and change frame rate upon saving the video.
C. I tried to change the frame rate on iMovie, version 10.1.9, (on the Mac High Sierra 10.13.6), but there is straight forward way to change frame rate.

Please check the official App Preview Properties: https://developer.apple.com/library/content/documentation/LanguagesUtilities/Conceptual/iTunesConnect_Guide/Chapters/Properties.html#//apple_ref/doc/uid/TP40011225-CH26-SW10
Specifically, the Max Frame Rate is 30 fps
As you didn't mention, how you took the App Preview, I would recommend a video editing tool like iMovie, Adobe After Effects or Final Cut Pro to reduce the frame rate to the 30 fps limit.

I use DaVinci Resolve to create previews for the App Store.
There is a free download here. https://www.blackmagicdesign.com/products/davinciresolve/.
Set the project to the proper resolution (e.g. 866x1920 or 1080x1920).
Import the clip to the timeline
Right click and set the clips properties to 30FPS.
Select File -> Media Management
Then Transcode option
Set the wrapper to MP4 and the CODEC to H.264
Your clip will be exported in the proper format.

Related

Why can’t VLC go in to fullscreen mode?

I’m working on a Matlab application that uses a VLC class to control a VLC-instance. One of the features is to set the VLC player to fullscreen. This feature works perfectly fine.
The VLC player is downloaded from Matlab’s File Exchange: https://se.mathworks.com/matlabcentral/fileexchange/56215-vlc (Thanks a lot Léa Strobino)
However, one particular clip insists on resizing the player to a smaller size.
I have done some research and it turns out that this is a common problem in some VLC versions.
Normal workarounds are to uncheck the “adapt interface to video size” (something like that) and to check the “Fullscreen” box.
This ought to make the player open in fullscreen and not resize the screen to video size. The video still resizes the player to a smaller size.
All the specs of the clips are the same: Same file extension (.vob), formats and were made the same way (I did some video trimming and such using ffmpeg – but the same way every time).
I have noticed one difference and that is that this particular video has a lower Data and bitrate (~1000-1500kbps) where as the others are higher (<4000kbps). Also when showing the properties of the clip the frame height and width are blank as opposed to the others that have specific values.
This should however not have an effect of the fullscreen command from Matlab called after loading the video into the playlist. The command has no effect on this video, but does on all other.
It is possible to set the player to fullscreen manually by clicking the window, so it is not caused by some restriction in the video not allowing it to fullscreen.
Why does the video refuse to go in to fullscreen?
Hope somebody is able to help.
Okay so I seem to have solved the problem now. Without being completely sure why - the problem was in the lowered data/framerate.
I tried to add -crf 18 when converting my .mp4 to a .vob file:
ffmpeg -i input.mp4 -vcodec copy -acodec ac3 -crf 18 output.vob
The -crf stands for Constant Rate Factor and is a way to ensure a specific Data rate. The values goes from 0-51 and 18 seems to be the lowest 'sane' value (highest data rate). A good explanation can be found here: https://superuser.com/questions/677576/what-is-crf-used-for-in-ffmpeg
With this higher data rate the video opens up in fullscreen everytime :=)

record video in cocos2d iOS game, low resolution for video and high resolution for normal cases

I am using cocos2d's CCRenderTexture to record video of my game. But if recording video in retina display resolution will cost lot of CPU and memory, so I want to use low resolution for video record but keep retina-resolution for normal game play. is it possible?
I've tried "[[CCDirector sharedDirector] enableRetinaDisplay:NO];" during record video, but it seems not work. the generated output totally wrong.
This is not feasible.
You'd have to render each frame twice, once on the screen, then onto the render texture. A serious drop in framerate is inevitable even if you lower the resolution of the render texture somehow.
The reason is simply that you'll also have to write each render texture as an image to flash memory. This is extremely slow. You'll also end up with a huge amount of data. If each (PNG/JPG) image file ends up being a reasonably small 50 KB then one second of recorded data at 60 fps will consume 3 Megabytes of flash memory. One minute would be around 180 Megabytes.
To record a demo of your game, most games follow the simple principle of recording the user input, and then playing back the user input as if the user had issued these commands. This requires careful planning, no breaking changes when updating the app (or invalidating old demos), and no use of non-deterministic randomizers (ie seeded with time).
If you need to record a demo for making a trailer video, there's plenty of screengrabbing solutions around. Some even specialize in grabbing iPhone video, either from the device (usually requires a source code/library component) or from the Simulator.
You should check out Kamcord SDK for recording game play. Check at http://kamcord.com/
Kamcord has a built-in gameplay video and audio recording technology for iOS. It allows you, the game developer, to capture gameplay videos with an API. Your users can then replay and share these gameplay videos via YouTube, Facebook, Twitter, and email.

How to sync between recording and input live video stream?

I am working on a project in which I am receiving raw frames from some input video devices. I am trying to write those frames in a video files using FFMPEG library.
I have no control over the frame rate i am getting from my input sources. This frame rate varies in run-time also.
Now my problem is how do i sync between recorded video and coming video. Depending upon frame-rate i set in FFMPEG and actual frame rate that i am receiving playback of recorded video is either fast or slow than input video.
I tried to add timestamps (as numOfFrames) in encoded video as per following link
but that didn't help.
ffmpeg speed encoding problem
Please tell me a way to synchronize both. This is my first time with FFMPEG or any multimedia libraries so any examples will be highly appreciated.
I am using directshow ISampleGrabber interface to capture those frames.
Thank You
So Finally i figured out how to do this. Here is how..
First i was taking preview from PREVIEW pin of source filter which do not give timestamps to frames. So one should take frames from capture pin of the source filter. Than in SampleCB callback function we cant get time using IMediaSample::GetTime(). But this function will return time in unit of 100ns. FFMPEG requires it in units of 1/time_base. Here time_base is desired frame rate.
So directshow timestamp needs to be converted in FFMPEG units first. Than we can set pts in AVFrame::pts variable of ffmpeg. One more thing that needs to be considered is first frame of video shoul have timestamp of 0 in FFMPEG so that needs to be taken care of while converting from directshow timestamp to FFMPEG one.
Thank You

Rewind 30 seconds audio and play 2X speed

I have a Query regarding playing audio: Can I rewind the audio 30 secs and Play with 2X speed? Is that possible like in Podcasts in iPhone?
Thanks
If you want to speed up sound without making the pitch high and squeaky, then you may need to license a commercial DSP time-pitch stretch library such as Dirac, et.al. (There may be some open source code to do this in Audacity, but I am unaware of a working iOS port of such).

IPhone mp3 playback problem [duplicate]

This question already has answers here:
AVAudioPlayer - Drop in Framerate
(2 answers)
Closed 4 years ago.
I'm writing a game for iphone, and without background music it runs smoothly at 30 fps. But if I add music (using AudioQueues or AVAudioPlayer, both give similar effect), framerate periodically drops to 10 (about once per second), and then returns to 30. Music is mp3#128kps, 44kHz. It degrades performance not constantly, but at certain moments in time, which causes very jerky gameplay. Did anyone meet such problem? Is there any way to make cpu load for mp3 decoding/playing back more uniform? I'd rather have constanly 29 fps than 30 fps most of the time, and 10 once per second.
Maybe you could increase the priority of your rendering thread? Or take it into a different Run Loop (if that is how you're doing animation).
Couple of thoughts:
1) It might be work trying converting your files into another format and see if you still have this issue. I have had great success with using CAF files, just run afconvert over them.
afconvert -f caff -d ima4 <your mp3 file>
2) Also, is there any connection between the slowdown and track changes? I have often seen similar things when changing tracks (or restarting tracks). I think it has to do with the load it takes to read the file from 'disk'.
This is most probably caused by using the AmbientSound audio session category, see this question. You can easily solve the problem by switching to the SoloAmbientSound category.
You need to profile your app.
I'm getting 60fps regardless of bitrate.
It would be best if you showed us your code. Have you checked into the audio buffer options, it might not be optimal for what you need. Are you comfortable with audio Units?