GithubHelp home page GithubHelp logo

skullanbones / mpeg2ts Goto Github PK

View Code? Open in Web Editor NEW
71.0 4.0 6.0 28.41 MB

A fast, cross-platform and modern C++ SDK for all your MPEG-2 transport stream media format needs following international specification ISO/IEC 13818-1.

License: Other

CMake 12.71% Makefile 0.63% C++ 73.16% Python 5.40% Shell 1.26% Batchfile 0.28% JavaScript 2.93% HTML 0.47% CSS 0.15% Dockerfile 2.77% C 0.25%
mpeg mpeg2 h264 mpegts mpeg-transport-streams streaming dvb-ip dvb hls ip-tv

mpeg2ts's People

Contributors

heliconwave avatar kohnech avatar lnwhome avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

mpeg2ts's Issues

Fix macos build googletest requires C++ 11

There is an "ugly hack" in 3rd-party/CMakeLists.txt for APPLE to build googletest with :

if (APPLE)
    set(CMAKE_CXX_STANDARD 11)
endif(APPLE)

This should be done in a better way

Linking failure on recent shared library build

Creating library C:/MySpace/Projects/mpeg2ts/build_dll/libs/mpeg2ts/Debug/mpeg2ts-d.lib and object C:/MySpace/Proj

ects/mpeg2ts/build_dll/libs/mpeg2ts/Debug/mpeg2ts-d.exp
mpeg2ts.vcxproj -> C:\MySpace\Projects\mpeg2ts\build_dll\libs\mpeg2ts\Debug\mpeg2ts-d.dll
Building Custom Rule C:/MySpace/Projects/mpeg2ts/samples/TsUtilities/CMakeLists.txt
main.cpp
LINK : fatal error LNK1104: cannot open file '....\libs\mpeg2codec\Debug\mpeg2codec-d.lib' [C:\MySpace\Projects\mpeg2t
s\build_dll\samples\TsUtilities\sample_tsutilities.vcxproj]

Manually copy the library

PS C:\MySpace\Projects\mpeg2ts\build_dll> cmake --build .
Microsoft (R) Build Engine version 17.2.1+52cd2da31 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

common.vcxproj -> C:\MySpace\Projects\mpeg2ts\build_dll\libs\common\Debug\common-d.lib
h264codec.vcxproj -> C:\MySpace\Projects\mpeg2ts\build_dll\libs\h264codec\Debug\h264codec-d.dll
mpeg2codec.vcxproj -> C:\MySpace\Projects\mpeg2ts\build_dll\libs\mpeg2codec\Debug\mpeg2codec-d.dll
mpeg2ts.vcxproj -> C:\MySpace\Projects\mpeg2ts\build_dll\libs\mpeg2ts\Debug\mpeg2ts-d.dll
LINK : fatal error LNK1104: cannot open file '....\libs\mpeg2codec\Debug\mpeg2codec-d.lib' [C:\MySpace\Projects\mpeg2t
s\build_dll\samples\TsUtilities\sample_tsutilities.vcxproj]

Manually copy the library

PS C:\MySpace\Projects\mpeg2ts\build_dll> cmake --build .
Microsoft (R) Build Engine version 17.2.1+52cd2da31 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

common.vcxproj -> C:\MySpace\Projects\mpeg2ts\build_dll\libs\common\Debug\common-d.lib
h264codec.vcxproj -> C:\MySpace\Projects\mpeg2ts\build_dll\libs\h264codec\Debug\h264codec-d.dll
mpeg2codec.vcxproj -> C:\MySpace\Projects\mpeg2ts\build_dll\libs\mpeg2codec\Debug\mpeg2codec-d.dll
mpeg2ts.vcxproj -> C:\MySpace\Projects\mpeg2ts\build_dll\libs\mpeg2ts\Debug\mpeg2ts-d.dll
LINK : fatal error LNK1104: cannot open file '....\libs\h264codec\Debug\h264codec-d.lib' [C:\MySpace\Projects\mpeg2ts
build_dll\samples\TsUtilities\sample_tsutilities.vcxproj]

Manually copy the library
PS C:\MySpace\Projects\mpeg2ts\build_dll> cmake --build .
Microsoft (R) Build Engine version 17.2.1+52cd2da31 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

