Giter Club home page Giter Club logo

libmpegts's People

Contributors

funman avatar ifb avatar jpsaman avatar kierank avatar leesei avatar nsuja avatar tmatth 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

Watchers

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

libmpegts's Issues

How to compile and use - I am getting garbled NAL units in MPEG-TS

Hi,

thank you for the great effort to create this library. I am trying to use it in my own project, however, I am getting garbled output in the mpeg-ts with AVC.

I have tried the following versions (2013/07/13)
libmpegts-master
libmpegts-obe-master
libmpegts-20130401-STABLE

I have used the following compilers:
gcc version 4.4.1 (Ubuntu 4.4.1-4ubuntu9), Target: x86_64-linux-gnu
gcc version 4.7.3 (rev1, Built by MinGW-builds project), Target: i686-w64-mingw32
gcc version 4.7.3 (rev1, Built by MinGW-builds project), Target: x86_64-w64-mingw32

The generated MPEG-TS is fine, e.g. tsreport (of tstools) as well as code.google.com/p/tsdemuxer can handle it without complaints. However, the demuxed set of NAL units is garbled. When I do a binary diff with the original bytestream, I can observe that there are a couple of bytes missing and some are inserted. The extracted h264 bitstream is also shorter than the original.

As I am using 32bit and 64 bit compilers on both Win and Linux and the problem persists, this seems to be a problem of compiling the libmpegts objects. Can you give me any hints on why this is happening and how to avoid it?

Here's the code for initialization of libmpegts

ts_program_t tsprog = {0};
tsprog.num_streams = 1;
tsprog.pcr_pid = 110;
tsprog.pmt_pid = 120;
tsprog.program_num = 1;
tsprog.sdt.provider_name = provider_name;
tsprog.sdt.service_name = service_name;
tsprog.sdt.service_type = 0x19;

tsprog.streams = (ts_stream_t_) calloc( tsprog.num_streams, sizeof(_tsprog.streams) );
if( !tsprog.streams ) {
fprintf( stderr, "malloc failed\n" );
return 1;
}

tsprog.streams[0].pid = 130;
tsprog.streams[0].stream_format = LIBMPEGTS_VIDEO_AVC;
tsprog.streams[0].hdmv_video_format = LIBMPEGTS_HDMV_1080P;
tsprog.streams[0].hdmv_frame_rate = 25;
tsprog.streams[0].hdmv_aspect_ratio = LIBMPEGTS_HDMV_AR_16_9;
tsprog.streams[0].stream_id = 224;

ts_main_t tsmain = {0};
tsmain.muxrate = 200000000;
tsmain.num_programs = 1;
tsmain.pat_period = 50;
tsmain.pcr_period = 40;
tsmain.programs = &tsprog;
tsmain.sdt_period = 1000;
tsmain.ts_id = 1;
tsmain.ts_type = TS_TYPE_GENERIC;
tswriter = ts_create_writer();
int tsts_ret = ts_setup_transport_stream(tswriter,&tsmain);
if(tsts_ret < 0)
return 0;

int tsvideo_ret = ts_setup_mpegvideo_stream(tswriter,130,30,AVC_MAIN,0,0,0);
if (tsvideo_ret < 0)
return 0;

...
When a NAL unit is ready, the following code is executed

ts_frame_t coded_frames[1];
coded_frames[0].cpb_final_arrival_time = cbp_fat;
coded_frames[0].cpb_initial_arrival_time = cbp_iat;
coded_frames[0].pts = pts;
coded_frames[0].dts = dts;
coded_frames[0].frame_type = type;

coded_frames[0].data = data;
coded_frames[0].size = data_len;
coded_frames[0].pid = 130;

uint8_t *output;
int len;
int64_t *pcrlist;

int ret = ts_write_frames(tswriter,&coded_frames[0],1,&output,&len,&pcrlist);

if(len) write...

VLC player Messages : " received buffer in the future" after muxing

Hi ,

How to rectify this problem i am getting this error when ever i played ts file by VLC Player , this means exactly what and how to rectify it.THis messages shows some TS file only no video yet to be played only black screen , this messges continues.If i played by mplayer , than it plays continuously , this happens after muxing it but source input for muxer is played by vlc without any error.

Important : This Video can able to play in all player like mplayer, ffplay or ffmpeg , Classic media player.Dont Tell me to post in mail list , i am doing this for past 1 year no response.I have checked PCR , OPCR , PTS , DTS its all accurate.For more info i can able to send file and reports.

my mail id : sakthisam(at)gmail(dot)com

main warning: received buffer in the future
main warning: received buffer in the future
main warning: early picture skipped
main warning: early picture skipped
main warning: received buffer in the future
main warning: received buffer in the future
main warning: received buffer in the future
main warning: early picture skipped
main warning: received buffer in the future
main warning: received buffer in the future
main warning: early picture skipped
main warning: received buffer in the future
main warning: received buffer in the future
main warning: early picture skipped
main warning: received buffer in the future
main warning: early picture skipped
main warning: received buffer in the future
main warning: received buffer in the future
main warning: early picture skipped

VLC player Messages : " received buffer in the future" after muxing

Hi ,

This is for Person who dare to do!!

How to rectify this problem i am getting this error when ever i played ts file by VLC Player , this means exactly what and how to rectify it.THis messages shows some TS file only no video yet to be played only black screen , this messges continues.If i played by mplayer , than it plays continuously , this happens after muxing it but source input for muxer is played by vlc without any error.

main warning: received buffer in the future
main warning: received buffer in the future
main warning: early picture skipped
main warning: early picture skipped
main warning: received buffer in the future
main warning: received buffer in the future
main warning: received buffer in the future
main warning: early picture skipped
main warning: received buffer in the future
main warning: received buffer in the future
main warning: early picture skipped
main warning: received buffer in the future
main warning: received buffer in the future
main warning: early picture skipped
main warning: received buffer in the future
main warning: early picture skipped
main warning: received buffer in the future
main warning: received buffer in the future
main warning: early picture skipped

Important : This Video can able to play in all player like mplayer, ffplay or ffmpeg , Classic media player.Dont Tell me to post in mail list , i am doing this for past 1 year no response.I have checked PCR , OPCR , PTS , DTS its all accurate.For more info i can able to send file and reports

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.