justdan96 / tsMuxer

tsMuxer is a transport stream muxer for remuxing/muxing elementary streams, EVO/VOB/MPG, MKV/MKA, MP4/MOV, TS, M2TS to TS to M2TS. Supported video codecs H.264/AVC, H.265/HEVC, VC-1, MPEG2. Supported audio codecs AAC, AC3 / E-AC3(DD+), DTS/ DTS-HD.
Apache License 2.0
853 stars 144 forks source link

can't detect lpcm in ts? #580

Closed Randrianasulu closed 2 years ago

Randrianasulu commented 2 years ago

https://cloud.mail.ru/public/jjGj/orJY9VFwM

~18 mb sample I made with (hacked) ffmpeg 4.4 with backported bluray-pcm encoder from ffmpeg git.

May be I did it wrong, but at least mplayer plays it...



tsmuxer complains

tsmuxer bd.m2ts
tsMuxeR version git-631be21. github.com/justdan96/tsMuxer
Track ID:    4113
Stream type: H.264
Stream ID:   V_MPEG4/ISO/AVC
Stream info: Profile: High@4.1  Resolution: 1920:1080p  Frame rate: 24
Stream lang:

Track ID:    4352
Can't detect stream type

Duration: 00:00:11.166

yet mediainfo says:

mediainfo bd.m2ts
General
ID                                       : 1 (0x1)
Complete name                            : bd.m2ts
Format                                   : BDAV
Format/Info                              : Blu-ray Video
File size                                : 16.8 MiB
Duration                                 : 10 s 417 ms
Overall bit rate mode                    : Variable
Overall bit rate                         : 12.1 Mb/s

Video
ID                                       : 4113 (0x1011)
Menu ID                                  : 1 (0x1)
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L4.1
Format settings                          : CABAC / 3 Ref Frames
Format settings, CABAC                   : Yes
Format settings, Reference frames        : 3 frames
Codec ID                                 : 27
Duration                                 : 11 s 250 ms
Bit rate mode                            : Variable
Bit rate                                 : 10 000 kb/s
Maximum bit rate                         : 40.0 Mb/s
Width                                    : 1 920 pixels
Height                                   : 1 080 pixels
Display aspect ratio                     : 16:9
Frame rate                               : 24.000 FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.201
Stream size                              : 13.6 MiB (81%)
Writing library                          : x264 core 164
Encoding settings                        : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=8 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=6 / lookahead_threads=1 / sliced_threads=0 / slices=4 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=1 / constrained_intra=0 / bframes=2 / b_pyramid=1 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=1 / keyint=25 / keyint_min=1 / scenecut=40 / intra_refresh=0 / rc_lookahead=25 / rc=abr / mbtree=1 / bitrate=10000 / ratetol=1.0 / qcomp=0.60 / qpmin=3 / qpmax=33 / qpstep=4 / vbv_maxrate=40000 / vbv_bufsize=30000 / nal_hrd=vbr / filler=0 / ip_ratio=1.40 / aq=1:1.00
Color range                              : Limited
Color primaries                          : BT.709
Transfer characteristics                 : BT.709
Matrix coefficients                      : BT.709

Audio
ID                                       : 4352 (0x1100)
Menu ID                                  : 1 (0x1)
Format                                   : PCM
Format settings                          : Big / Signed
Muxing mode                              : Blu-ray
Codec ID                                 : 128
Duration                                 : 11 s 232 ms
Bit rate mode                            : Constant
Bit rate                                 : 1 536 kb/s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 48.0 kHz
Bit depth                                : 16 bits
Stream size                              : 2.06 MiB (12%)
Language                                 : Russian
jcdr428 commented 2 years ago

@Randrianasulu the lpcm frame size in the first m2ts lpcm header is incorrect: it is 2008 bytes, whereas it shoud be 960. Only the following values are permitted:

image

Randrianasulu commented 2 years ago

fixed in ffmpeg git... sorry, really not your bug

jcdr428 commented 2 years ago

@Randrianasulu so no more issue in tsMuxer with the commit in ffmpeg.git ?

Randrianasulu commented 2 years ago

yeah, it works - tsmuxer recognizes stream and xine can play (renamed) iso...

On Sunday, April 24, 2022, jcdr428 @.***> wrote:

@Randrianasulu https://github.com/Randrianasulu so no more issue in tsMuxer with the commit in ffmpeg.git ?

— Reply to this email directly, view it on GitHub https://github.com/justdan96/tsMuxer/issues/580#issuecomment-1107863683, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJSS7TOV4FMCJAYNN5INIYLVGVLCBANCNFSM5UF6NKTQ . You are receiving this because you were mentioned.Message ID: @.***>

Randrianasulu commented 2 years ago

interesting enough encoding sample with ffmpeg git result in same overflow....

sample:

wget -c http://streams.videolan.org/issues/8526/00064.m2ts

ffmpeg command

/home/guest/ffmpeg/ffmpeg -i 00064.m2ts -c:v copy -c:a pcm_bluray -mpegts_m2ts_mode 1 00064-1.m2ts

On Friday, April 29, 2022, Valerii Zapodovnikov @.***> wrote:

See @.*** https://github.com/FFmpeg/FFmpeg/commit/058a1ff9b4cdbd2e1a93acc8bf0365e7d01cc9f4

— Reply to this email directly, view it on GitHub https://github.com/justdan96/tsMuxer/issues/580#issuecomment-1112747654, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJSS7TMMFO4HEGPORGJTIE3VHMOB5ANCNFSM5UF6NKTQ . You are receiving this because you were mentioned.Message ID: @.***>