[Libav-user] Change the Stream Info and Codec of MP4 file using FFMPEG muxing / remuxing code

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[Libav-user] Change the Stream Info and Codec of MP4 file using FFMPEG muxing / remuxing code

Ganesh kumar
Hai friends

I was working project to change the Stream information and Codec
information of mp4 file. is it really possible change the stream
information and codec information using ffmpeg muxing/remuxing code?

For example:
consider the file type
1. major brand:isom
2. compatible brand: isommp42
3. resolution: 1280*780

convert to that file into

1. major brand: mp42
2. compatible brand: isomAVC1mp42
3. resolution: 355*288

Thanks
R. Ganesh Kumar
_______________________________________________
Libav-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/libav-user
Reply | Threaded
Open this post in threaded view
|

Re: Change the Stream Info and Codec of MP4 file using FFMPEG muxing / remuxing code

강구철
I just thought I should answer my own question, in case anyone comes across it.

The whole re-initialization of the AVCodecContext by using avcodec_free_context, av_codec_alloc_context3, and avcodec_open2 takes anywhere from 0.2 seconds to 0.8 seconds from my measurements. Doing it sequentially during the encoding loop causes the skip.

So, just do it in another thread, then swap the AVCodecContext in when done.



-----Original Message-----
From: Libav-user [mailto:[hidden email]] On Behalf Of Ganesh kumar
Sent: Sunday, April 02, 2017 6:19 PM
To: [hidden email]
Subject: [Libav-user] Change the Stream Info and Codec of MP4 file using FFMPEG muxing / remuxing code

Hai friends

I was working project to change the Stream information and Codec
information of mp4 file. is it really possible change the stream
information and codec information using ffmpeg muxing/remuxing code?

For example:
consider the file type
1. major brand:isom
2. compatible brand: isommp42
3. resolution: 1280*780

convert to that file into

1. major brand: mp42
2. compatible brand: isomAVC1mp42
3. resolution: 355*288

Thanks
R. Ganesh Kumar
_______________________________________________
Libav-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/libav-user

_______________________________________________
Libav-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/libav-user