Problem with uploading video files on OMERO

Hi everyone,

One of the researchers i work with is trying to import videos on our OMERO test server. The video was in the mp4 format. After looking in Bio-formats (our OMERO server uses the 6.5.1 version) documentation, i saw that the AVI format was compatible. I tried to convert it with ffmpeg, with the “rawvideo” codec, but i still have the error “loci.formats.UnsupportedCompressionException: 808596553 not supported”, when trying to upload it.

So, i know that the AVI video format is recognized by Bio-Formats, but which codec should i use?

Best regards, Marc.

Hi Marc,

the AVI format page on the reference Bio-Formats documentation should include the list of codecs currently supported by the reader.

At the moment, the supported options are:

  • Microsoft Run-Length Encoding (MSRLE)
  • Microsoft Video (MSV1)
  • Raw (uncompressed)
  • JPEG

Hi Sébastien,

I saw the list, but as i said, i already used the “rawvideo” codec of ffmpeg.

Ah thanks, I had missed the rawvideo option which feels at odds with the codec support above indeed. Could you paste the output of

ffprobe -v quiet -print_format json -show_format -show_streams -print_format json <file>.avi

?

@s.besson , thanks for your answer.

The output of your command for the rawvideo converted AVI file is:

$ ffprobe -v quiet -print_format json -show_format -show_streams -print_format json final_rawvideo.avi
{
“streams”: [
{
“index”: 0,
“codec_name”: “rawvideo”,
“codec_long_name”: “raw video”,
“codec_type”: “video”,
“codec_time_base”: “333/10000”,
“codec_tag_string”: “I420”,
“codec_tag”: “0x30323449”,
“width”: 1280,
“height”: 720,
“coded_width”: 1280,
“coded_height”: 720,
“has_b_frames”: 0,
“sample_aspect_ratio”: “1:1”,
“display_aspect_ratio”: “16:9”,
“pix_fmt”: “yuv420p”,
“level”: -99,
“refs”: 1,
“r_frame_rate”: “10000/333”,
“avg_frame_rate”: “10000/333”,
“time_base”: “333/10000”,
“start_pts”: 0,
“start_time”: “0.000000”,
“duration_ts”: 2514,
“duration”: “83.716200”,
“bit_rate”: “332240264”,
“nb_frames”: “2514”,
“disposition”: {
“default”: 0,
“dub”: 0,
“original”: 0,
“comment”: 0,
“lyrics”: 0,
“karaoke”: 0,
“forced”: 0,
“hearing_impaired”: 0,
“visual_impaired”: 0,
“clean_effects”: 0,
“attached_pic”: 0,
“timed_thumbnails”: 0
}
},
{
“index”: 1,
“codec_name”: “mp3”,
“codec_long_name”: “MP3 (MPEG audio layer 3)”,
“codec_type”: “audio”,
“codec_time_base”: “1/48000”,
“codec_tag_string”: “U[0][0][0]”,
“codec_tag”: “0x0055”,
“sample_fmt”: “fltp”,
“sample_rate”: “48000”,
“channels”: 2,
“channel_layout”: “stereo”,
“bits_per_sample”: 0,
“r_frame_rate”: “0/0”,
“avg_frame_rate”: “0/0”,
“time_base”: “3/125”,
“start_pts”: 0,
“start_time”: “0.000000”,
“duration_ts”: 3490,
“duration”: “83.760000”,
“bit_rate”: “128037”,
“nb_frames”: “3490”,
“disposition”: {
“default”: 0,
“dub”: 0,
“original”: 0,
“comment”: 0,
“lyrics”: 0,
“karaoke”: 0,
“forced”: 0,
“hearing_impaired”: 0,
“visual_impaired”: 0,
“clean_effects”: 0,
“attached_pic”: 0,
“timed_thumbnails”: 0
}
}
],
“format”: {
“filename”: “final_rawvideo.avi”,
“nb_streams”: 2,
“nb_programs”: 0,
“format_name”: “avi”,
“format_long_name”: “AVI (Audio Video Interleaved)”,
“start_time”: “0.000000”,
“duration”: “83.760000”,
“size”: “3476826364”,
“bit_rate”: “332075106”,
“probe_score”: 100,
“tags”: {
“encoder”: “Lavf58.29.100”
}
}
}

Best regards, Marc.

Small update: i also tried a conversion (encoding) with the “msvideo1” codec:

ffmpeg -i 20200804_MI08903TG40_5E3_BIN1_1_3_J2-4_F02.mp4 -b 5000k -strict -2 -codec:v msvideo1 final.avi

I also had a “UnsupportedCompressionException” for the import by OMERO.insight (5.5.17):

loci.formats.UnsupportedCompressionException: 1129730893 not supported

