Can't play .mp4 generated from .mjr with janus-pp-rec

647 views
Skip to first unread message

Rhythm Chopra

unread,
Mar 9, 2018, 6:53:28 AM3/9/18
to meetecho-janus
I am recording an incoming h264 encoded RTP video stream by sending start and stop messages to Janus API. And after recording , I'm trying to convert .mjr file to .mp4 so that it can be played with any Media Player. But as of now, media player throws error `Gstreamer encountered a general stream error.` 
I tried playing file using gstreamer filesrc, even it throws the same error.

I tried playing it with Browsers and Firefox can play the stream but Chrome can't. don't know why.

P.S.:
During conversion, janus-pp-rec logs a warning `Profile is not baseline (100!=66)`.

Please suggest what could be wrong.

Regards
Rhythm

Anil Wadghule

unread,
Mar 9, 2018, 6:59:28 AM3/9/18
to Rhythm Chopra, meetecho-janus
You can use ffmpeg to convert webm files which are generated by janus-pp-rec no?

Thanks,
Anil

--
You received this message because you are subscribed to the Google Groups "meetecho-janus" group.
To unsubscribe from this group and stop receiving emails from it, send an email to meetecho-janu...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

signature.asc

Rhythm Chopra

unread,
Mar 9, 2018, 7:05:10 AM3/9/18
to meetecho-janus
As far I understand, I can't. Because janus-pp-rec only allow conversion to mp4 in case of h264 encoded stream. So I no way can generate .webm from .mjr.

Rhythm Chopra

unread,
Mar 9, 2018, 7:11:58 AM3/9/18
to meetecho-janus
And its not that .mjr is also corrupted, I can play the same .mjr file in recordplaytest demo.
So, something is wrong in the conversion only.

Please suggest 

Regards
Rhythm

Anil Wadghule

unread,
Mar 9, 2018, 9:34:55 AM3/9/18
to Rhythm Chopra, meetecho-janus
Are you on Mac?

Try with Linux if possible

Thanks,
Anil

To unsubscribe from this group and stop receiving emails from it, send an email to meetecho-janus+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Best,
Anil

Rhythm Chopra

unread,
Mar 9, 2018, 9:38:29 AM3/9/18
to meetecho-janus
I'm on Linux only. I never mentioned Mac.

Lorenzo Miniero

unread,
Mar 9, 2018, 9:47:16 AM3/9/18
to meetecho-janus
Try re-encoding the mp4 janus-pp-rec generated, with ffmpeg or gstreamer. If it works in some players and doesn't in others, it might be an issue with the container we wrote, so re-encoding it should fix it. Make also sure you're using the latest code, as we recently fixed something in the post processor with respect to H.264.

L.

Rhythm Chopra

unread,
Mar 9, 2018, 11:15:05 AM3/9/18
to meetecho-janus
Actually, I'm using refcount branch of Janus. Just want to know that whether the updates are available on it or not?

Regards
Rhythm

Rhythm Chopra

unread,
Mar 9, 2018, 11:21:57 AM3/9/18
to meetecho-janus
Moreover, even gstreamer can't play the file (as I mentioned above).
Following is the gstreamer logs, when I try to play file using filesrc
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
ERROR
: from element /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstQTDemux:qtdemux0: GStreamer encountered a general stream error.
Additional debug info:
qtdemux
.c(5520): gst_qtdemux_loop (): /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstQTDemux:qtdemux0:
streaming stopped
, reason not-negotiated
ERROR
: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...



On Friday, March 9, 2018 at 8:17:16 PM UTC+5:30, Lorenzo Miniero wrote:

Rhythm Chopra

unread,
Mar 9, 2018, 12:29:03 PM3/9/18
to meetecho-janus
I just updated the branch the rebuild janus. 
Same error persists.

Regards,
Rhythm

Lorenzo Miniero

unread,
Mar 9, 2018, 12:30:49 PM3/9/18
to meetecho-janus
As I said, you'll need to re-encode or regenerate the MP4 container then, from the .mp4 file you got from janus-pp-rec. 

L.

Rhythm Chopra

unread,
Mar 9, 2018, 12:52:12 PM3/9/18
to meetecho-janus
Could you please direct me how to do that?
I tried applying demux and again mp4mux on the generated file. But gstreamer throws the following error:

Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
ERROR: from element /GstPipeline:pipeline0/GstQTDemux:qtdemux0: GStreamer encountered a general stream error.
Additional debug info:
qtdemux.c(5520): gst_qtdemux_loop (): /GstPipeline:pipeline0/GstQTDemux:qtdemux0:
streaming stopped, reason not-negotiated
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...

pipeline I'm using is 
gst-launch-1.0 filesrc location=video.mp4 ! qtdemux ! h264parse ! mp4mux ! filesink location=result.mp4

Please suggest.

Regards
Rhythm

Rhythm Chopra

unread,
Mar 9, 2018, 2:04:02 PM3/9/18
to meetecho-janus
Actually, the above pipeline works fine for other mp4 files, So I think it should do what you are asking me to do.

Please correct if I'm wrong.

Regards,
Rhythm

Rhythm Chopra

unread,
Mar 10, 2018, 4:29:58 AM3/10/18
to meetecho-janus
Should I open a git issue for the same as well.?

Regards,
Rhythm

Lorenzo Miniero

unread,
Mar 10, 2018, 4:38:38 AM3/10/18
to meetecho-janus
Sorry, I'm not going to fix this, as I don't believe it's an issue (works in some players). I already did all I could with a proprietary codec and format. Contributions are welcome of course.

L. 

Rhythm Chopra

unread,
Mar 10, 2018, 4:51:24 AM3/10/18
to meetecho-janus
But it doesn't play anywhere except Firefox. 

Anil Wadghule

unread,
Mar 10, 2018, 5:37:04 AM3/10/18
to Rhythm Chopra, meetecho-janus
@Rhythm Try using another computer may be another environment. No one is facing this currently. If you can reproduce on another environment, you can create a GitHub issue.

Anil 

To unsubscribe from this group and stop receiving emails from it, send an email to meetecho-janus+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Best,
Anil

Rhythm Chopra

unread,
Mar 10, 2018, 5:43:50 AM3/10/18
to meetecho-janus
Actually, I was trying to figure out whats wrong.
I found out that, gstreamer can play the generated mp4 file using filesrc if I use `qtdemux` before `decodebin` folllowed by `videoconvert` and `autovideosink`. While normal mp4 can be played even by omitting`qtdemux`.

So, it must be the reason, video players are unable to play the file. There must be something which needs to added to mp4 container so that I don't have to use demuxer explicitly in gstreamer pipeline. I need to play this file using normal players, but I don't have any idea, what needs to be done on the container side to achieve it.

Please suggest.

Regards,
Rhythm
Best,
Anil

Reply all
Reply to author
Forward
0 new messages