简体   繁体   中英

How to process single segment from fragmented mp4 container?

I have fragmented mp4 that I stream. First the mp4 header and then individual segments that are each one GOP. It is h264 and aac encoded video that I am getting from RTMP server.

I would like to process these individual segments with ffmpeg(I doubt there are other tools available). Either adjust resolution or bitrate or even transcode to vp8/9 or avi1 if needed.

But it seems that ffmpeg cannot handle this because the segment has no header. So I wodner if there is a flag or set of flags for ffmpeg to be able to process these segments without the header? I could possibly just take the raw h264 and aac packets from the RTMP and not pack it into MP4 container beforehand, if that helps - would ffmpeg be able to process these?

“So I wodner if there is a flag or set of flags for ffmpeg to be able to process these segments without the header? '

No. If it was possible, ffmpeg would just do it without they magic flag. The header contains information required for decoding.

You can pretend the header onto an individual segment.

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