Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DVBSUB tests #903

Closed
cooliobr opened this issue Feb 19, 2021 · 32 comments
Closed

DVBSUB tests #903

cooliobr opened this issue Feb 19, 2021 · 32 comments
Labels
type: bug Something isn't working correctly

Comments

@cooliobr
Copy link

System info

Ubuntu 16.04
shaka-packager version 025e10d-release

about dvbsub, which player can I test? I’ve already tested Shaka Player and Exoplayer, neither of them showed subtitles

#!/bin/bash
CONTENT_ID=echo $1 | tr -d '\n' | xxd -p
PWD=/usr/local/nginx/html/live/$1
rm $PWD/*
/usr/local/src/shaka_packager/src/out/Release/packager
'in=udp://127.0.0.2:1234?reuse=1,stream=text,skip_encryption=1,format=ttml+mp4,init_segment=text_init.mp4,segment_template=text_$Number$.'$2',playlist_name=text.m3u8'
'in=udp://127.0.0.2:1234?reuse=1,stream=0,skip_encryption=1,init_segment=audio_init_0.mp4,segment_template=audio_0_$Number$.m4s,hls_name=POR,playlist_name=audio0.m3u8'
'in=udp://127.0.0.2:1234?reuse=1,stream=1,skip_encryption=1,init_segment=audio_init_1.mp4,segment_template=audio_1_$Number$.m4s,hls_name=EN,playlist_name=audio1.m3u8'
'in=udp://127.0.0.2:1237?reuse=1,stream=video,init_segment=720p_init.mp4,segment_template=720p_$Number$.m4s,playlist_name=720p.m3u8'
'in=udp://127.0.0.2:1235?reuse=1,stream=video,init_segment=360p_init.mp4,segment_template=360p_$Number$.m4s,playlist_name=360p.m3u8'
'in=udp://127.0.0.2:1234?reuse=1,stream=video,init_segment=180p_init.mp4,segment_template=180p_$Number$.m4s,playlist_name=180p.m3u8'
--hls_master_playlist_output playlist.m3u8
--hls_playlist_type LIVE
--default_language por
--default_text_language por
--time_shift_buffer_depth 60
--enable_widevine_encryption
--key_server_url https://license.uat.widevine.com/cenc/getcontentkey/widevine_test
--content_id $CONTENT_ID
--signer widevine_test
--aes_signing_key 1ae8ccd0e7985cc0b6203a55855a1034afc252980e970ca90e5202689f947ab9
--aes_signing_iv d58ce954203b7c9a9a9d467f59839249
--protection_systems Widevine >> $PWD/$1.log 2>&1 &

output

#EXTM3U

Generated with https://github.com/google/shaka-packager version 025e10d-release

#EXT-X-INDEPENDENT-SEGMENTS

#EXT-X-MEDIA:TYPE=AUDIO,URI="audio0.m3u8",GROUP-ID="default-audio-group",NAME="POR",AUTOSELECT=YES,CHANNELS="2"
#EXT-X-MEDIA:TYPE=AUDIO,URI="audio1.m3u8",GROUP-ID="default-audio-group",NAME="EN",CHANNELS="2"

#EXT-X-MEDIA:TYPE=SUBTITLES,URI="text.m3u8",GROUP-ID="default-text-group",NAME="stream_2",AUTOSELECT=YES

#EXT-X-STREAM-INF:BANDWIDTH=613945,AVERAGE-BANDWIDTH=574088,CODECS="avc1.4d401e,mp4a.40.2,ttml",RESOLUTION=640x360,FRAME-RATE=29.970,AUDIO="default-audio-group",SUBTITLES="default-text-group"
360p.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=3121216,AVERAGE-BANDWIDTH=2922061,CODECS="avc1.4d401f,mp4a.40.2,ttml",RESOLUTION=1280x720,FRAME-RATE=29.970,AUDIO="default-audio-group",SUBTITLES="default-text-group"
720p.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=754066,AVERAGE-BANDWIDTH=707786,CODECS="avc1.4d400d,mp4a.40.2,ttml",RESOLUTION=320x180,FRAME-RATE=29.970,AUDIO="default-audio-group",SUBTITLES="default-text-group"
180p.m3u8

@jakubvojacek
Copy link

Sorry @cooliobr for hijacking but I might be having the same issue (only I am using dash, not hls)

I also attempted to test dvbsubs using lastest master for live streams and failed. While packager did not complain of any error, it didnt create the init segment nor the directory (according to the segment_template), also, the track was not mentioned in the generated MPD.

Is this supposed to work for live?

Input #0, mpegts, from 'udp://239.0.1.10:1238?':
  Duration: N/A, start: 317.901333, bitrate: N/A
  Program 1 
    Metadata:
      service_name    : Service01
      service_provider: FFmpeg
    Stream #0:0[0x100]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(progressive), 640x360 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1[0x101]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(progressive), 960x540 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:2[0x102]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:3[0x103](cze): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 116 kb/s
    Stream #0:4[0x104](cze): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006) (hearing impaired)
/root/shaka_packager/src/out/Release/packager -v 10  'in=udp://239.0.1.10:1238?reuse=1&buffer_size=25000000,stream=0,bandwidth=400000,init_segment=channel-10_video_0.mp4,segment_template=video_0/channel-10-$Number$.mp4' 'in=udp://239.0.1.10:1238?reuse=1&buffer_size=25000000,stream=1,bandwidth=1000000,init_segment=channel-10_video_1.mp4,segment_template=video_1/channel-10-$Number$.mp4' 'in=udp://239.0.1.10:1238?reuse=1&buffer_size=25000000,stream=2,bandwidth=2500000,init_segment=channel-10_video_2.mp4,segment_template=video_2/channel-10-$Number$.mp4' 'in=udp://239.0.1.10:1238?reuse=1&buffer_size=25000000,stream=3,bandwidth=128000,language=cze, init_segment=channel-10_audio_cze_stereo.mp4,segment_template=audio_cze_stereo/audio_cze_stereo-$Number$.mp4' 'in=udp://224.0.120.1:1238?reuse=1&buffer_size=25000000,stream=text,cc_index=2,language=cze,init_segment=channel-10_subtitle_init_cze.mp4,segment_template=subtitle_cze/ttv_$Number$.mp4,language=cze' --time_shift_buffer_depth 15000 \
--mpd_output channel-10.mpd

Thank you

@kqyang
Copy link
Collaborator

kqyang commented Feb 23, 2021

Looks like there are two separate problems.

@jakubvojacek Can you try if you can capture the source stream and re-produce the problem using the captured stream? It can help us debug the issue. Can you also file a separate issue instead?

For the problem posted by @cooliobr, @TheModMaker Do you know if Shaka Player supports ttml in mp4 with image?

@cooliobr
Copy link
Author

I thing the better way is keep dvbsub track inside of audio track like i do it with ffmpeg, i encrypt only VIDEO, AUDIO and SUB i keep without encryption exoplayer and some web player can be used.
https://github.com/cooliobr/encoder_enc.sh/blob/main/encode_enc.sh

@TheModMaker
Copy link
Contributor

The problem with keeping the DVB data in the audio track is that it isn't supported by many (or any) web players. Shaka Player definitely doesn't and others probably don't either. Also, there is no standard for indicating the DVB subtitles are present in either DASH or HLS; there is an indicator for CEA though. So a more cross-player way to allow playback on more players is to convert to a more supported format like TTML.

I just tested again with TTML+MP4 and it works fine for me with VOD in Shaka Player. It's possible Live could cause problems with timestamps. The input could be not synchronized, or we may be mis-handling the timestamps, or Shaka Player might be. If you could provide a reproducible sample to test with, that would help.

@cooliobr
Copy link
Author

cooliobr commented Feb 24, 2021

This is a live transmission with new packager
http://200.194.238.228:2086/live/NNSSCC/playlist.m3u8

if need a live source i can provide.

The problem with keeping the DVB data in the audio track is that it isn't supported by many (or any) web players. Shaka Player definitely doesn't and others probably don't either. Also, there is no standard for indicating the DVB subtitles are present in either DASH or HLS; there is an indicator for CEA though. So a more cross-player way to allow playback on more players is to convert to a more supported format like TTML.

I just tested again with TTML+MP4 and it works fine for me with VOD in Shaka Player. It's possible Live could cause problems with timestamps. The input could be not synchronized, or we may be mis-handling the timestamps, or Shaka Player might be. If you could provide a reproducible sample to test with, that would help.

@TheModMaker
Copy link
Contributor

So there are a few bugs here. First, we are inserting ttml to the CODECS string, which is invalid. After I fix that, there are two competing Shaka Player bugs. I could drop the codec entry altogether, but then Shaka Player won't know whether it is TTML or WebVTT (shaka-project/shaka-player#1959). On the other hand, I could add the correct codec string, but the I see it as unsupported (shaka-project/shaka-player#3184, although it works with your content, so it may just be single-stream not working).

I'll make a patch to fix our generation, but using fMP4 might have some problems in Shaka Player.

shaka-bot pushed a commit that referenced this issue Feb 26, 2021
Issue #903

Change-Id: I1f73d16ad79c2593996d7d50f9556984302fe21e
@Canta
Copy link
Contributor

Canta commented Mar 2, 2021

I'm trying to test the new DVBSUB functionality, without success. I believe I better put here my case instead of creating another ticket.

Here's my setup:

  • Fresh, locally compiled today shaka packager from master branch, using debug version for extra output.
  • Using the following file as input: https://cs1.ssltrust.me/s/vR791a3ebbJio49 (workplace warning: subtitles contains adult language)
  • Using the following command (mostly taken from cooliobr's example):
packager \
'in=file3.ts,stream=0,init_segment=1080p_init.mp4,segment_template=1080p_$Number$.m4s,playlist_name=1080p.m3u8' \
'in=file3.ts,stream=1,skip_encryption=1,init_segment=audio_init_0.mp4,segment_template=audio_0_$Number$.m4s,hls_name=POL,playlist_name=audio0.m3u8' \
'in=file3.ts,stream=2,skip_encryption=1,init_segment=audio_init_1.mp4,segment_template=audio_1_$Number$.m4s,hls_name=EN,playlist_name=audio1.m3u8' \
'in=file3.ts,stream=3,skip_encryption=1,format=ttml+mp4,init_segment=text_init.mp4,segment_template=text_$Number$.mp4,playlist_name=text.m3u8' \
--hls_master_playlist_output playlist.m3u8 \
--hls_playlist_type LIVE \
--default_language pol \
--default_text_language pol \
--time_shift_buffer_depth 60

Here's the output I get:

[0302/181526:INFO:demuxer.cc(89)] Demuxer::Run() on file 'file3.ts'.
[0302/181526:INFO:demuxer.cc(155)] Initialize Demuxer for file 'file3.ts'.
[0302/181526:FATAL:bit_writer.cc(18)] Check failed: bits < 1ULL << number_of_bits (33 vs. 32)
#0 0x0000004a07ee base::debug::StackTrace::StackTrace()
#1 0x00000044a4cf logging::LogMessage::~LogMessage()
#2 0x000000f9ea56 shaka::media::BitWriter::WriteBits()
#3 0x000000d72ee6 shaka::media::mp2t::Mpeg1Header::GetAudioSpecificConfig()
#4 0x000000d55d4a shaka::media::mp2t::EsParserAudio::UpdateAudioConfiguration()
#5 0x000000d5558f shaka::media::mp2t::EsParserAudio::Parse()
#6 0x000000d4c636 shaka::media::mp2t::TsSectionPes::ParseInternal()
#7 0x000000d4a433 shaka::media::mp2t::TsSectionPes::Emit()
#8 0x000000d4a261 shaka::media::mp2t::TsSectionPes::Parse()
#9 0x000000d32b35 shaka::media::mp2t::PidState::PushTsPacket()
#10 0x000000d3475b shaka::media::mp2t::Mp2tMediaParser::Parse()
#11 0x000000d23a78 shaka::media::Demuxer::InitializeParser()
#12 0x000000d22875 shaka::media::Demuxer::Run()
#13 0x000000682f1c shaka::media::Job::Run()
#14 0x000000586cd9 base::SimpleThread::ThreadMain()
#15 0x00000048660a base::(anonymous namespace)::ThreadFunc()
#16 0x7ff052cdb609 start_thread
#17 0x7ff052c02293 clone

Aborted (core dumped)

Same happens when I try using ffmpeg as udp live stream server as packager input.
Not sure what that bits < 1ULL << number_of_bits (33 vs. 32).

I got that file looking for dvb_subtitles examples online.
Does anybody have a working sample file?

@kqyang
Copy link
Collaborator

kqyang commented Mar 3, 2021

@Canta That is actually a different problem. Your problem is caused by the incorrect handling of MPEG-1 audio. Can you file a separate bug instead?

@Canta
Copy link
Contributor

Canta commented Mar 5, 2021

I've created a second file, downloadable from here: https://cs1.ssltrust.me/s/a6FDjGNf4OXtFRk
(As before, please be careful in your workplace as this file contains adult language in the captions).

Shaka packager is able to do its work using this file. Here's the command I've used:

packager \
'in=file4.ts,stream=0,init_segment=1080p_init.mp4,segment_template=1080p_$Number$.m4s,playlist_name=1080p.m3u8' \
'in=file4.ts,stream=1,skip_encryption=1,init_segment=audio_init.mp4,segment_template=audio_$Number$.m4s,hls_name=POL,playlist_name=audio.m3u8' \
'in=file4.ts,stream=2,skip_encryption=1,format=ttml+mp4,init_segment=text_init.mp4,segment_template=text_$Number$.mp4,playlist_name=text.m3u8' \
--hls_master_playlist_output playlist.m3u8

However, this is how it later looks in shaka player:
how it looks in shaka player

Most likely the dvbsub functionality still needs some work, yet I suspect there may be ways for preparing our input files so shaka packager handles them well. With that in mind: do anybody have any example test file we could use as reference for dvbsubs with shaka packager?

@kqyang
Copy link
Collaborator

kqyang commented Mar 5, 2021

@Canta Thanks for the update. As mentioned by @TheModMaker in #903 (comment), Shaka Player has problems handling TTML with HLS right now. You may follow the link shared by @TheModMaker to see the details. To test the playback, you may package the output to DASH, which should be properly supported in Shaka Player right now.

@Canta
Copy link
Contributor

Canta commented Mar 5, 2021

@kqyang
I've tested dash output, following your advice, using the following command:

packager \
'in=file4.ts,stream=0,init_segment=1080p_init.mp4,segment_template=1080p_$Number$.m4s' \
'in=file4.ts,stream=1,skip_encryption=1,init_segment=audio_init.mp4,segment_template=audio_$Number$.m4s,language=POL' \
'in=file4.ts,stream=2,skip_encryption=1,format=ttml+mp4,init_segment=text_init.mp4,segment_template=text_$Number$.mp4,language=ENG' \
--mpd_output test.mpd

Shaka player later behaves the same:
example dash

You can test the command with the provided file4.ts from the link in my previous comment. If packager+player should work well when using dash, then I guess the problem is in my input file. Here are some details about it:

$ ffprobe file4.ts
ffprobe version 4.2.4-1ubuntu0.1 Copyright (c) 2007-2020 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.3.0-10ubuntu2)
  configuration: --prefix=/usr --extra-version=1ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
[mpegts @ 0x55dd22d04f00] start time for stream 2 is not set in estimate_timings_from_pts
Input #0, mpegts, from 'file4.ts':
  Duration: 00:00:51.58, start: 1.400000, bitrate: 6047 kb/s
  Program 1 
    Metadata:
      service_name    : Service01
      service_provider: FFmpeg
    Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1[0x101](pol): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 133 kb/s
    Stream #0:2[0x102](eng): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)

@kqyang
Copy link
Collaborator

kqyang commented Mar 5, 2021

@TheModMaker What do you think?

@TheModMaker
Copy link
Contributor

What is probably happening is either we are misinterpreting the background color or your content has that as the color. For the size, we use the viewport size to determine what the video size is and scale as a percentage of that. We may be using that wrong or your content may not set that properly. I'll take a look on Monday.

For sample content, I used https://www.ccextractor.org/public:general:tvsamples. Some of the content didn't play because it is interlaced or the MPEG-1 errors above. The ccextractor_bugs_allcaps_29fps_leftjustify.m2ts file is what I used to test and it worked perfectly.

@TheModMaker
Copy link
Contributor

This is working as intended. Please try with the latest master for Shaka Player, I think the size issue may be caused by a bug in Shaka Player. The background is correct, the subtitles say the background fill with that color and the color is correct.

@Canta
Copy link
Contributor

Canta commented Mar 9, 2021

You're right, nightly shaka player does not break the font size or positioning.
image

@cooliobr
Copy link
Author

You're right, nightly shaka player does not break the font size or positioning.
image

Canta, you have a sample of this player? I make some tests but not working , may my player is problem

@Canta
Copy link
Contributor

Canta commented Mar 11, 2021

Oh, I was just using shaka player's demo app, in its nightly version:
https://nightly-dot-shaka-player-demo.appspot.com

You can pick other versions to test, here:
https://index-dot-shaka-player-demo.appspot.com/#

@kepppis
Copy link

kepppis commented Mar 21, 2021

I also tested the packager with nightly version of the player and subtitles worked fine exept that green background colour on subtitles where background should be totally transparent and not visible. Is there any other player supporting these subtitles to confirm whether the problem is in the packager or player ?

@kqyang
Copy link
Collaborator

kqyang commented Mar 22, 2021

@kepppis Can you provide the source content and the packaged contents? We can triage and figure out where the problem could be.

@kepppis
Copy link

kepppis commented Mar 22, 2021

Sure, I try to prepare the samples tomorrow. With another source (YLE in Finland) I run into following error

[0322/224656:ERROR:dvb_image.cc(215)] DVB-sub image cannot fit in region/window

Is it to send the samples in email as the content is copyrighted ?

@kqyang
Copy link
Collaborator

kqyang commented Mar 22, 2021

Yes, you can send the samples to shaka-packager-issues@google.com if they cannot be shared publicly.

@cooliobr
Copy link
Author

cooliobr commented Mar 24, 2021

Hi guys, thanks for all support
this is final player
https://playout.regs.com.br/media/shaka-player/player/?SOURCE=TNTS_WV

i faced with same problem in subtitle with green background but this problem appears only in one of my script.

stream_sub_enc.sh.txt
stream_sub_enc.sh_nok.txt

@kqyang
Copy link
Collaborator

kqyang commented Mar 25, 2021

Thanks @kepppis for the samples. And thanks @cooliobr for confirming the problem. The fix for the green background will be pushed next week.

@kqyang kqyang added the type: bug Something isn't working correctly label Mar 29, 2021
@kqyang
Copy link
Collaborator

kqyang commented Mar 29, 2021

@kepppis @cooliobr The background problem should be fixed with the latest commit. Let us know if you are still seeing problems.

@cooliobr
Copy link
Author

@kepppis @cooliobr The background problem should be fixed with the latest commit. Let us know if you are still seeing problems.

Hi, thnks for update, i will test it tomorrow.

@kepppis
Copy link

kepppis commented Mar 30, 2021

I can confirm now that the background problem is fixed. The other issue where the package stops with error
[0322/224656:ERROR:dvb_image.cc(215)] DVB-sub image cannot fit in region/window is still there. It can be reproduced with the other sample I sent you.

@cooliobr
Copy link
Author

cooliobr commented Mar 30, 2021 via email

@kqyang kqyang reopened this Mar 30, 2021
@shaka-bot shaka-bot added this to the v2.5 milestone Mar 30, 2021
@cooliobr
Copy link
Author

cooliobr commented Jun 9, 2021

Hi guys,
Again with HBO... i receive this log in packager
file to test http://200.194.238.229:8383/HBO.ts

[0609/175007:INFO:demuxer.cc(89)] Demuxer::Run() on file 'udp://234.0.0.93:1234?reuse=1&buffer_size=8580000&timeout=3000000'.
[0609/175007:INFO:demuxer.cc(89)] Demuxer::Run() on file 'udp://234.0.0.93:1235?reuse=1&buffer_size=8580000&timeout=3000000'.
[0609/175007:INFO:demuxer.cc(155)] Initialize Demuxer for file 'udp://234.0.0.93:1234?reuse=1&buffer_size=8580000&timeout=3000000'.
[0609/175007:INFO:demuxer.cc(155)] Initialize Demuxer for file 'udp://234.0.0.93:1235?reuse=1&buffer_size=8580000&timeout=3000000'.
[0609/175007:INFO:demuxer.cc(89)] Demuxer::Run() on file 'udp://234.0.0.93:1236?reuse=1&buffer_size=8580000&timeout=3000000'.
[0609/175007:INFO:demuxer.cc(155)] Initialize Demuxer for file 'udp://234.0.0.93:1236?reuse=1&buffer_size=8580000&timeout=3000000'.
[0609/175007:ERROR:subtitle_composer.cc(133)] DVB-sub region won't fit within display
[0609/175007:ERROR:mp2t_media_parser.cc(117)] Parsing failed for pid = 259, type=4
[0609/175008:ERROR:subtitle_composer.cc(133)] DVB-sub region won't fit within display
[0609/175008:ERROR:mp2t_media_parser.cc(117)] Parsing failed for pid = 259, type=4
[0609/175008:ERROR:subtitle_composer.cc(133)] DVB-sub region won't fit within display
[0609/175008:ERROR:mp2t_media_parser.cc(117)] Parsing failed for pid = 259, type=4
[0609/175008:ERROR:packager_main.cc(551)] Packaging Error: 8 (PARSER_FAILURE): Cannot parse media file udp://234.0.0.93:1236?reuse=1&buffer_size=8580000&timeout=3000000

@kqyang kqyang modified the milestones: v2.5, v2.6 Jun 11, 2021
@joeyparrish joeyparrish modified the milestones: v2.6, Backlog Jun 24, 2022
@nrmmota
Copy link

nrmmota commented Jul 20, 2022

I'm adding one more test with a different sample.
file4 worked fine for me, without the background.

However, a sample from the Kika channel turns out a bit choppy now and then. I was only able to make it work (both file4 and this sample) using ttml as the segment template.
image

I used this test tool to test the stream (streamed locally from my PC)
https://stackblitz.com/edit/shaka-ui-test-wtjdrg

Original file, kika.ts played on VLC
image

How to package
Packager version: packager-linux-x64 version v2.6.1-634af65-release
../packager-linux-x64
in=kika_video.ts,stream=video,init_segment=kika/video_init.mp4,segment_template='kika/1080p_$Number$.m4s'
in=kika_audio.ts,stream=audio,skip_encryption=1,init_segment=kika/audio_init1.mp4,segment_template='kika/audio1_$Number$.m4s',language=DEU
in=kika_dvbsub.ts,stream=text,language=deu,segment_template='kika/text_$Number$.ttml',dash_only=1
--strip_parameter_set_nalus=false
--generate_static_live_mpd
--mpd_output kika.mpd

I also had to previous demux both streams as the packager failed to demux properly. Another bug.

Input #0, mpegts, from 'kika.ts':
Duration: 00:03:42.08, start: 22464.105256, bitrate: 15516 kb/s
Program 11160
Metadata:
service_name : KiKA HD
service_provider: ZDFvision
Stream #0:0[0x19d2]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709, progressive), 1280x720 [SAR 1:1 DAR 16:9], 50 fps, 50 tbr, 90k tbn, 100 tbc
Stream #0:10x19dc: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fltp, 256 kb/s
Stream #0:20x19dd: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fltp, 192 kb/s (visual impaired) (descriptions)
Stream #0:30x19de: Audio: ac3 ([6][0][0][0] / 0x0006), 48000 Hz, stereo, fltp, 448 kb/s
Stream #0:40x19e6: Subtitle: dvb_teletext ([6][0][0][0] / 0x0006), 492x250
Stream #0:50x19e7: Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006) (hearing impaired)

ffmpeg -i kika.ts -map 0:0 -vcodec copy -muxdelay 0 -copyts kika_video.ts
ffmpeg -i kika.ts -map 0:3 -acodec copy -muxdelay -0.2 -copyts kika_audio.ts
ffmpeg -i kika.ts -map 0:5 -scodec copy -muxdelay -0.2 -copyts kika_dvbsub.ts

@Brainiarc7
Copy link
Contributor

Hi guys, Again with HBO... i receive this log in packager file to test http://200.194.238.229:8383/HBO.ts

[0609/175007:INFO:demuxer.cc(89)] Demuxer::Run() on file 'udp://234.0.0.93:1234?reuse=1&buffer_size=8580000&timeout=3000000'.
[0609/175007:INFO:demuxer.cc(89)] Demuxer::Run() on file 'udp://234.0.0.93:1235?reuse=1&buffer_size=8580000&timeout=3000000'.
[0609/175007:INFO:demuxer.cc(155)] Initialize Demuxer for file 'udp://234.0.0.93:1234?reuse=1&buffer_size=8580000&timeout=3000000'.
[0609/175007:INFO:demuxer.cc(155)] Initialize Demuxer for file 'udp://234.0.0.93:1235?reuse=1&buffer_size=8580000&timeout=3000000'.
[0609/175007:INFO:demuxer.cc(89)] Demuxer::Run() on file 'udp://234.0.0.93:1236?reuse=1&buffer_size=8580000&timeout=3000000'.
[0609/175007:INFO:demuxer.cc(155)] Initialize Demuxer for file 'udp://234.0.0.93:1236?reuse=1&buffer_size=8580000&timeout=3000000'.
[0609/175007:ERROR:subtitle_composer.cc(133)] DVB-sub region won't fit within display
[0609/175007:ERROR:mp2t_media_parser.cc(117)] Parsing failed for pid = 259, type=4
[0609/175008:ERROR:subtitle_composer.cc(133)] DVB-sub region won't fit within display
[0609/175008:ERROR:mp2t_media_parser.cc(117)] Parsing failed for pid = 259, type=4
[0609/175008:ERROR:subtitle_composer.cc(133)] DVB-sub region won't fit within display
[0609/175008:ERROR:mp2t_media_parser.cc(117)] Parsing failed for pid = 259, type=4
[0609/175008:ERROR:packager_main.cc(551)] Packaging Error: 8 (PARSER_FAILURE): Cannot parse media file udp://234.0.0.93:1236?reuse=1&buffer_size=8580000&timeout=3000000

Same issue over here, regardless of the -canvas_size setting in ffmpeg.
Truly, truly frustrating!

@Brainiarc7
Copy link
Contributor

@TheModMaker @joeyparrish any pointers?

@cosmin
Copy link
Collaborator

cosmin commented Apr 29, 2024

It sounds like the original issue was addressed and any remaining outstanding issues are covered by #1195 so going to close this one and continue that work there

@cosmin cosmin closed this as completed Apr 29, 2024
@cosmin cosmin removed this from the Backlog milestone May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working correctly
Projects
None yet
Development

No branches or pull requests