common.vcxproj -> C:\MySpace\Projects\mpeg2ts\build_dll\libs\common\Debug\common-d.lib
h264codec.vcxproj -> C:\MySpace\Projects\mpeg2ts\build_dll\libs\h264codec\Debug\h264codec-d.dll
mpeg2codec.vcxproj -> C:\MySpace\Projects\mpeg2ts\build_dll\libs\mpeg2codec\Debug\mpeg2codec-d.dll
mpeg2ts.vcxproj -> C:\MySpace\Projects\mpeg2ts\build_dll\libs\mpeg2ts\Debug\mpeg2ts-d.dll
mpeg2codec-d.lib(Mpeg2Codec.obj) : error LNK2019: unresolved external symbol "public: __cdecl GetBits::GetBits(void)" (
??0GetBits@@qeaa@XZ) referenced in function "public: __cdecl mpeg2::Mpeg2VideoEsParser::Mpeg2VideoEsParser(void)" (??0M
peg2VideoEsParser@mpeg2@@qeaa@XZ) [C:\MySpace\Projects\mpeg2ts\build_dll\samples\TsUtilities\sample_tsutilities.vcxproj
]
h264codec-d.lib(H264Codec.obj) : error LNK2001: unresolved external symbol "public: __cdecl GetBits::GetBits(void)" (??
0GetBits@@qeaa@XZ) [C:\MySpace\Projects\mpeg2ts\build_dll\samples\TsUtilities\sample_tsutilities.vcxproj]
mpeg2codec-d.lib(Mpeg2VideoParser.obj) : error LNK2019: unresolved external symbol "public: unsigned __int64 __cdecl Ge
tBits::getBits(int)" (?getBits@GetBits@@QEAA_KH@Z) referenced in function "public: class std::vector<struct mpeg2::EsIn
foMpeg2,class std::allocator > __cdecl mpeg2::Mpeg2VideoEsParser::analyze(void)" (?analyze@M
peg2VideoEsParser@mpeg2@@qeaa?AV?$vector@UEsInfoMpeg2@mpeg2@@v?$allocator@UEsInfoMpeg2@mpeg2@@@std@@@std@@xz) [C:\MySpa
ce\Projects\mpeg2ts\build_dll\samples\TsUtilities\sample_tsutilities.vcxproj]
h264codec-d.lib(H264Parser.obj) : error LNK2001: unresolved external symbol "public: unsigned __int64 __cdecl GetBits::
getBits(int)" (?getBits@GetBits@@QEAA_KH@Z) [C:\MySpace\Projects\mpeg2ts\build_dll\samples\TsUtilities\sample_tsutiliti
es.vcxproj]
mpeg2codec-d.lib(Mpeg2VideoParser.obj) : error LNK2019: unresolved external symbol "public: void __cdecl GetBits::reset
Bits(unsigned char const *,unsigned __int64,unsigned __int64)" (?resetBits@GetBits@@QEAAXPEBE_K1@Z) referenced in funct
ion "public: class std::vector<struct mpeg2::EsInfoMpeg2,class std::allocator > __cdecl mpeg
2::Mpeg2VideoEsParser::analyze(void)" (?analyze@Mpeg2VideoEsParser@mpeg2@@qeaa?AV?$vector@UEsInfoMpeg2@mpeg2@@v?$alloca
tor@UEsInfoMpeg2@mpeg2@@@std@@@std@@xz) [C:\MySpace\Projects\mpeg2ts\build_dll\samples\TsUtilities\sample_tsutilities.v
cxproj]
h264codec-d.lib(H264Parser.obj) : error LNK2001: unresolved external symbol "public: void __cdecl GetBits::resetBits(un
signed char const *,unsigned __int64,unsigned __int64)" (?resetBits@GetBits@@QEAAXPEBE_K1@Z) [C:\MySpace\Projects\mpeg2
ts\build_dll\samples\TsUtilities\sample_tsutilities.vcxproj]
mpeg2codec-d.lib(Mpeg2VideoParser.obj) : error LNK2019: unresolved external symbol "public: void __cdecl GetBits::skipB
its(int)" (?skipBits@GetBits@@QEAAXH@Z) referenced in function "public: class std::vector<struct mpeg2::EsInfoMpeg2,cla
ss std::allocator > __cdecl mpeg2::Mpeg2VideoEsParser::analyze(void)" (?analyze@Mpeg2VideoEs
Parser@mpeg2@@qeaa?AV?$vector@UEsInfoMpeg2@mpeg2@@v?$allocator@UEsInfoMpeg2@mpeg2@@@std@@@std@@xz) [C:\MySpace\Projects
\mpeg2ts\build_dll\samples\TsUtilities\sample_tsutilities.vcxproj]
h264codec-d.lib(H264Parser.obj) : error LNK2001: unresolved external symbol "public: void __cdecl GetBits::skipBits(int
)" (?skipBits@GetBits@@QEAAXH@Z) [C:\MySpace\Projects\mpeg2ts\build_dll\samples\TsUtilities\sample_tsutilities.vcxproj]
C:\MySpace\Projects\mpeg2ts\build_dll\samples\TsUtilities\Debug\sample_tsutilities.exe : fatal error LNK1120: 4 unresol
ved externals [C:\MySpace\Projects\mpeg2ts\build_dll\samples\TsUtilities\sample_tsutilities.vcxproj]
PS C:\MySpace\Projects\mpeg2ts\build_dll>

