In the diploma C ++ project, you need to work with MPEG transport stream video files ( * .ts format), namely: you need to get blocks of files of a sufficiently long length from the file (no more than 53840 bits per block), and after certain manipulations, write new blocks into a new *. ts file. I want to do without special libraries like OpenCV.

I already understood that working with non-text files is not fundamentally different from working with text files, but a couple of questions remained unclear:

  • How should I open the file?
  • How should read / write data be organized?
  • 53840 bits is only 6.7kb. I wonder how this can be "long enough". - Kromster
  • one
    Here you should refer to the format description. In it you will find answers to most of your questions. However, IMHO, it makes no sense to abandon the finished libraries, if the problem can be solved with their help, no. Of course, if we are not talking about the development of its specialized library or academic interest. - Streletz
  • @Streletz is just about academic interest. At the moment the project contains only standard libraries, and I would not like to attract a gun to shoot a sparrow. I am interested in the principle of reading some non-text file: * .ts may be in place of * .avi or * .bmp - Ruslan Hercules
  • The principle is usually the same. Byte reading However, you need to understand that the data in a file of a certain format is also stored in a strictly defined manner. Therefore, without a description of the format, correct work with such a file is unlikely to succeed. Rather the opposite. - Streletz
  • I will add. If you refuse standard libraries, you will have to implement all the necessary operations with it yourself. Therefore, it is not known what is better to “attract” a gun ”or“ reinvent the wheel. ”Otherwise, since the project is based on academic interest, the principle of technological expediency in this particular case can be to some extent neglected. - Streletz

0