bluenviron / mediamtx

Ready-to-use SRT / WebRTC / RTSP / RTMP / LL-HLS media server and media proxy that allows to read, publish, proxy, record and playback video and audio streams.
MIT License
10.79k stars 1.4k forks source link

record mpegts bad files #3206

Closed pikachu937 closed 1 month ago

pikachu937 commented 3 months ago

Which version are you using?

v1.1.0 and later

Which operating system are you using?

Describe the issue

An incorrect file is generated when recording in mpegts format(record server function). There is no way to play it in chrome/safari/ quick time player. However, if you take a file in mpegts format generated by the hls server, everything plays perfectly.

Describe how to replicate the issue

  1. enable the HLS server in the configuration file and allow it to save segments in mpegts format to a folder.
  2. enable saving of published streams in the configuration file.
  3. start the server
  4. publish with rtsp any stream
  5. read with HLS the published stream
  6. copy files generated by the hls server and make playlist1 in m3u8 format
  7. copy files generated by the server's built-in recording function and make playlist2 in m3u8 format
  8. play received playlists via chrome/safari
  9. copy files generated by the hls server and play mpegts files in quick time player
  10. copy files generated by the server's built-in recording function and play mpegts files in quick time player

Did you attach the server logs?

yes / no

Did you attach a network dump?

yes / no GOOD FILES GENERATED HLS SERVER 408608627_good_ts.tar.gz BAD FILES GENERATED RECORD FUNCTION 408608627_bad_ts.tar.gz

pikachu937 commented 2 months ago

UPD. I rechecked the playlist generation in my service and found an error. I apologize for misleading you.

However, one of the problems still remains: the files ts generated by the server's built-in recording function cannot be read by the native player(Quick Time Player) in iOS/MacOS.

aler9 commented 1 month ago

Thanks for reporting the QuickTime compatibility issue with recording segments, this is fixed by https://github.com/bluenviron/mediacommon/pull/131

moenodedev commented 1 month ago

Could fix #3350 and #3313

aler9 commented 1 month ago

@moenodedev absolutely yes, but I don't want to examine issues that do not follow rules (for instance reporting two problems at once or not attaching any useful info), otherwise I would go crazy.

moenodedev commented 1 month ago

Thanks for all your work. It's a game changer for my organization