msi license

Update license text Windows msi installer. Currently cmake license.

Need clean 3rd-party build

When changing configuration I need also manually clean 3rd-party builds. It would simplify if they also configure and build under build directory.

Robustness issue

CMake Warning (dev) at C:/Program Files/CMake/share/cmake-3.27/Modules/ExternalProject.cmake:3136 (message): [74](https://github.com/skullanbones/mpeg2ts/actions/runs/6447393748/job/17503601193?pr=63#step:4:75) The DOWNLOAD_EXTRACT_TIMESTAMP option was not given and policy CMP0135 is [75](https://github.com/skullanbones/mpeg2ts/actions/runs/6447393748/job/17503601193?pr=63#step:4:76) not set. The policy's OLD behavior will be used. When using a URL [76](https://github.com/skullanbones/mpeg2ts/actions/runs/6447393748/job/17503601193?pr=63#step:4:77) download, the timestamps of extracted files should preferably be that of [77](https://github.com/skullanbones/mpeg2ts/actions/runs/6447393748/job/17503601193?pr=63#step:4:78) the time of extraction, otherwise code that depends on the extracted [78](https://github.com/skullanbones/mpeg2ts/actions/runs/6447393748/job/17503601193?pr=63#step:4:79) contents might not be rebuilt if the URL changes. The OLD behavior [79](https://github.com/skullanbones/mpeg2ts/actions/runs/6447393748/job/17503601193?pr=63#step:4:80) preserves the timestamps from the archive instead, but this is usually not [80](https://github.com/skullanbones/mpeg2ts/actions/runs/6447393748/job/17503601193?pr=63#step:4:81) what you want. Update your project to the NEW behavior or specify the [81](https://github.com/skullanbones/mpeg2ts/actions/runs/6447393748/job/17503601193?pr=63#step:4:82) DOWNLOAD_EXTRACT_TIMESTAMP option with a value of true to avoid this [82](https://github.com/skullanbones/mpeg2ts/actions/runs/6447393748/job/17503601193?pr=63#step:4:83) robustness issue.

Failing to build under ubuntu 22.04

In file included from /home/runner/work/mpeg2ts/mpeg2ts/libs/mpeg2ts/src/JsonSettings.h:39, [132](https://github.com/skullanbones/mpeg2ts/actions/runs/6435208150/job/17475979377#step:5:133) from /home/runner/work/mpeg2ts/mpeg2ts/libs/mpeg2ts/src/JsonSettings.cc:27: [133](https://github.com/skullanbones/mpeg2ts/actions/runs/6435208150/job/17475979377#step:5:134) /home/runner/work/mpeg2ts/mpeg2ts/3rd-party/json-3.9.1/include/nlohmann/json.hpp: In member function ‘bool nlohmann::detail::binary_reader<BasicJsonType, InputAdapterType, SAX>::parse_cbor_internal(bool, nlohmann::detail::cbor_tag_handler_t)’: [134](https://github.com/skullanbones/mpeg2ts/actions/runs/6435208150/job/17475979377#step:5:135) /home/runner/work/mpeg2ts/mpeg2ts/3rd-party/json-3.9.1/include/nlohmann/json.hpp:8272:80: error: useless cast to type ‘std::size_t’ {aka ‘long unsigned int’} [-Werror=useless-cast] [135](https://github.com/skullanbones/mpeg2ts/actions/runs/6435208150/job/17475979377#step:5:136) 8272 | return get_number(input_format_t::cbor, len) && get_cbor_array(static_cast<std::size_t>(len), tag_handler); [136](https://github.com/skullanbones/mpeg2ts/actions/runs/6435208150/job/17475979377#step:5:137) |

TsDemuxer seems to deterministically fail to demux final PES packet

TsDemuxer::demux calls TsParser::collectPes on every PES packet, which seems to only release the data for the packet (returning true) upon seeing the beginning of the next PES packet (with isPayloadStart)... but that means the last packet of every file I parse never gets dispatched :(. FWIW, I'd maybe expect this TODO to be relevant?

// TODO: check if we have boud PES and return it if it is coplete

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.