shaka-project / shaka-packager

A media packaging and development framework for VOD and Live DASH and HLS applications, supporting Common Encryption for Widevine and other DRM Systems.
https://shaka-project.github.io/shaka-packager/
Other
1.98k stars 507 forks source link

Does the audio format of shsaka packager eac3 support it? #1036

Closed jbuduoo closed 2 years ago

jbuduoo commented 2 years ago

System info

Operating System:Rocky-8.4-x86_64 Shaka Packager Version: v2.6.1

Issue and steps to reproduce the problem

Situation 1. I use ffprobe to view the content of udp, and I see three streams. When I use packager -dump_stream_info, I only see one stream.

/opt/asorigin/web/bin/ffprobe 'udp://224.1.1.1:5002'

Input #0, mpegts, from 'udp://224.1.1.1:5002':
  Duration: N/A, start: 49.824100, bitrate: N/A
  Program 1 
    Stream #0:0[0x44]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(tv, bt470bg, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
    Stream #0:1[0x32](zho): Audio: eac3 (EAC3 / 0x33434145), 48000 Hz, stereo, fltp, 128 kb/s
    Stream #0:2[0x33](eng): Audio: eac3 (EAC3 / 0x33434145), 48000 Hz, stereo, fltp, 128 kb/s

/opt/asorigin/web/bin/packager 'in=udp://224.1.1.1:5002?reuse=1' --dump_stream_info

[root@localhost ~]# /opt/asorigin/web/bin/packager 'in=udp://224.1.1.1:5002?reuse=1' --dump_stream_info
[0603/121404:INFO:demuxer.cc(89)] Demuxer::Run() on file 'udp://224.1.1.1:5002?reuse=1'.
[0603/121404:INFO:demuxer.cc(155)] Initialize Demuxer for file 'udp://224.1.1.1:5002?reuse=1'.
[0603/121404:ERROR:mp2t_media_parser.cc(319)] Ignore unsupported MPEG2TS stream type 0x87

File "udp://224.1.1.1:5002?reuse=1":
Found 1 stream(s).
Stream [0] type: Video
 codec_string: avc1.4d4028
 time_scale: 90000
 duration: Infinite
 is_encrypted: false
 codec: H264
 width: 1920
 height: 1080
 pixel_aspect_ratio: 1:1
 trick_play_factor: 0
 nalu_length_size: 4

Packaging completed successfully.

Condition 2. Transfer files directly, it will appear「 Ignore unsupported MPEG2TS stream type 0x87」 /opt/asorigin/web/bin/packager \ 'in=/opt/mv/eac3.ts,stream=0,output=/opt/asorigin/content/vod/nfs/s05/video/video_init.mp4'

[0603/172334:INFO:demuxer.cc(89)] Demuxer::Run() on file '/opt/mv/eac3.ts'.
[0603/172334:INFO:demuxer.cc(155)] Initialize Demuxer for file '/opt/mv/eac3.ts'.
[0603/172334:ERROR:mp2t_media_parser.cc(319)] Ignore unsupported MPEG2TS stream type 0x87
[0603/172334:WARNING:es_parser_h26x.cc(334)] [MPEG-2 TS] PID 68 Possible GAP at dts 719632 with next sample at dts 722635 (difference 3003)
[0603/172336:INFO:single_segment_segmenter.cc(111)] Update media header (moov) and rewrite the file to '/opt/asorigin/content/vod/nfs/s05/video/video_init.mp4'.
[0603/172337:INFO:mp4_muxer.cc(186)] MP4 file '/opt/asorigin/content/vod/nfs/s05/video/video_init.mp4' finalized.
Packaging completed successfully.

Condition 3. But I see that the file shows that it can be output.

question:

  1. I would like to know that shaka packager, mpeg2-ts support output format is EAC3, but that is, do I want to use iso-bmff format for input?
  2. How to generate data in iso-bmff format?
  3. Does mpeg2-ts currently support input?
kqyang commented 2 years ago

I would like to know that shaka packager, mpeg2-ts support output format is EAC3, but that is, do I want to use iso-bmff format for input?

Yes, the only supported input format for now is ISO-BMFF.

How to generate data in iso-bmff format?

You can use FFmpeg to transmux your input to iso-bmff format.

Does mpeg2-ts currently support input?

Yes, but not with EAC3 yet. If you are interested in helping the project, you are welcome to work on it and submit a PR to us.