Kodi Community Forum

Full Version: MJPEG (Motion JPEG) videos play with black screen, audio ok
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello

I am having trouble playing home videos from an old canon camera taken about 4 years ago.  These videos used to be able to play in older versions of XBMC/Kodi and i am not sure when it stopped working.  I have changed the system a couple of times and noticed the problem but did not realize how widespread it was as i usually shuffle play the home videos and figured maybe some did not work.  It turns out none of them play.  The same files do play correctly with VLC on the same system.

The thumbnails for the files display correctly, and the audio is ok, but the video is just a black screen.  I have searched but all i can find is info on streaming and old outdated posts for issues related to Motion JPEG files.  I have not tested every file format, but these MJPEG files seem to be the only ones I have an issue with; all other video files I have play ok.

The codec information for the file is here, as detected by VLC:  https://i.imgur.com/MfRnGPX.jpg

The debug log file is here:  https://paste.ubuntu.com/p/3p7wdw8g7G/

This is the file i tried to play and is in the debug log:  https://drive.google.com/file/d/11gBJSkA...sp=sharing

This is a detailed system report for the laptop that runs Kodi:  https://i.imgur.com/R4lHjTg.png

I hope someone can help or at least validate there is a problem and its not just my system.

Please let me know what you think.

thanks
dg
Could you share a sample? I checked with my local mjpeg file - which works.
@koawmfot - if you want support here, please get rid of the super repo installs.

The forum moderators have determined that banned addons (wiki) are present on your system. To receive assistance here, these banned items must be removed. If a clean log is not submitted within 3 days, then the relevant post(s) will be removed after this time.
(2018-09-29, 20:39)fritsch Wrote: [ -> ]Could you share a sample? I checked with my local mjpeg file - which works.
There was a sample file in the original post

https://drive.google.com/file/d/11gBJSkAGq77W96oFpeps9j49lAHHFgI-/view?usp=sharing
(2018-09-29, 20:41)DarrenHill Wrote: [ -> ]@koawmfot - if you want support here, please get rid of the super repo installs.

The forum moderators have determined that banned addons (wiki) are present on your system. To receive assistance here, these banned items must be removed. If a clean log is not submitted within 3 days, then the relevant post(s) will be removed after this time.

Man i am using a configuration that has been building into my profile for over 12 years.  Sorry about that, I  don't really use much if any add-ons (lyrics and subs for the most part).  I was probably solving some issue at the time and never cleaned up.  Anyway, i got rid of everything i could get rid of.  Not sure if any are still bad, if they are, let me know and i will pull them.

Updated debug log:  https://paste.ubuntu.com/p/r7FT7hsh76/

thanks for the help.
Okay: https://www.dropbox.com/s/keb0m0ztzvoqk2...6.png?dl=0

works perfectly fine for me on Ubuntu + kodi 18. 

Does this work for you: https://www.dropbox.com/s/ewkymyiaa599ze...e.avi?dl=0 <- It's a mjpeg reencode of your file without Audio
hey thanks for trying.  no, the recode without audio still does not play, its just black.

heres the debug log for that one:  https://paste.ubuntu.com/p/Zh2dczdJMg/

i'm not seeing any errors, this is the only line that looks off to me:
Quote:ffmpeg[508]: [swscaler] No accelerated colorspace conversion found from yuv420p to bgra
i looked around and cannot tell if that is a fatal error or not.  

later down it mentions the yuvj422p as part of the media info, so maybe its related?
Quote:11:27:39.426 T:5904 INFO: ffmpeg[1710]: Input #0, avi, from 'E:\movies\mvi_7530-recode.avi':
11:27:39.426 T:5904 INFO: ffmpeg[1710]: Metadata:
11:27:39.426 T:5904 INFO: ffmpeg[1710]: encoder : Lavf57.83.100
11:27:39.426 T:5904 INFO: ffmpeg[1710]: Duration: 00:00:04.57, start: 0.000000, bitrate: 2301 kb/s
11:27:39.426 T:5904 INFO: ffmpeg[1710]: Stream #0:0: Video: mjpeg (MJPG / 0x47504A4D), yuvj422p(pc, bt470bg/unknown/unknown), 640x480, 2302 kb/s, 30 fps, 30 tbr, 30 tbn, 30 tbc
The yuvj422p(pc, bt470bg/unknown/unknown) is mentioned here and seems relevant/related:  https://github.com/intel/intel-vaapi-driver/issues/393

