Video transcoding: Export single frames as JPEGs and HLS (.TS, .M3U8)


for out project we want to display a "filmstrip" that shows each frame of a video along with the video player. Further we want to offer a video als HLS-"stream" as used in many modern JS-based video players.

For this reason we need to utilize ffmpeg to export each frame of the video and to write the files needed for HLS (severals "chunks" of the video as *.ts files and *.M3U8 files that tell the player what video files to use for which bandwidth). I tried to establish a rule in media_processing.conf. Then I realized that the write-function in Video.php always adds the parameters for the input- and output files and cannot add a folder or custom filenames along with the configured rule.

My question is: is there any recommendation how to handle this? Is that even recommended to do in CA?

Thank you, Roni


  • In the meantime I realized that CA is creating preview frames for video files. I can see that these files are created in app/tmp but eventually they seem to be nowhere. Any idea where they are copied or what happens to them?

  • edited April 2020

    The preview images are stored as media references by records in the ca_object_representation_multifiles. They're treated like other media items, with their own set of rules in media_processing.conf. Those app/tmp files are temporary copies of the screen grabs. I'm not sure why they're not being cleaned up. We'll have to look at that more closely.

    There's no provision for doing HLS streams. I could imagine how it could be added, but it's not something on our todo list.


  • Thank you for your help Seth. After your hint I realized that the files in tmp are renamed and moved to the quicktime/images folder while the URLs to are persisted in the "ca_object_representation_multifiles" table. We still look for a way to implement full frame export and HLS streams. An idea of my colleague Ingo was that maybe there is a way to execute a bash file or some simple script that performs two command-line tasks and writes the resulting file in a folder (and maybe performs some useful database entries as well). Any ideas in this direction?

    Another question is addressing the video preview frame generation:
    Do you think, the multifile generation can be set in order to export every single frame of the video?

    Sorry, I forgot in my first post: We are using CA (providence) 1.7.8.

    Thanks, Roni

  • If you export every single frame, you'll have thousands upon thousands of multifile records in the database, along with multiple versions of each frame. The current system was designed for basic previewing and there's a fair amount of overhead per-frame in those records. It's not a great idea, I think.

    You can certainly execute bash scripts if you get into the internals, but it'd probably be better to build HLS support into the media processing system.

  • Hi. We just started ingesting videos. How can I see/export generated frames? I could not find any way...

    Thank you!


Sign In or Register to comment.