-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[1.x] 1.0.1 janus-pp-rec convert to mp4 #3037
Comments
It is not clear to me how you are using pipes with ffmpeg and if that plays a role in your issue. I've done a quick test with the following specs:
Then started the mjr recording with a Converted
I'v got a mp4 file that the online tool you linked was able to parse. Finally I got a thumbnail with the following command (not using pipes)
|
The error that's reported is related to faststart:
and I can replicate that one too. Without faststart it does work fine. I'll have a look. |
The above commit seems to fix it for me, please let me know if that's not the case. |
What version of Janus is this happening on?
1.0.1
Have you tested a more recent version of Janus too?
No.
Was this working before?
I did not check it in earlier versions
Is there a gdb or libasan trace of the issue?
No
Additional context
Hi guys,
I have some issue with janus-pp-rec.
I record RTP stream which encoded with h264 codec using janus videoroom plugin. It successfully create MJR file.
When I try to use janus-pp-rec to convert this MJR file to MP4 file I get MP4 which missing some information.
I tried to create a thumbnail from this mp4 but get an error (fluent-ffmpeg using streams), I also used online MP4 analyzer to check the file and it cannot be parsed.
Janus command:
janus-pp-rec input.mjr janus.mp4 - also tried with --format flag.
ffmpeg thumbnail command:
ffmpeg -ss 00:00:01 -i pipe:0 -y -an -vframes 1 -filter:v scale=w=320:h=240 out.png
But when I re create the mp4 without encoding using this command:
ffmpeg -i .\janus.mp4 -c copy -f mp4 out.mp4
the online analyzer works and also the ffmpeg command for creating thumbnail works.
and it seems their have different structure:
The MP4 which works has this structure:
![image](https://user-images.githubusercontent.com/42771565/184653923-ca8a0dea-a847-4395-8cc0-bc72035b0ea0.png)
Janus's MP4 has this structure:
![image](https://user-images.githubusercontent.com/42771565/184654031-1b55714a-c0d7-4ce1-97e0-1bc83fb2ac41.png)
So I think because I work with pipe ffmpeg cant find the relevant data on the media because the moov part appended after mdat part so I try to use --faststart flag in janus-pp-rec command and got an error.
Janus version: 1001 (1.0.1)
Janus commit: 86cce9f
Compiled on: Wed May 25 08:56:45 UTC 2022
Logging level: 4
Source file: 2022-08-15T18-53-34.322Z-video-0.mjr
Target file: s2.mp4
File is 7677916 bytes
Pre-parsing file to generate ordered index...
This is a video recording:
-- Codec: h264
-- Created: 1660589614342303
-- Written: 1660589615182310
SSRC detected: 3564857702
Counted 6658 RTP packets
Counted 6658 frame packets
-- 1280x720 (fps [2970,11880] ~ 30)
[libx264 @ 0x5586eecdc640] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x5586eecdc640] profile High, level 3.1, 4:2:0, 8-bit
[libx264 @ 0x5586eecdc640] 264 - core 160 r3011 cde9a93 - H.264/MPEG-4 AVC codec - Copyleft 2003-2020 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=22 lookahead_threads=3 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
First keyframe: 56430
[mp4 @ 0x5586eecd9380] Starting second pass: moving the moov atom to the beginning of the file
[mp4 @ 0x5586eecd9380] Unable to re-open output file for the second pass (faststart)
s2.mp4 is 7521227 bytes
Bye!
link to MP4 analyzer: https://lulebo.github.io/
I attach the files so I will be glad if you can try to understand what is the problem in the conversion process.
Thank you very much
janus.mp4
out.mp4
The text was updated successfully, but these errors were encountered: