Live recorded MP4(h264+mp3) video file can't be seek to play in gstreamer on PC

Nicolas Dufresne nicolas at ndufresne.ca
Wed Sep 19 12:51:04 UTC 2018


The files play fine for me here, I'm running Fedora 28 with GStreamer
1.14.2. Maybe you are missing some CODEC ? Most Linux distribution
don't directly ship H264 CODEC beccause of patents. On Fedora, I need
to extend my distribution with rpmfusion repository in order to install
gst-libav/gst-ffmpeg.

regards,
Nicolas

Le mercredi 19 septembre 2018 à 02:19 -0500, rickyqiqi a écrit :
> Hi, I'm using a NXP imx6Q board (with gstreamer 1.8.1) to record live
> videos
> using the following scripts:
> DEV_VIDEO_264="/dev/video3"
> DEV_AUDIO="hw:1,0"
> FN="/mnt/edisk/record-"$(date +%Y%m%d_%H%M%S)"-%05d.mp4"
> 
> gst-launch-1.0 -e v4l2src device="${DEV_VIDEO_264}" do-
> timestamp=true  \
> 	! queue flush-on-eos=true silent=true leaky=0 max-size-
> buffers=0
> max-size-time=0 max-size-bytes=0 \
> 	! h264parse disable_passthrough=true \
> 	! queue flush-on-eos=true silent=true leaky=0 max-size-
> buffers=0
> max-size-time=0 max-size-bytes=0 \
> 	! mux. alsasrc device="${DEV_AUDIO}" \
> 	! 'audio/x-raw,format=S16LE,rate=48000,channels=2' \
> 	! audioconvert \
> 	! imxmp3enc bitrate=48 \
> 	! queue \
> 	! mux.audio_0 \
> 	splitmuxsink location="${FN}" reserved-max-
> duration=3000000000000000000
> reserved-moov-update-period=1000000000 max-size-time=900000000000
> mp4mux=mp4mux name=mux
> 
> It records video files successfully. The video files can be played on
> IMX6Q
> board using gst-play-1.0 and also I can play forward or backward
> using < or
> > keys pressing. Everything seems alright.
> 
> But when I copy these video files into my PC, an unexpected issue
> occures:
> These files can be played and also seekable in some of the media
> player,
> such as VLC, MPC-HC and so on. But they can't be successfully
> seekable in
> using gstreamer base programs on PC (can be played but can't be
> seeked.
> We've tried on an self-programed application and also KMPlayer with
> similar
> seek issues.). Here I attached a short video sample file(zipped in
> two files
> because of uploading file size limit) to hope if someone can help me.
> Thank
> you in advance.
> 
> record-20180918_181507-00000.001
> <
> http://gstreamer-devel.966125.n4.nabble.com/file/t378542/record-20180918_181507-00000.001>  
> record-20180918_181507-00000.002
> <
> http://gstreamer-devel.966125.n4.nabble.com/file/t378542/record-20180918_181507-00000.002>  
> 
> 
> 
> 
> --
> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



More information about the gstreamer-devel mailing list