vlc does not play mp4 file that was merged using splitmuxsrc and splitmuxsink
Submitted by sonntex
Link to original bug (#774716)
Description
Created attachment 340305
video-chunk-01.mp4
I have two or more correct mp4 files that were grabbed from usb video camera using splitmuxsink with mp4mux muxer.
sonntex@home ~/video1 $ ls -l
total 132
-rw-r--r-- 1 sonntex sonntex 67913 Nov 18 17:32 video-chunk-00.mp4
-rw-r--r-- 1 sonntex sonntex 62051 Nov 18 17:32 video-chunk-01.mp4
sonntex@home ~/video1 $ ffprobe -show_packets video-chunk-01.mp4 2>&1 | tail -n 30
[PACKET]
codec_type=video
stream_index=0
pts=145692
pts_time=14.569200
dts=145692
dts_time=14.569200
duration=130
duration_time=0.013000
convergence_duration=N/A
convergence_duration_time=N/A
size=12
pos=54537
flags=_
[/PACKET]
[PACKET]
codec_type=video
stream_index=0
pts=145822
pts_time=14.582200
dts=145822
dts_time=14.582200
duration=1
duration_time=0.000100
convergence_duration=N/A
convergence_duration_time=N/A
size=12
pos=54549
flags=_
[/PACKET]
As you can see dts, dts_time, pts, pts_time, duration and duration_time are correct.
sonntex@home ~/video1 $ gst-launch-1.0 -qe splitmuxsrc location="video-chunk-*.mp4" ! splitmuxsink location="video.mp4"
sonntex@home ~/video1 $ ls -l
total 260
-rw-r--r-- 1 sonntex sonntex 67913 Nov 18 17:32 video-chunk-00.mp4
-rw-r--r-- 1 sonntex sonntex 62051 Nov 18 17:32 video-chunk-01.mp4
-rw-r--r-- 1 sonntex sonntex 130286 Nov 19 16:33 video.mp4
sonntex@home ~/video1 $ ffprobe -show_packets video.mp4 2>&1 | tail -n 30
[PACKET]
codec_type=video
stream_index=0
pts=-161503839
pts_time=-140438.120870
dts=-161503839
dts_time=-140438.120870
duration=1
duration_time=0.000870
convergence_duration=N/A
convergence_duration_time=N/A
size=12
pos=114820
flags=_
[/PACKET]
[PACKET]
codec_type=video
stream_index=0
pts=-161503775
pts_time=-140438.065217
dts=-161503775
dts_time=-140438.065217
duration=1
duration_time=0.000870
convergence_duration=N/A
convergence_duration_time=N/A
size=12
pos=114832
flags=_
[/PACKET]
Result of the merge has incorrect dts, pts and duration. So, I can not play this mp4 file using vlc.
Attachment 340305, "video-chunk-01.mp4":
video-chunk-01
Version: 1.10.x