ddp 1 Posted January 21, 2023 Posted January 21, 2023 I have MPEGTS (DVB) files that contain a subtitle type of 'English (DVB_TELETEXT): Subtitle Title English (DVB_TELETEXT) Language English Codec DVB_TELETEXT Default No Forced No Externa lNo When I select any the subtitle to view for any of these mpgs, the playback fails after several attempts with the 'too many errors' message. The file in the logs I am trying to play is called "/myth-recordings/1030_20230115102800.ts" embyserver.txt ffmpeg-remux-678135f2-a477-4446-8ef0-38bf30564eb3_1.txt ffmpeg-remux-2424225f-3238-44fd-b27b-a62bfd85fef6_1.txt ffmpeg-remux-8682642c-23a7-4b1e-b254-696efd7b2100_1.txt ffmpeg-remux-b25fbe69-fa82-47b7-bf96-55f8e221f4fa_1.txt ffmpeg-remux-e0ff16c9-37e8-4808-b7a0-c57e0213347c_1.txt ffmpeg-transcode-7c2c5de0-0e86-47f8-a9b4-90bf51f367b3_1.txt ffmpeg-transcode-49bf095d-e01e-4b5f-92f8-dcabf7c57b1b_1.txt ffmpeg-transcode-c274e3b0-0465-4a08-b1bd-a3c32ae84d14_1.txt ffmpeg-transcode-fc18cba4-5b18-4e2c-8eec-e4f661ea306c_1.txt
Luke 42083 Posted January 21, 2023 Posted January 21, 2023 HI, how does playing in the web app compare?
ddp 1 Posted January 21, 2023 Author Posted January 21, 2023 The web app works. This made me wonder if maybe direct play was somehow an issue... So I just checked stats for nerds on the stream when I play the video direct on my android TV (without teletext) and its 'direct stream', H264 (direct) with AAC. It is indicating that it is ~12% transcoding progress - just in case that helps...
visproduction 316 Posted January 22, 2023 Posted January 22, 2023 (edited) I've run into a very similar situation and solved it with a couple of command line entries that take about 15 seconds each. Your log https://emby.media/community/applications/core/interface/file/attachment.php?id=155253&key=59fc0af28ed2fce27a124dd92dd3bffd has serious errors from ffmpeg trying to convert the .ts media. ffmpeg command: /bin/ffmpeg -loglevel +timing -y -print_graphs_file "/config/logs/ffmpeg-remux-2424225f-3238-44fd-b27b-a62bfd85fef6_1graph.txt" -copyts -start_at_zero -f mpegts -noaccurate_seek -c:v:0 h264 -i "/myth-recordings/1030_20230115102800.ts" -map 0:1 -map 0:2 -sn -c:v:0 copy -c:a:0 aac -ab:a:0 192000 -ac:a:0 2 -metadata:s:a:0 language=eng -disposition:a:0 default -max_delay 5000000 -avoid_negative_ts disabled -f segment -map_metadata -1 -map_chapters -1 -segment_format mpegts -segment_list "/transcode/transcoding-temp/1022F0/1022F0.m3u8" -segment_list_type m3u8 -segment_time 00:00:06.000 -segment_start_number 0 -break_non_keyframes 1 -individual_header_trailer 0 -write_header_trailer 0 -segment_write_temp 1 "/transcode/transcoding-temp/1022F0/1022F0_%d.ts" This causes error repeats about 60 times within 1/10th second 01:37:48.405 [h264 @ 0x7b1a40] decode_slice_header error 01:37:48.405 [h264 @ 0x7b1a40] no frame! 01:37:48.405 [h264 @ 0x7b1a40] non-existing PPS 0 referenced Then several other options are attempted before the quit command: 01:37:48.421 [h264 @ 0x7b1a40] number of reference frames (0+5) exceeds max (4; probably corrupt input), discarding one 01:37:48.427 [h264 @ 0x7b1a40] mmco: unref short failure Last message repeated 1 times 01:37:48.427 [h264 @ 0x7b1a40] number of reference frames (0+5) exceeds max (4; probably corrupt input), discarding one 01:37:48.433 [h264 @ 0x7b1a40] mmco: unref short failure Last message repeated 1 times 01:37:48.433 [h264 @ 0x7b1a40] number of reference frames (0+5) exceeds max (4; probably corrupt input), discarding one 01:37:48.439 [h264 @ 0x7b1a40] Increasing reorder buffer to 2 01:37:48.483 [mpegts @ 0x790680] PES packet size mismatch 01:37:48.483 [mpegts @ 0x790680] Packet corrupt (stream = 2, dts = 5555819634). 01:37:48.483 [mpegts @ 0x790680] PES packet size mismatch 01:37:48.483 [mpegts @ 0x790680] Packet corrupt (stream = 3, dts = 5555825991). 01:37:48.483 [mpegts @ 0x790680] Could not find codec parameters for stream 4 (Unknown: none ([11][0][0][0] / 0x000B)): unknown codec Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options 01:37:48.483 [mpegts @ 0x790680] Could not find codec parameters for stream 5 (Unknown: none ([5][0][0][0] / 0x0005)): unknown codec Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options 01:37:48.484 Input #0, mpegts, from '/myth-recordings/1030_20230115102800.ts': 01:37:48.484 Duration: 01:47:20.64, start: 55291.793267, bitrate: 3682 kb/s 01:37:48.484 Program 1 01:37:48.484 Stream #0:0[0x2b](eng): Subtitle: dvb_teletext ([6][0][0][0] / 0x0006), 492x250, Start-Time 55292.740s 01:37:48.484 Stream #0:1[0x66]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709, top first), 1920x1080 [SAR 1:1 DAR 16:9], Level 40, 25 fps, 50 tbr, 90k tbn, Start-Time 55292.237s 01:37:48.484 Stream #0:2[0x67](eng): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fltp, 256 kb/s, Start-Time 55291.793s 01:37:48.484 Stream #0:3[0x68](eng): Audio: aac_latm (HE-AAC) ([17][0][0][0] / 0x0011), 48000 Hz, stereo, fltp, Start-Time 55291.976s (visual impaired) (descriptions) 01:37:48.484 Stream #0:4[0x1b58]: Unknown: none ([11][0][0][0] / 0x000B), Start-Time 55291.793s 01:37:48.484 Stream #0:5[0x1e6d]: Unknown: none ([5][0][0][0] / 0x0005), Start-Time 55291.793s 01:37:48.485 Stream mapping: 01:37:48.485 Stream #0:1 -> #0:0 (copy) 01:37:48.485 Stream #0:2 -> #0:1 (mp2 (native) -> aac (native)) 01:37:48.485 Press [q] to stop, [?] for help 01:37:48.486 Output #0, segment, to '/transcode/transcoding-temp/1022F0/1022F0_%d.ts': 01:37:48.486 Metadata: 01:37:48.486 encoder : Lavf59.17.100 01:37:48.486 Stream #0:0: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709, top first), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, Level 40, 25 fps, 50 tbr, 90k tbn 01:37:48.486 Stream #0:1(eng): Audio: aac (LC), 48000 Hz, stereo, fltp, 192 kb/s (default) 01:37:48.486 Metadata: 01:37:48.486 encoder : Lavc59.21.100 aac 01:37:48.486 elapsed=00:00:00.00 frame= 0 fps=0.0 q=-1.0 size=N/A time=00:00:00.00 bitrate=N/A throttle=off speed= 0x 01:37:48.657 [segment @ 0xb09080] Opening '/transcode/transcoding-temp/1022F0/1022F0.m3u8.tmp' for writing 01:37:48.657 SegmentComplete=video:0 Index=0 Start=0.000000 End=6.004000 Duration=6.004000 offset_pts=0 start_pts=0 Frames=199 filename=1022F0_0.ts 01:37:48.657 [segment @ 0xb09080] Opening '/transcode/transcoding-temp/1022F0/1022F0_1.ts.tmp' for writing 01:37:48.802 [segment @ 0xb09080] Opening '/transcode/transcoding-temp/1022F0/1022F0.m3u8.tmp' for writing 01:37:48.806 SegmentComplete=video:0 Index=1 Start=6.004000 End=11.944000 Duration=5.940000 offset_pts=0 start_pts=6004000 Frames=303 filename=1022F0_1.ts 01:37:48.806 [segment @ 0xb09080] Opening '/transcode/transcoding-temp/1022F0/1022F0_2.ts.tmp' for writing 01:37:48.913 [segment @ 0xb09080] Opening '/transcode/transcoding-temp/1022F0/1022F0.m3u8.tmp' for writing 01:37:48.914 SegmentComplete=video:0 Index=2 Start=12.064000 End=17.984000 Duration=5.920000 offset_pts=0 start_pts=12064000 Frames=302 filename=1022F0_2.ts 01:37:48.914 [segment @ 0xb09080] Opening '/transcode/transcoding-temp/1022F0/1022F0_3.ts.tmp' for writing 01:37:48.986 elapsed=00:00:00.50 frame= 1040 fps=0.0 q=-1.0 size=N/A time=-00:00:00.50 bitrate=N/A throttle=off speed=N/A 01:37:48.989 [q] command received. Exiting. ffmpeg command is not handling this conversion well, at all, for this log. It sees many issues with the media. Perhaps the ffmpeg command needs to be adjusted. Is 1030_2033...ts. a folder with sequential .ts files? If so, then you could try merging all the .ts files together to create a new .mp4 file. There is an issue doing this. Before you run a copy command, the numbers of all the .ts files have to be sequential with '0' prefex to numbers under 1000. For example: You cannot use copy command for files that are seg-1.ts, seg-2.ts... They have to be renamed first to seg-0001.ts, seg-0002.ts. Otherwise, the copy command will not keep the correct order of .ts files. If you have sequential .ts files, I've included a sample batch file that you can replace file names to match your needs. You only need to go up to 999 to arrange the files in the correct order. You have to keep whatever text comes before the number in the file name, so when seg-0999.ts goes to seg-1000.ts. Once you adjust the file to match your media names, you can just copy all the ren commands and paste them into a command window that is in the media folder with all the .ts files. You can then easily merge them all into a new media.mp4 or .mkv file with this command: copy /b *.ts newmedia.mp4 Maybe ffmpeg has the ability to see sequential .ts files when they are numbered seg-1 seg-2... and maybe you just need a better ffmpeg command. I think if you prep all .ts media like this, the transcoding should then work without errors and you may not even need transcoding anymore. If the original codec matches the mp4 standard, you may not even to need any transcoding after you prep the .ts files and copy them all into a single .mp4 file. Again, the renumber example renames all .ts files with the extra '000', '00' or '0' before the number, so you get 0009, 0010... 0099, 0100, etc. This puts the .ts files in correct order when you run the copy command. Just replace the 'seg' and '-cache-address' as needed, for your file names. I hope that makes sense. renumber_000_ts_files.txt Edited January 22, 2023 by visproduction
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now