TransportStream to mp4

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

TransportStream to mp4

bielbola
Hello,

I'm a programmer in Barcelona, with one year of experience in GStreamer. I'm trying to remux a TransportStream with H.264 video and AAC audio to an mp4 file without reencode the stream information. If I try to do it separately, it means a mp4 file with only the video stream an a mp4 file with the audio, it works fine, but when I try tu mux both streams, the pipe hangs in PREROLLING state. I'm quite sure that the problem is with the mpegtsdemux, in fact, for mux both streams I'm using my own mp4 muxer, and it doesn't appear that the problem whas here.

I write the pipe that I'm using via gst-launch (In Windows... I have not tested yet in Linux)

This one works fine:

gst-launch-0.10.exe filesrc location="D:/temp/GoiTB/sample.h264" ! mpegtsdemux name=demux demux. v3qtmuxer silent=false name=mux mux. ! filesink location="D:/temp/GoiTB/sample.mp4" demux.video_0810 ! video/x-h264 ! queue ! mux.video_0

This one too

gst-launch-0.10.exe filesrc location="D:/temp/GoiTB/sample.h264" ! mpegtsdemux name=demux demux. v3qtmuxer silent=false name=mux mux. ! filesink location="D:/temp/GoiTB/sample.mp4" demux.audio_0814 ! audio/mpeg ! queue ! mux.audio_0

But together it hangs after PREROLLING state

gst-launch-0.10.exe filesrc location="D:/temp/GoiTB/sample.h264" ! mpegtsdemux name=demux demux. v3qtmuxer silent=false name=mux mux. ! filesink location="D:/temp/GoiTB/sample.mp4" demux.video_0810 ! video/x-h264 ! queue ! mux.video_0 demux.audio_0814 ! audio/mpeg ! queue ! mux.audio_0

The same happens if I don't try to remux the streams an only write both of them in a separate file... for example.

gst-launch-0.10.exe filesrc location="D:/temp/GoiTB/sample.h264" ! mpegtsdemux name=demux demux.video_0810 ! queue ! filesink location="D:/temp/GoiTB/sample.video" demux.audio_0814 ! queue ! filesink location="D:/temp/GoiTB/sample.audio"

Can anyone help me?

Thanks a lot and sorry my poor English.

Carles Bolaños



Reply | Threaded
Open this post in threaded view
|

Re: TransportStream to mp4

bielbola
I think I have solved it setting the property async to false in the filesink plugin.
Now I recieve an error "Failed to configure latency of 0:00:00.00000000"

Any idea?

Thanks a lot

Carles Bolaños
Reply | Threaded
Open this post in threaded view
|

Re: TransportStream to mp4

bielbola
Can be any setting of the queue plugin? If I erase the audio queue plugin, the pipe plays fine... but I think that my muxer doesn't recieve compressed audio samples... Let me debug it.

The pipe:

gst-launch-0.10.exe -v filesrc location="D:/temp/GoiTB/sample.h264" ! mpegtsparse ! mpegtsdemux name=demux demux. v3qtmuxer silent=false name=mux mux. ! filesink location="D:/temp/GoiTB/sample.mp4" async=false demux.video_0810 ! queue ! mux.video_0 demux.audio_0814 ! queue ! mux.audio_0

stops with the error "Failed to configure latency..." but

gst-launch-0.10.exe -v filesrc location="D:/temp/GoiTB/sample.h264" ! mpegtsparse ! mpegtsdemux name=demux demux. v3qtmuxer silent=false name=mux mux. ! filesink location="D:/temp/GoiTB/sample.mp4" async=false demux.video_0810 ! queue ! mux.video_0 demux.audio_0814  ! mux.audio_0

seems work (I think that I don't recieve the compressed audio samples... let me check)

Thanks a lot again !!!