apologies again for top posting. first take the original critcal packets, either sudio or video, decode them to determine the ecoder settings you need to mimic. it would be specifying profile level and size for vid, and sample rate with channle layout for audio. apply them to the opening encoder contexts. of couse then, the processing frames are the right size and rates. if you need to change color space or down sample to mono for echo cancellation, you need to return to the original formats and then encode. your concern about changed sps and pps is specific to the continer. you appear to be targeting mp4, in which case closing the file after processing some segment should work for you. watch your timestamps so that they do not lose context when psssing through the processsing
Sent from my T-Mobile 4G LTE Device
-------- Original message --------
From: YIRAN LI <[hidden email]>
Date: 4/12/17 6:06 PM (GMT-08:00)
To: "This list is about using libavcodec, libavformat, libavutil, libavdevice and libavfilter." <[hidden email]>
Subject: Re: [Libav-user] re-encoding and transcode (codec copy) on same file.
2017-04-12 0:55 GMT+10:00 Andy Shaules <[hidden email]>:
Thanks for reply.
I did some research yesterday and I think no matter packets in the file is in starting code (annex-b) or size (avcc) mode, I can always detect and convert it to another mode.
The problem is, if I re-encode a part and keep another part, how can I guarantee the SPS/PPS values for 2 parts are same? If they are different, even if they are in packets (in-band) instead of in global header, is such a file standard compliant ?
Libav-user mailing list
|Free forum by Nabble||Edit this page|