Error Converting, but conversions seem to have succeeded?


Hey All,

I have a few videos that the KMC shows in an error state, but after examining the FFMPEG logs and observing that there are actually converted files in the data directory, it seems the conversions did NOT error.

Could I ask for some guidance in this situation?

Here is a image of the flavors tab of one video that is in this situation. Thanks!


Hi Dave,

First, navigate to Admin Console->Batch Control Process and input the entry ID.
It will provide a drill down of all related conversion jobs and their final status.
Also, run this:

mysql> select id,status from flavor_asset where entry_id="$ENTRY_ID";

What’s the status? for reference:

class KalturaAssetStatus extends KalturaEnum
        const ERROR = -1;
        const QUEUED = 0; 
        const READY = 2; 
        const DELETED = 3; 
        const IMPORTING = 7; 
        const EXPORTING = 9; 

Finally, you say you see the flavour files on disk, are they in the expected path?

mysql> mysql> select file_path from file_sync where object_id  in (select id from flavor_asset where entry_id="$ENTRY_ID");


Hey @Jess

Thanks for the reply!

I’ve used the batch entry investigation functionality before. It’s useful to gain some insight into errors like this. It does give some messages in the description column for these flavors like below.

Media info id 2829 saved
audio errors: 1103#Missing media stream.

Media info id 2604 saved
audio errors: 1105#Product invalid duration - product(0.047 sec), source(40.033 sec).
audio warnings: 2000,47#Invalid duration(47msec).; 2001,4#Invalid bitrate(4kbs).; 2105,4,64#Product bitrate too low -     4kbps, required - 64kbps.

However, I’m unsure what I can do with these messages. The entry investigation screen does show that all conversions failed. Manual examination of the conversion logs doesn’t show much in the way of errors, though I’m not sure I completely understand what they’re telling me.

As for the results of the query you asked for, here they are. First, the flavor_asset table with entry_id is the entry in question

id =>status

Here is the result of the second query and verification as to which exist on disk.

Path => On Disk? Y or N
/content/entry/data/0/0/0_yxan801g_0_tbwr1ebv_2 =>  Y
/content/entry/data/0/0/0_yxan801g_0_9ph8r4oz_12.jpg=>  Y
/content/entry/data/0/0/0_yxan801g_0_o4c5jvor_2.mp4 =>  N
/content/entry/data/0/0/0_yxan801g_0_o4c5jvor_2.conv.log =>  Y
/content/entry/data/0/0/0_yxan801g_0_o4c5jvor_12.mp4=>  Y
/content/entry/data/0/0/0_yxan801g_0_m19uiic4_2.mp4 =>  Y
/content/entry/data/0/0/0_yxan801g_0_m19uiic4_2.conv.log=> Y
/content/entry/data/0/0/0_yxan801g_0_7xb6ulfb_2.mp4 =>  Y
/content/entry/data/0/0/0_yxan801g_0_7xb6ulfb_2.conv.log=>  Y
/content/entry/data/0/0/0_yxan801g_0_m19uiic4_12.mp4 =>  Y
/content/entry/data/0/0/0_yxan801g_0_7xb6ulfb_12.mp4 =>  Y
/content/entry/data/0/0/0_yxan801g_0_o4c5jvor_22.mp4 =>  Y
/content/entry/data/0/0/0_yxan801g_0_o4c5jvor_32.mp4 =>  Y

One interesting thing about the video in question is that the source does have an audio track of codec type A52 (aka AC3) as reported by VLC media player. The output files do not have an audio track. In this case, the audio track is not important as there is no actual narration, music, etc. There is no audible sounds in the audio track. I wonder if ffmpeg isn’t enabled to handle this “audio” track?

I can privately share the video via other means if required.


Hi Dave,

So indeed, all these jobs resulted in failure, hence the show as failed in the UI.
Easiest way to help you further would be for you to share the video so I can test the conversation on my own ENV. Feel free to send me a private message with a download link.
I’m assuming this is with your newer ENV, correct? not CE 5…


Correct, this is with the newer env.

The conversion did fail in CE 5, however, did succeed for an FLV based flavor so I never really saw the error as at least one flavor succeeded.

I’ll follow up with a PM. Thank you for your help! It is greatly appreciated!


Hi Dave,

So, I looked into it. The entry ingestion fails in the post convert phase, not the actual convert, which is why you DO see the flavour files on disk.
It fails here:

And indeed, $prdAud->_duration is set to 47ms, which is wrong because the entry duration is 40:32 seconds.
FFmpeg manages to generate 1 or 2 audio frames and stops there so the AUDIO duration for the generated flavours is 47ms, which is of course wrong and does not match the duration set for the source, hence the “post convert” job fails.

If you run the ffmpeg command listed in the log file, you will see:

[libfdk_aac @ 0xcedf80] Trying to remove 1024 samples, but the queue is emptyts/s speed=6.77x
[mp4 @ 0xe23f40] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
[mp4 @ 0xe23f40] Encoder did not produce proper pts, making some up.

So, there clearly is some issue with the sound track on this source video and indeed, when I use any player to test it [VLC for instance] I do not hear any sound, even though a sound track does exist… if you run the mediainfo util on the source file, you will see:

ID                                       : 1
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Codec ID                                 : 2000
Duration                                 : 40s 32ms
Bit rate mode                            : Constant
Bit rate                                 : 64.0 Kbps
Channel(s)                               : 2 channels
Sampling rate                            : 44.1 KHz
Bit depth                                : 16 bits
Compression mode                         : Lossy
Stream size                              : 313 KiB (0%)
Alignment                                : Aligned on interleaves

The easiest workaround I can offer you is to remove the audio track from the original source and then ingest the resulting video. This can easily be done with FFMPEG like so:

$ ffmpeg -i /path/to/orig/video -vcodec copy -an /path/to/audio/stripped/video

Then you can ingest /path/to/audio/stripped/video and it will work. I tested that, of course.


Thanks @jess!

I figured it must have something to do with the audio track, for sure. Your work confirms this in great detail.

I really appreciate all your time in looking at this.

I’ll strip the audio track and go from there. I think that’s most appropriate


Most welcome, Dave.