Omega beta 2 can't play mp4 files from Blackvue camera
#1
Hi,

I'm using Kodi Omega beta2 from Play store.

With this version of Kodi, I can't view my car camera videos anymore. It worked with beta1.

Example video (12MB):
https://zuik.org/koditest.mp4

Log:
https://paste.kodi.tv/rofonaqafu

Interestingly it seems to fail already in thumbnail generation. But even my older videos (which have thumbnails generated already) don't play.

I have tested this with two different Kodi installations, this second one is really clean without extensions and even has empty library. I only use it to watch live tv with the VDR plugin.

The results are the same if I try to play the file from Samba mount, or copy it to USB drive, or copy it to local directory.
Reply
#2
Seems to be an upstream FFmpeg problem, between beta 1 and 2 we switched from 6.0 to 6.0.1. Looking at the file with FFmpeg 6.1:

Code:

$ ffmpeg -i /tmp/koditest.mp4  
ffmpeg version n6.1 Copyright © 2000-2023 the FFmpeg developers
 built with gcc 13.2.1 (GCC) 20230801
 configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-amf --enable-avisynth --enable-cuda-llvm --enable-lto --enable-fontconfig --enable-frei0r --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-liba
ss --enable-libbluray --enable-libbs2b --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libharfbuzz --enable-libiec61883 --enable-libjack --enable-libjxl --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrn
b --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libplacebo --enable-libpulse --enable-librav1e --enable-librsvg --enable-librubberband --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh -
-enable-libsvtav1 --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpl --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-libzimg --enable-n
vdec --enable-nvenc --enable-opencl --enable-opengl --enable-shared --enable-version3 --enable-vulkan
 libavutil      58. 29.100 / 58. 29.100
 libavcodec     60. 31.102 / 60. 31.102
 libavformat    60. 16.100 / 60. 16.100
 libavdevice    60.  3.100 / 60.  3.100
 libavfilter     9. 12.100 /  9. 12.100
 libswscale      7.  5.100 /  7.  5.100
 libswresample   4. 12.100 /  4. 12.100
 libpostproc    57.  3.100 / 57.  3.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55c0f2cdf140] error reading header
[in#0 @ 0x55c0f2cdf040] Error opening input: Invalid data found when processing input
Error opening input file /tmp/koditest.mp4.
Error opening input files: Invalid data found when processing input

Same when trying to play with MPV:

Code:

$ mpv /tmp/koditest.mp4  
[ffmpeg/demuxer] mov,mp4,m4a,3gp,3g2,mj2: error reading header
[lavf] avformat_open_input() failed
[ffmpeg/demuxer] mov,mp4,m4a,3gp,3g2,mj2: error reading header
[lavf] avformat_open_input() failed
Failed to recognize file format.

Exiting... (Errors when loading file)

Error when playing in Kodi is the same:

Code:

2023-12-17 21:41:02.729 T:32041   debug <general>: LoadItemLookup: trying to extract filestream details from video file /tmp/koditest.mp4
2023-12-17 21:41:02.730 T:32041   debug <general>: Open - probing detected format [mov,mp4,m4a,3gp,3g2,mj2]
2023-12-17 21:41:02.731 T:32041   error <general>: ffmpeg[0x0]: [mov,mp4,m4a,3gp,3g2,mj2] error reading header
2023-12-17 21:41:02.731 T:32041   error <general>: Open - Error, could not open file /tmp/koditest.mp4

Playing with VLC works but that's because VLC is still using the old FFmpeg 4.4
Reply
#3
Oh, that sucks.

I'm using a cronjob that fetches the videos from camera to my network drive. It's possible to add some format conversion there but obviously that's not optimal.
Reply
#4
What's the script you are fetching it? Most likely only the first frames get broken as you read them bytewise.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#5
For the record: kodi uses ffmpeg 6.0.1 not 6.1.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#6
(2023-12-17, 23:34)fritsch Wrote: What's the script you are fetching it? Most likely only the first frames get broken as you read them bytewise.

Ah, no. This is a ffmpeg bug just like @Neo1973 already said. I just confirmed it myself, ffmpeg 4.4.2 works but 6.1 (latest) doesn't.

Videos are copied by simple "curl" command, the camera has a www page with the videos. I am sure there is no corruption.

And it has worked in Kodi 18, 19, 20 and 21 beta 1, but stopped working after 21 beta 2.
Reply
#7
Humm..

If I do this with ffmpeg 4.4.2:

ffmpeg -i koditest.mp4 -vcodec copy -an test.mp4

It creates test.mp4 with identical video track. Audio is quiet anyway so I remove it with "-an". Original has quiet mp3 track for some reason.

Anyway, this newly created test.mp4 plays just fine with latest Kodi beta2, and with ffmeg 6.1.

Since this conversion is very fast it's no issue to convert all files after copying. They probably eventually fix it in ffmpeg so I'll check after each Kodi update if this is needed anymore. Smile
Reply
#8
Still. We don't use ffmpeg 6.1 but 6.0.1.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#9
(2023-12-18, 08:41)fritsch Wrote: Still. We don't use ffmpeg 6.1 but 6.0.1.

Sure, but @Neo1973 said:
"Seems to be an upstream FFmpeg problem, between beta 1 and 2 we switched from 6.0 to 6.0.1."

So I find it plausible to believe that the bug was introduced in 6.0.1 and is still present in 6.1.

Looking at ffmpeg bug tracker, there are some similar reports:

https://trac.ffmpeg.org/ticket/10703
(6.1 doesn't open mp3 file but 5.1.2 does)

https://trac.ffmpeg.org/ticket/10731
(ffplay doesn't play normal .ts file captured from air, VLC plays)
Reply
#10
(2023-12-18, 09:35)Zuikkis Wrote:
(2023-12-18, 08:41)fritsch Wrote: Still. We don't use ffmpeg 6.1 but 6.0.1.

Sure, but @Neo1973 said:
"Seems to be an upstream FFmpeg problem, between beta 1 and 2 we switched from 6.0 to 6.0.1."

So I find it plausible to believe that the bug was introduced in 6.0.1 and is still present in 6.1.

Looking at ffmpeg bug tracker, there are some similar reports:

https://trac.ffmpeg.org/ticket/10703
(6.1 doesn't open mp3 file but 5.1.2 does)

https://trac.ffmpeg.org/ticket/10731
(ffplay doesn't play normal .ts file captured from air, VLC plays)
Jep, makes sense! It's always very important when dealing with upstream to not place any assumptions. 6.1 could be broken differently than 6.0.1 and so on :-)
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply

Logout Mark Read Team Forum Stats Members Help
Omega beta 2 can't play mp4 files from Blackvue camera0