mp4parser

How to write metadata to mp4 file using mp4parser?

允我心安 提交于 2019-12-04 21:42:09
I'm using mp4parser to mux h264 and aac file which are re-encoded from orginal video file,how can I write the metadata of the original video to the new mp4 file? Or is there a common method to write metadata to mp4 file? metadata and MP4 is a really problem. There is no generally supported specification. But this is only one part of the problem. Prob (1): When to write metadata Prob (2): What to write Prob (1) is relatively easy to solve: Just extend the DefaultMp4Builder or the FragmentedMp4Builder on your own and override the protected ParsableBox createUdta(Movie movie) { return null; }

Set metadata to mp4

僤鯓⒐⒋嵵緔 提交于 2019-12-04 08:14:39
I encode video with help of MediaCodec and MediaMuxer . As result I have mp4 video file. How can I set metadata (creating time) to this mp4 file? MediaMetadataRetriever can only read metadata, but not change. I don't want to use ffmpeg. I tried mp4parser library ( this class ), but it doesn't work for me. Mikalai Daronin Setting metadata in MP4 file is not a clear task because there is no generally supported specification , but most video players support Apple specs. More info here , here , and here . Here is the code which sets title and creation date in MP4 metadata (based on MetaDataInsert

What governs playback speed when encoding with Android's MediaCodec + mp4parser?

自古美人都是妖i 提交于 2019-12-02 16:46:50
问题 I'm trying to record, encode and finally create a short movie on Android (using API 16) with a combination of MediaCodec and Mp4Parser (to encapsulate into .mp4). Everything is working just fine, except for the duration of the .mp4: its always 3 seconds long - and runs at about twice the 'right' speed. The input to encoder is 84 frames (taken 100ms apart). The last frame sets the 'end of stream' flag. I set the presentation time for each frame on queueInputBuffer I've tried to tweak every

What governs playback speed when encoding with Android's MediaCodec + mp4parser?

心已入冬 提交于 2019-12-02 11:15:28
I'm trying to record, encode and finally create a short movie on Android (using API 16) with a combination of MediaCodec and Mp4Parser (to encapsulate into .mp4). Everything is working just fine, except for the duration of the .mp4: its always 3 seconds long - and runs at about twice the 'right' speed. The input to encoder is 84 frames (taken 100ms apart). The last frame sets the 'end of stream' flag. I set the presentation time for each frame on queueInputBuffer I've tried to tweak every conceivable parameter - but nothing seems to make a difference - the film is always 3 seconds long - and

Using mp4parser , how can I handle videos that are taken from Uri and ContentResolver?

荒凉一梦 提交于 2019-12-01 02:32:41
Background We want to let the user choose a video from any app, and then trim a video to be of max of 5 seconds. The problem For getting a Uri to be selected, we got it working fine (solution available here ) . As for the trimming itself, we couldn't find any good library that has permissive license, except for one called "k4l-video-trimmer" . The library "FFmpeg", for example, is considered not permission as it uses GPLv3, which requires the app that uses it to also be open sourced. Besides, as I've read, it takes quite a lot (about 9MB). Sadly, this library (k4l-video-trimmer) is very old

Reverse video in android

不羁岁月 提交于 2019-11-30 11:51:30
I have recorded a video from camera in my app and saved in device storage.Now I want to reverse the video such that it plays from backwards.i.e. if video is of 10 seconds then the last frame at 10th second will become first frame and it starts playing from there to 1st second first frame.I want to save the reversed video in a file.How should i proceed in that? Mick If you are prepared to use ffmpeg you can use this approach - it essentially breaks the video into frames and then builds it again in reverse order: https://stackoverflow.com/a/8137637/334402 There are several ways to use ffmpeg in

Reverse video in android

最后都变了- 提交于 2019-11-29 17:30:03
问题 I have recorded a video from camera in my app and saved in device storage.Now I want to reverse the video such that it plays from backwards.i.e. if video is of 10 seconds then the last frame at 10th second will become first frame and it starts playing from there to 1st second first frame.I want to save the reversed video in a file.How should i proceed in that? 回答1: If you are prepared to use ffmpeg you can use this approach - it essentially breaks the video into frames and then builds it

No audio in MP4 file - Android

匆匆过客 提交于 2019-11-29 12:48:06
I am using the MP4ParserMergeAudioVideo to add a new audio to an MP4 file. The library had said to use .wav file, if i keep a .wav file in the directory and give the name of the audiofile as example.m4a , I get a file not found exception. So I changed the file to a .m4a audio file. The code is given below. findViewById(R.id.append).setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { String root = Environment.getExternalStorageDirectory().toString(); Log.e("",""+root); String audio = root + "/download/"+"mymovieaudio.m4a"; String video = root + "/download/"+"My