Is there a way to pass the video to ffmpeg in Kodi directly?

This is the only other thing that stands out to me:
Quote:11:27:39.427 T:4920 NOTICE: running thread: video_thread
11:27:39.427 T:5904 DEBUG: CVideoPlayer::SetCaching - caching state 2
11:27:39.427 T:5904 DEBUG: CDVDClock::SetSpeedAdjust - adjusted:0.000000
11:27:39.427 T:5904 DEBUG: CVideoPlayer::HandleMessages - player 2 reported state: 0
11:27:39.427 T:4920 INFO: CVideoPlayerVideo - Stillframe left, switching to normal playback
11:27:39.427 T:5904 DEBUG: CVideoPlayer::SetCaching - caching state 1
11:27:39.427 T:5904 DEBUG: CDVDClock::SetSpeedAdjust - adjusted:0.000000
11:27:39.430 T:4920 NOTICE: CDVDVideoCodecFFmpeg::Open() Using codec: MJPEG (Motion JPEG)
11:27:39.430 T:4920 DEBUG: CDVDVideoCodecFFmpeg - open frame threaded with 6 threads
11:27:39.430 T:4920 DEBUG: CDVDVideoCodecFFmpeg - Updated codec: ff-mjpeg
11:27:39.431 T:3544 DEBUG: CVideoGUIInfo::InitCurrentItem(E:\movies\mvi_7530-recode.avi)
11:27:39.431 T:3544 DEBUG: CPlayerGUIInfo::InitCurrentItem(E:\movies\mvi_7530-recode.avi)
11:27:39.438 T:4920 DEBUG: ffmpeg[1338]: [swscaler] deprecated pixel format used, make sure you did set range correctly
11:27:39.442 T:4920 DEBUG: Previous line repeats 1 times.

11:27:39.442 T:4920 DEBUG: CRenderManager::Configure - change configuration. 640x480. display: 640x480. framerate: 30.00.
11:27:39.447 T:4124 DEBUG: Loading settings for E:\movies\mvi_7530-recode.avi
11:27:39.455 T:5904 DEBUG: CVideoPlayer::SetCaching - caching state 0
11:27:39.455 T:5904 DEBUG: CDVDClock::SetSpeedAdjust - adjusted:0.000000
The above log info and test was done with hardware acceleration on. 
I had already tested disabling the DXVA hardware acceleration, and figured i would pass over a debug log with that acceleration OFF too: https://paste.ubuntu.com/p/85xGKYtvcZ/

thanks again for looking guys.
I think i made some progress.

I recoded the AVI with no audio but recompressed to "Planar 4:2:0 YUV full scale" and the file will play.  The original file's codec information has the format as "Planar 4:2:2 YUV full scale"

This is the file that works:  https://drive.google.com/file/d/1eZv1wb7...sp=sharing

Debug log for the working file:  https://paste.ubuntu.com/p/XyFKRs2BqW/

This is the codec information for the working file:  https://i.imgur.com/o7EbG10.png

(This is the codec information for the file that does not work: https://i.imgur.com/MfRnGPX.jpg)
Jep - it's a problem in the renderer not the decoder. I just wanted to verify on my setup first.

@afedchin  could you check the path in windows for yuv422 to display?
hey guys were we able to identify where the problem is coming from in the renderer?
No - lack of developers. Feel free to open a bug at trac.kodi.tv so it is not forgotten.
i understand.  i wish this was part of my area of expertise.  https://trac.kodi.tv/ticket/18063

thanks for the help.
Please try with tomorrow's nightly. Anton fixed it! :-) thx very much @afedchin.
the trac was closed, and the change seems to have made it to the Oct 5 nightly.

works perfect from what i can tell.  many thanks to the team.  you guys are and have been great for as long as i have been using this app.

thanks//