Here is the ffprobe output, if it can be of help:

$ ffprobe -v quiet -print_format json -show_format -show_streams -print_format json final_msvideo1.avi
{
“streams”: [
{
“index”: 0,
“codec_name”: “msvideo1”,
“codec_long_name”: “Microsoft Video 1”,
“codec_type”: “video”,
“codec_time_base”: “333/10000”,
“codec_tag_string”: “MSVC”,
“codec_tag”: “0x4356534d”,
“width”: 1280,
“height”: 720,
“coded_width”: 1280,
“coded_height”: 720,
“has_b_frames”: 0,
“sample_aspect_ratio”: “1:1”,
“display_aspect_ratio”: “16:9”,
“pix_fmt”: “rgb555le”,
“level”: -99,
“refs”: 1,
“r_frame_rate”: “10000/333”,
“avg_frame_rate”: “10000/333”,
“time_base”: “333/10000”,
“start_pts”: 0,
“start_time”: “0.000000”,
“duration_ts”: 2514,
“duration”: “83.716200”,
“bit_rate”: “1959097”,
“nb_frames”: “2514”,
“disposition”: {
“default”: 0,
“dub”: 0,
“original”: 0,
“comment”: 0,
“lyrics”: 0,
“karaoke”: 0,
“forced”: 0,
“hearing_impaired”: 0,
“visual_impaired”: 0,
“clean_effects”: 0,
“attached_pic”: 0,
“timed_thumbnails”: 0
}
},
{
“index”: 1,
“codec_name”: “mp3”,
“codec_long_name”: “MP3 (MPEG audio layer 3)”,
“codec_type”: “audio”,
“codec_time_base”: “1/48000”,
“codec_tag_string”: “U[0][0][0]”,
“codec_tag”: “0x0055”,
“sample_fmt”: “fltp”,
“sample_rate”: “48000”,
“channels”: 2,
“channel_layout”: “stereo”,
“bits_per_sample”: 0,
“r_frame_rate”: “0/0”,
“avg_frame_rate”: “0/0”,
“time_base”: “3/125”,
“start_pts”: 0,
“start_time”: “0.000000”,
“duration_ts”: 3490,
“duration”: “83.760000”,
“bit_rate”: “128037”,
“nb_frames”: “3490”,
“disposition”: {
“default”: 0,
“dub”: 0,
“original”: 0,
“comment”: 0,
“lyrics”: 0,
“karaoke”: 0,
“forced”: 0,
“hearing_impaired”: 0,
“visual_impaired”: 0,
“clean_effects”: 0,
“attached_pic”: 0,
“timed_thumbnails”: 0
}
}
],
“format”: {
“filename”: “final_msvideo1.avi”,
“nb_streams”: 2,
“nb_programs”: 0,
“format_name”: “avi”,
“format_long_name”: “AVI (Audio Video Interleaved)”,
“start_time”: “0.000000”,
“duration”: “83.760000”,
“size”: “21983670”,
“bit_rate”: “2099681”,
“probe_score”: 100,
“tags”: {
“encoder”: “Lavf58.29.100”
}
}
}

Regards, Marc.

Hi Marc,

after a bit investigation, it looks like rawvideo will also need a decoder. From a quick test using a sample MP4 file, ffmpeg -codec:v mjpeg is probably the best option to produce an AVI with a codec supported by Bio-Formats.

One of the researchers i work with is trying to import videos on our OMERO test server.

Coming back to the original intent of this post, one word of caution here is that OMERO is not designed with video streaming data in mind. Compared to reference services like Netflix, Youtube etc, the user experience will be quite limited while accessing this type of content. Is there a reason why the source data is stored as a mp4 format in the first place?

Hi Sébastien,

The researcher is working on the Alzheimer’s disease and uses Drosophile flies as an animal model. He wants to evaluate the behaviour of flies in a closed environment (i don’t know the details). He trapped a fly in a measuring flask, and wanted to try to evaluate the fly behaviour by using the graduations of the flask (with other indications probably). He “captured” the video in a very makeshift way, probably with his cellphone, hence the MP4 format.

As i said, i don’t know all the details, so please don’t comment on the expected results of the procedure… At best, it may be a proof of concept :wink:

Thanks for your efforts anyway!

1 Like

@s.besson, also, there’s probably a mistake: you probably wanted to write “mjpeg”, “mpjeg” is not recognized by ffmpeg. But it eventually worked!

Regards, Marc.

you probably wanted to write “mjpeg”, “mpjeg” is not recognized by ffmpeg

You’re absolutely correct. I edited in my original post.

Thanks for letting us know of the context. And let us know if this goes beyond the proof of concept. :slight_smile:

Best,
Sebastien