Jump to content

Kodi videos do not play when transcoding is enabled


Recommended Posts

Posted (edited)

I run Kodi on a system with an old Celeron J1800 cpu, and obviously it can't handle high bitrate and high resolution. But unfortunately, I can't get it to play videos with enabled transcoding too. I bought a monthly premium subscription to see if hardware decoding would help, but it didn't. I also tried installing Emby theater flatpak, but videos wouldn't play at all, just eternal loading. 

I'm sure that transcoding works on my server because I'm using it to play movies on my LG TV (it can't handle high bitrate as well). 

Can someone help me with this? 

 

log.txt

Edited by zaozabot
grammar fix
Posted

Which Kodi plugin do you use?

Posted
10 hours ago, quickmic said:

Which Kodi plugin do you use?

Emby for Kodi next gen.

I have also tried EmbyCon, and transcoding works fine there. 

Posted
31 minutes ago, zaozabot said:

Emby for Kodi next gen.

Did you set the transcoding option? e.g. Transcode bandwith limit

Posted (edited)
57 minutes ago, quickmic said:

Did you set the transcoding option? e.g. Transcode bandwith limit

Yes, I tried lowering the bitrate, and tried selecting specific video formats to transcode. I tried with and without subs. After it asks you to select audio stream and subtitles, nothing happens

Edited by zaozabot
Posted (edited)

Please send me a kodi.log including the (broken) playback.

Also try 11.X

Edited by quickmic
Posted
19 minutes ago, quickmic said:

Please send me a kodi.log including the (broken) playback.

Also try 11.X

Tried 11.X yesterday, same result. Log attached

kodi.log

Posted

I can see a crash of embycon plugin. Don't use both plugins simultaneous.

Not sure if this is the actual problem, the playback. Seems hls has a problem, might be Emby server related.

Not detecting m3u8/hls with non standard extension and non standard mime type

I doubt, that hls works with other plugins and only next-gen has a problem.

 

Posted
14 minutes ago, quickmic said:

I can see a crash of embycon plugin. Don't use both plugins simultaneous.

Not sure if this is the actual problem, the playback. Seems hls has a problem, might be Emby server related.

Not detecting m3u8/hls with non standard extension and non standard mime type

I doubt, that hls works with other plugins and only next-gen has a problem.

 

I installed embycon after my failed attempts to get transcoding to work on emby for kodi next gen.

If you think it might help, I can uninstall embycon and upload a new log, or upload a working transcoding log with running embycon.

I attached a server log in the first message if you'll want to take a look at it

Posted

Just disable embycon.

The server log does not include the transencoding request.

Also, you need to enable debug log on Emby server.

Posted

Seems your server doesn't even try to transcode.

This is how it should look like:

 

 

2024-09-14 11:06:07.219 Debug Server: http/1.1 GET http://‌‍‍192.168.0.207‌:80/Items/75870/Images/Backdrop/4?EnableImageEnhancers=False&tag=5d2968bcc87e812eea9aa5100fb5b0cb. Source Ip: ‌‍‍192.168.0.50‌, UserAgent: Emby for Kodi Next Gen/11.0.9
2024-09-14 11:06:07.220 Debug SqliteItemRepository: GetitemById Movie 75870 /mnt/storage0/multimedia/movies/A/A Team (2010)/The A Team (2010).mkv
2024-09-14 11:06:07.221 Debug App: Found cached image /var/lib/emby/metadata/library/dd/dd643f13a4cfb36b5ced8595cfc3e6a5/imagecache/fanart4.jpg
2024-09-14 11:06:07.235 Debug Server: http/1.1 Response 200 to ‌‍‍192.168.0.50‌. Time: 16ms. GET http://‌‍‍192.168.0.207‌:80/Items/75870/Images/Backdrop/4?EnableImageEnhancers=False&tag=5d2968bcc87e812eea9aa5100fb5b0cb
2024-09-14 11:06:07.615 Info Server: http/1.1 GET http://‌‍‍192.168.0.207‌:80/videos/75870/main.m3u8?TranscodeReasons=ContainerBitrateExceedsLimit&VideoCodec=h264&AudioCodec=aac&VideoBitrate=664000&AudioBitrate=192000&AudioStreamIndex=1&MediaSourceId=mediasource_75870&PlaySessionId=ab272c3a6d11473cbda4b7adeca0cc7e&DeviceId=22ed807f-b5b1-46e7-9bd8-9e6070794f8b&api_key=‌XXXXX. Source Ip: ‌‍‍192.168.0.50‌, Connection=keep-alive, Host=‌‍‍192.168.0.207:80‌, User-Agent=Emby for Kodi Next Gen/11.0.9, Accept-Charset=utf-8, Accept-Encoding=gzip, Authorization=Emby Client="Emby for Kodi Next Gen", Device="Kodi-Laptop", DeviceId="22ed807f-b5b1-46e7-9bd8-9e6070794f8b", Version="11.0.9", Emby UserId="e1f4f9fe335c47ae8524d0d7de19e9ab", Content-Type=application/json; charset=utf-8, Content-Length=0, X-Emby-Token=‌XXXXX
2024-09-14 11:06:07.629 Debug SqliteItemRepository: GetitemById Movie 75870 /mnt/storage0/multimedia/movies/A/A Team (2010)/The A Team (2010).mkv
2024-09-14 11:06:07.661 Info Server: http/1.1 Response 200 to ‌‍‍192.168.0.50‌. Time: 46ms. GET http://‌‍‍192.168.0.207‌:80/videos/75870/main.m3u8?TranscodeReasons=ContainerBitrateExceedsLimit&VideoCodec=h264&AudioCodec=aac&VideoBitrate=664000&AudioBitrate=192000&AudioStreamIndex=1&MediaSourceId=mediasource_75870&PlaySessionId=ab272c3a6d11473cbda4b7adeca0cc7e&DeviceId=22ed807f-b5b1-46e7-9bd8-9e6070794f8b&api_key=‌XXXXX
2024-09-14 11:06:07.686 Info Server: http/1.1 GET http://‌‍‍192.168.0.207‌:80/emby/videos/75870/hls1/main/0.ts?PlaySessionId=ab272c3a6d11473cbda4b7adeca0cc7e. Source Ip: ‌‍‍192.168.0.50‌, Accept=*/*, Connection=keep-alive, Host=‌‍‍192.168.0.207:80‌, User-Agent=Lavf/60.3.100, Range=bytes=0-, Icy-MetaData=1
2024-09-14 11:06:07.758 Debug SqliteItemRepository: GetitemById Movie 75870 /mnt/storage0/multimedia/movies/A/A Team (2010)/The A Team (2010).mkv
2024-09-14 11:06:07.767 Info App: Starting transcoding because currentTranscodingIndex=null
2024-09-14 11:06:08.077 Debug App: CodecValidation: FindVideoEncoder - MediaType: h264, UseHardwareCodecs: True, HWA-Mode: Disabled
2024-09-14 11:06:08.092 Debug App: CodecValidation: Checking: 'x264'
2024-09-14 11:06:08.123 Debug App: CodecValidation: Check successful - selecting 'x264'
2024-09-14 11:06:08.127 Debug App: CodecValidation: FindVideoDecoder - MediaType: hevc, UseHardwareCodecs: True, HWA-Mode: Disabled
2024-09-14 11:06:08.134 Debug App: CodecValidation: Checking: 'Automatic software decoder'
2024-09-14 11:06:08.140 Debug App: CodecValidation: Check successful - selecting 'Automatic software decoder'
2024-09-14 11:06:08.332 Debug App: CodecValidation: Processing Plan
2024-09-14 11:06:08.332 Debug App: CodecValidation: Name                                        CanDoInHW  WillDoInHW  Reason                                                 
2024-09-14 11:06:08.333 Debug App: CodecValidation: Automatic software decoder               >> False      False       Software Codec                                          
2024-09-14 11:06:08.334 Debug App: CodecValidation: VideoInput                               >> False      False       Not a hardware decoder                                  
2024-09-14 11:06:08.334 Debug App: CodecValidation: Scaling                                  >> False      False                                                               
2024-09-14 11:06:08.334 Debug App: CodecValidation: VideoOutput                              >> False      False       Not a hardware encoder                                  
2024-09-14 11:06:08.335 Debug App: CodecValidation: x264                                     >> False      False       Software Codec                                          
2024-09-14 11:06:08.337 Debug App: CodecValidation: Video Processing Steps for [0:0]: H.265 (HEVC)
2024-09-14 11:06:08.337 Debug App: CodecValidation: Step                    HW-Context   Format       SW-Format           Size   Next
2024-09-14 11:06:08.338 Debug App: CodecValidation: HEVC                 >> -            yuv420p      yuv420p         1920x816 >> scale
2024-09-14 11:06:08.338 Debug App: CodecValidation: scale                >> -            yuv420p      yuv420p          640x272 >> 
2024-09-14 11:06:08.525 Info App: ProcessRun 'StreamTranscode 398642' Execute: /opt/emby-server/bin/ffmpeg -loglevel +timing -y -print_graphs_file "/var/lib/emby/logs/ffmpeg-transcode-39864252-5c21-4421-9415-626002763da5_1graph.txt" -copyts -start_at_zero -f matroska,webm -c:v:0 hevc -noautorotate -i "/mnt/storage0/multimedia/movies/A/A Team (2010)/The A Team (2010).mkv" -filter_complex "[0:0]scale@f1=width=640:height=272[f1_out0]" -map [f1_out0] -map 0:1 -sn -c:v:0 libx264 -g:v:0 72 -maxrate:v:0 664000 -bufsize:v:0 1328000 -sc_threshold:v:0 0 -keyint_min:v:0 72 -r:v:0 23.97598648071289 -pix_fmt:v:0 yuv420p -preset:v:0 veryfast -profile:v:0 main -x264opts:v:0 "subme=0:me_range=4:rc_lookahead=10:partitions=none" -crf:v:0 23 -c:a:0 copy -metadata:s:a:0 language=ger -disposition:a:0 default -max_delay 5000000 -avoid_negative_ts disabled -f segment -map_metadata -1 -map_chapters -1 -segment_format mpegts -segment_list "/var/lib/emby/transcoding-temp/144BDD/144BDD.m3u8" -segment_list_type m3u8 -segment_time 00:00:03.000 -segment_start_number 0 -individual_header_trailer 0 -write_header_trailer 0 -segment_write_temp 1 "/var/lib/emby/transcoding-temp/144BDD/144BDD_%d.ts"
2024-09-14 11:06:08.532 Debug App: ProcessRun 'StreamTranscode 398642' Started.
2024-09-14 11:06:09.762 Info Server: http/1.1 POST http://‌‍‍192.168.0.207‌:80/Sessions/Playing/Progress. Source Ip: ‌‍‍192.168.0.25‌, UserAgent: Emby for Kodi Next Gen/11.0.8
2024-09-14 11:06:09.763 Debug SessionManager: OnPlaybackProgress TimeUpdate e23880834da2431e813ea8ee79602cea
2024-09-14 11:06:09.767 Info Server: http/1.1 Response 204 to ‌‍‍192.168.0.25‌. Time: 5ms. POST http://‌‍‍192.168.0.207‌:80/Sessions/Playing/Progress
2024-09-14 11:06:10.150 Info Server: http/1.1 Response 200 to ‌‍‍192.168.0.50‌. Time: 2464ms. GET http://‌‍‍192.168.0.207‌:80/emby/videos/75870/hls1/main/0.ts?PlaySessionId=ab272c3a6d11473cbda4b7adeca0cc7e
2024-09-14 11:06:10.154 Info Server: http/1.1 GET http://‌‍‍192.168.0.207‌:80/emby/videos/75870/hls1/main/1.ts?PlaySessionId=ab272c3a6d11473cbda4b7adeca0cc7e. Source Ip: ‌‍‍192.168.0.50‌, Accept=*/*, Connection=keep-alive, Host=‌‍‍192.168.0.207:80‌, User-Agent=Lavf/60.3.100, Range=bytes=0-, Icy-MetaData=1
2024-09-14 11:06:10.156 Debug SqliteItemRepository: GetitemById Movie 75870 /mnt/storage0/multimedia/movies/A/A Team (2010)/The A Team (2010).mkv
2024-09-14 11:06:11.641 Info Server: http/1.1 GET http://‌‍‍192.168.0.207‌:80/emby/videos/75870/hls1/main/2.ts?PlaySessionId=ab272c3a6d11473cbda4b7adeca0cc7e. Source Ip: ‌‍‍192.168.0.50‌, Accept=*/*, Connection=keep-alive, Host=‌‍‍192.168.0.207:80‌, User-Agent=Lavf/60.3.100, Range=bytes=0-, Icy-MetaData=1

 

-> Execute: /opt/emby-server/bin/ffmpeg

Your server log shows nothing about ffmpeg which is used for transcoding.

Posted (edited)

@Luke

Please have a look @zaozabot's log, starting at timecode:

2024-09-14 11:49:00.937 -> The request was send by the plugin

2024-09-14 11:49:00.937 Info Server: http/1.1 GET http://192.168.1.106:8096/videos/9089/main.m3u8?TranscodeReasons=ContainerBitrateExceedsLimit&VideoCodec=h264&AudioCodec=aac&VideoBitrate=2000000&AudioBitrate=128000&MediaSourceId=9c22dbf14719f735b7f5458ab240aeb1&PlaySessionId=576201f7311b4635a11ef7df1aefe593&DeviceId=9f9dbfd3-4ce4-44a9-bcd5-e18fafb5b8fa&api_key=x_secret6_x. Connection=keep-alive, Host=host2, User-Agent=Emby for Kodi Next Gen/10.0.47, Accept-Charset=utf-8, Accept-Encoding=gzip, deflate, Authorization=Emby Client="Emby for Kodi Next Gen", Device="batocera.linux", DeviceId="9f9dbfd3-4ce4-44a9-bcd5-e18fafb5b8fa", Version="10.0.47", Emby UserId="e5d5fdbf2dd04de18d604451f6d871a2", Content-Type=application/json; charset=utf-8, Content-Length=0, X-Emby-Token=x_secret6_x

Maybe you see something suspicious.

Edited by quickmic
Posted

Can you create a test account on your server for me?

Posted
3 minutes ago, quickmic said:

Can you create a test account on your server for me?

Sorry I'm new to all this, forgive me if I don't understand some terms. Do you mean new user?

Posted
3 minutes ago, zaozabot said:

Sorry I'm new to all this, forgive me if I don't understand some terms. Do you mean new user?

Yes, a new user on your server and I would need access from the internet.

If this is possible, send me the login data via PM and I'll run some tests.

  • 6 months later...
quickmic
Posted

Finally I was able to create a test case. Seems to be an issue with newer ffmpeg versions. I'll fix that in 11.2.X which is currently under development.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...