简体   繁体   中英

Seek and cut mp4 http stream on the fly with mp4Parser java library

Is it possible to create new mp4 file(which will be just one small video segment of full length mp4 file) from mp4 http stream without downloading the whole mp4 file to disk and feeding it to mp4Parser. If any other stable java library exist which could do the sam job please point me to it.

I know it can be done with ffmpeg as explained in this post but i want to avoid using full feature heavy library(cutting the mp4 file doesn't involve transcoding the video, this operation just repacks the mp4 file) for just cutting the mp4 file.

ffmpeg -ss 00:01:00.000 -i " http://myfile.mp4 " -t 00:02:00.000 -c:a copy -c:v copy output.mp4

Try to encode new video on the fly by using MediaExtractor , MediaCodec , MediaMuxer classes. See Google's app grafika for more samples.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM