[Libav-user] User-specified execute/execute2 function in mpeg2 video encoder

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

[Libav-user] User-specified execute/execute2 function in mpeg2 video encoder

Gavin Smith
I'm attempting to set the mpeg2video encoder to use the threads within my existing thread pool.  I'm encoding SD interlaced PAL content, but I cannot seem to get the encoder to callback into my user-defined execute function(s). To keep things simple, I have tried testing the callbacks with GDB before attempting to post the work to my thread pool.

I have attached a link to a code snippet to provide some insight on how the encoder is being configured.

https://pastebin.com/qLZ6ZYMy

Note: In the code snippet provided, the code detects that threads may be used in conjunction with slices.


Admittedly, there are a few fields which are linked, yet they do add for some confusion.  The trunk docs are a bit sparse on the first two (2) fields.  I may try update the docs if I can retrieve some additional information. 
 * AVCodecContext::thread_type
 * AVCodecContext::active_thread_type
 * AVCodec::capabilities


Any tips/suggestions would be much appreciated...


Gavin.

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

Re: User-specified execute/execute2 function in mpeg2 video encoder

Gavin Smith

To simplify my problem, I've modified an existing FFmpeg code sample. My modified code sample generates a .ts file containing mp2v video (no audio), but I cannot figure out why parallel encoding will not work (well, the ffmpeg library will not call back into my custom execute callback funcs).  


If you run the code sample and insert a debugger breakpoint in the custom 'execute'/'execute2' function, you will note that the user-defined functions are never called by the encoder even though parallel encoding is explicitly enabled.


Gavin. 


From: Gavin Smith <[hidden email]>
To: "[hidden email]" <[hidden email]>
Sent: Thursday, 1 June 2017, 15:29
Subject: [Libav-user] User-specified execute/execute2 function in mpeg2 video encoder

I'm attempting to set the mpeg2video encoder to use the threads within my existing thread pool.  I'm encoding SD interlaced PAL content, but I cannot seem to get the encoder to callback into my user-defined execute function(s). To keep things simple, I have tried testing the callbacks with GDB before attempting to post the work to my thread pool.

I have attached a link to a code snippet to provide some insight on how the encoder is being configured.

https://pastebin.com/qLZ6ZYMy

Note: In the code snippet provided, the code detects that threads may be used in conjunction with slices.


Admittedly, there are a few fields which are linked, yet they do add for some confusion.  The trunk docs are a bit sparse on the first two (2) fields.  I may try update the docs if I can retrieve some additional information. 
 * AVCodecContext::thread_type
 * AVCodecContext::active_thread_type
 * AVCodec::capabilities


Any tips/suggestions would be much appreciated...


Gavin.
_______________________________________________
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
Loading...