PDA

View Full Version : HLS (chromecast, roku), and burned subtitles issue



odin
11-17-2020, 07:54 AM
I think I found a bug with the HLS format and using Burn Subtitles into video, I don't have these devices but I do have a hdmi dongle that works good with the HLS format it allows me to free seek without full encoding the file, however it seems to have an issue with Burned subtitles, when I seek to a position in the movie the subtitles get 'reset' to the beginning and no longer sync with the movie, (ie seek to 30 minutes into the movie, the burned subtitle will reset to first lines.)

The expected behavior would be, is when you seek it should encode the correct position of the subtitle with that timeline in the movie.

I hope this makes sense, and is fixable :)

Thanks

Peter
11-17-2020, 11:01 AM
I tried it here with a DVD which had bitmap subtitles which Mezzmo burned in and after seeking to 30 minutes in the subtitles were shown correctly for the time. What format of file are you playing and are the subtitles embedded or external?

odin
11-17-2020, 12:55 PM
I tried it here with a DVD which had bitmap subtitles which Mezzmo burned in and after seeking to 30 minutes in the subtitles were shown correctly for the time. What format of file are you playing and are the subtitles embedded or external?

Most of my subtitles are in external srt format, some movies use embedded (although I could never get embedded to work with sub burning so I use mezzmo to extract any embedded subs to srt first), so I guess external srt would be the best answer for that, then I use the chromecast profile which encoded them to hls format and enable sub-burning since my device doesn't support any containers for subs, on your end can you test with srt subtitles and see what happens? maybe dvd or image subtitles are working.

I have tried several different movies and the result is the same.

here you can see part 262 (which I seeked to on hdmi device is showing the opening subtitle text, I just used the pc to directly play the transcoded file for a better example.)
1276

I am wondering if maybe it's related to the nvenc hardware encoding, I will try turning hardware encoding off later and see what happens.

Movie format (before hls transcode)


ffmpeg version N-90389-g247cdc2 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 4.9.2 (GCC)
configuration: --arch=x86_64 --target-os=mingw32 --cross-prefix=x86_64-w64-mingw32- --enable-static --disable-shared --enable-zlib --disable-postproc --prefix=/home/peter/ffmpeg/build/gpl64 --enable-libmp3lame --enable-libx264 --enable-gpl --extra-libs='-lx264 -lpthread -lstdc++' --enable-runtime-cpudetect --extra-cflags=-I/home/peter/cc32/include --extra-ldflags=-L/home/peter/cc64/lib --pkg-config=pkg-config --pkg-config-flags=--static --disable-w32threads --enable-libvpx --enable-libvorbis --enable-libtheora --enable-libx265 --enable-cuda --enable-cuvid --enable-dxva2 --enable-libmfx --enable-nvenc --enable-gnutls --extra-libs='-lz -lnettle -lhogweed -lgmp -lidn -lws2_32 -lcrypt32'
libavutil 56. 11.100 / 56. 11.100
libavcodec 58. 14.100 / 58. 14.100
libavformat 58. 10.100 / 58. 10.100
libavdevice 58. 2.100 / 58. 2.100
libavfilter 7. 13.100 / 7. 13.100
libswscale 5. 0.102 / 5. 0.102
libswresample 3. 0.101 / 3. 0.101
Input #0, matroska,webm, from 'z:\Movies\2020.1080p.mkv':
Metadata:
title : test
encoder : libebml v1.3.9 + libmatroska v1.5.2
creation_time : 2020-10-06T04:18:47.000000Z
Duration: 01:27:02.56, start: 0.000000, bitrate: 4946 kb/s
Chapter #0:0: start 0.000000, end 874.124000
Metadata:
title : 1
Chapter #0:1: start 874.124000, end 1786.494000
Metadata:
title : 2
Chapter #0:2: start 1786.494000, end 2624.247000
Metadata:
title : 3
Chapter #0:3: start 2624.247000, end 3424.005000
Metadata:
title : 4
Chapter #0:4: start 3424.005000, end 4351.806000
Metadata:
title : 5
Chapter #0:5: start 4351.806000, end 4901.062000
Metadata:
title : 6
Chapter #0:6: start 4901.062000, end 5222.560000
Metadata:
title : 7
Stream #0:0(eng): Audio: ac3, 48000 Hz, 5.1(side), fltp, 384 kb/s (default)
Metadata:
BPS-eng : 384000
DURATION-eng : 01:27:02.560000000
NUMBER_OF_FRAMES-eng: 163205
NUMBER_OF_BYTES-eng: 250682880
_STATISTICS_WRITING_APP-eng: mkvmerge v35.0.0 ('All The Love In The World') 64-bit
_STATISTICS_WRITING_DATE_UTC-eng: 2020-10-06 04:18:47
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream #0:1(eng): Video: h264 (High), yuv420p(tv, bt709, progressive), 1920x800 [SAR 1:1 DAR 12:5], 23.98 fps, 23.98 tbr, 1k tbn, 2k tbc (default)
Metadata:
BPS-eng : 4560470
DURATION-eng : 01:27:02.514000000
NUMBER_OF_FRAMES-eng: 125215
NUMBER_OF_BYTES-eng: 2977140010
_STATISTICS_WRITING_APP-eng: mkvmerge v35.0.0 ('All The Love In The World') 64-bit
_STATISTICS_WRITING_DATE_UTC-eng: 2020-10-06 04:18:47
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
At least one output file must be specified

<MEZZMO>: Child process ended with code: 109, ExitCode=1


---> DB Level Info: 40, 100
---> Frame rate: 23.98
---> Aspect ratio: 12:5 PAR=1:1
---> Duration: 01:27:02

Peter
11-17-2020, 02:32 PM
I have reproduced the issue with the external subtitles, we are working on a solution to the problem now

odin
11-17-2020, 06:34 PM
I have reproduced the issue with the external subtitles, we are working on a solution to the problem now

Excellent, hopefully it's an easy fix :)

Peter
11-18-2020, 12:06 PM
We have made a change that is showing the subtitles correctly. Please send an email to support [at] conceiva [dot] com and we will send you a patch to try.

odin
11-18-2020, 05:11 PM
Thank you,
I just tested and so far so good, subs seem to sync up fine when seeking now!, I will continue to test and let you know if I find any problems.

Edit:
All good with subs, I did notice a small bug on the seek bar, when I fast forward it initially shows the correct seek to time, but then once it starts playing it resets back to previous time it was playing at (even though its playing at correct new seek time), maybe its just my device but see what yours does. not a huge issue. (seeking also works fine for files without any subtitles).

In the meantime I was messing with some profile settings and if I change <copyts>0</copyts> to <copyts>1</copyts> the seek bar works but then the subtitles get weird again

odin
11-19-2020, 07:09 PM
I was experimenting 6.0.6.0 and when <copyts>1</copyts> is set in the device profile the subs sync ok and the seek timeline bar works (just found this out now :( ).
in the beta you sent when <copyts>0</copyts> the subs work but the seek bar is not working , and if I set <copyts>1</copyts> the seek bar works but the subs get out of sync.

for now I reverted to 6.0.6.0 using the <copyts>1</copyts> since both sync and subs are working.