[Libav-user] help required for creating MPEGTS from raw h264 & PCM Audio

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

[Libav-user] help required for creating MPEGTS from raw h264 & PCM Audio

Ajay Parashar-3
Hi,

I am getting raw h264 encoded frames from one thread of my application in a buffer & getting raw PCM data buffer from the second thread.
Now i want to create MPEGTS by using ffmpeg APIs in the same application.

I got many references to create MPEGTS by using static files but did not find any info how can i create MPEGTS by using h264 frame buffer and PCM data buffer?
It would be great if you guys let me know how can i achieve the same.

Regards
Ajay Parashar

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

Re: help required for creating MPEGTS from raw h264 & PCM Audio

Michael IV
I join Ajay's question. I found this very old and incomplete example:


What it does it first decodes h264 from a file and writes it into stream.
The example has some code that attempts  to setup audio frame but it doesn't mux it into the ts.

Any pointers how to mux raw h264 bitstream with audio into ts? 

Tnx





On Tue, Sep 26, 2017 at 10:33 PM, Ajay Parashar <[hidden email]> wrote:
Hi,

I am getting raw h264 encoded frames from one thread of my application in a buffer & getting raw PCM data buffer from the second thread.
Now i want to create MPEGTS by using ffmpeg APIs in the same application.

I got many references to create MPEGTS by using static files but did not find any info how can i create MPEGTS by using h264 frame buffer and PCM data buffer?
It would be great if you guys let me know how can i achieve the same.

Regards
Ajay Parashar

_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: help required for creating MPEGTS from raw h264 & PCM Audio

Carl Eugen Hoyos-2
In reply to this post by Ajay Parashar-3
2017-09-26 21:33 GMT+02:00 Ajay Parashar <[hidden email]>:

> I am getting raw h264 encoded frames from one thread of my
> application in a buffer & getting raw PCM data buffer from the
> second thread. Now i want to create MPEGTS by using ffmpeg
> APIs in the same application.

Did you already look at doc/examples/muxing.c ?

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

Re: help required for creating MPEGTS from raw h264 & PCM Audio

Ajay Parashar-3
On Wed, Sep 27, 2017 at 4:05 PM, Carl Eugen Hoyos <[hidden email]> wrote:

> 2017-09-26 21:33 GMT+02:00 Ajay Parashar <[hidden email]>:
>
>> I am getting raw h264 encoded frames from one thread of my
>> application in a buffer & getting raw PCM data buffer from the
>> second thread. Now i want to create MPEGTS by using ffmpeg
>> APIs in the same application.
>
> Did you already look at doc/examples/muxing.c ?
>
> Carl Eugen
> _______________________________________________
> Libav-user mailing list
> [hidden email]
> http://ffmpeg.org/mailman/listinfo/libav-user

Hi Carl,

Yes i already looked at doc/examples/muxing.c, but this example is
working on whole video file.
It is not working on h264 frame buffers.

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

Re: help required for creating MPEGTS from raw h264 & PCM Audio

Carl Eugen Hoyos-2
2017-09-27 13:37 GMT+02:00 Ajay Parashar <[hidden email]>:
> On Wed, Sep 27, 2017 at 4:05 PM, Carl Eugen Hoyos <[hidden email]> wrote:
>> 2017-09-26 21:33 GMT+02:00 Ajay Parashar <[hidden email]>:
>>
>>> I am getting raw h264 encoded frames from one thread of my
>>> application in a buffer & getting raw PCM data buffer from the
>>> second thread. Now i want to create MPEGTS by using ffmpeg
>>> APIs in the same application.
>>
>> Did you already look at doc/examples/muxing.c ?

> Yes i already looked at doc/examples/muxing.c, but this example is
> working on whole video file.

> It is not working on h264 frame buffers.

Afaict, the write_frame() function deals with frame buffers.

Consider cutting your quotes, Carl Eugen
_______________________________________________
Libav-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/libav-user