mp4 from HTTP Streaming is broken when the camera codec is MJPEG
AnsweredI have 3 IP cameras and I set the camera' codec to MJPEG, H264, and H265. I used Direct download for "mkv" and "ts". I used HTTP Streaming for "webm", "mpegts", "mpjpeg" and "mp4". I could get a valid video file for "mkv", "webm" and "mpjpeg" only.
mp4 video is generated when the camera codec is H264 or H265.
curl "http://admin:baba123@192.168.100.150:7001/media/16f840bd-f274-c678-27db-c82029a4c72f.mp4?pos=2020-06-06T10:09:55.126125&endPos=2020-06-06T10:10:05.126125" --output 16f840bd-f274-c678-27db-c82029a4c72f_M1.mp4
The file size is 854 bytes only.
ffprobe output shows the bellow error.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x562119f4cc80] Could not find codec parameters for stream 0 (Video: mjpeg (mp4v / 0x7634706D), none(bt470bg/unknown/unknown), 1920x1080): unspecified pixel format
Consider increasing the value for the 'analyzeduration' and 'probesize' options
version: 4.0.0.29987
Platform: linux_arm64
IP camera: AXISM2025LE
(1)mp4 output is not supported when a camera codec is MJPEG. Is this true?
(2)What is the best format if I want to make a video clip?
I guess mkv will be the best because NxWitness media server seems recording videos in mkv with original codec. But I need to convert it to mp4 by my program in the case.
I am adding both files here. mkv and mp4.
MKV
http://www.galactica.world/tmp/16f840bd-f274-c678-27db-c82029a4c72f_H1.mkv
MP4
http://www.galactica.world/tmp/16f840bd-f274-c678-27db-c82029a4c72f_M1.mp4
If I convert the mkv file by ffmpeg, the converted mp4 is OK.
-
Hello SHUNSUKE BABA ,
It is a bug. Has been fixed. Fix will be included to version 4.1
0 -
Is the bug-fixing done not only for mp4 but also for ts and mpegts ?
When will the version 4.1 released?
0
Please sign in to leave a comment.
Comments
2 comments