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 [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
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 > [hidden email] > https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Hi Nicolas,
Thank you for your kindly reply. It's good information for me that at least the video files can be played fine on Fedora 28 system. But my PC is using Win10 with MSYS2 (mingw32/64) enviroment. And the GStreamer install package is also 1.14.2 version(32bit version), which is installed using the "pacman" tool of MSYS2. I've also tried with gstreamer 1.8.1 source code to compile and install gstreamer 1.8.1. The test result is just as it uses 1.14.2 version on Win10. On win10, when I use gst-play-1.0 or gst-launch-1.0 playbin to play with the video files, it uses avdec_h264 as H.264 decoder and GstMad as MP3 decoder. Could you check which codecs are being using in Fedora 28? -- Sent from: http://gstreamer-devel.966125.n4.nabble.com/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Le jeu. 20 sept. 2018 03 h 57, rickyqiqi <[hidden email]> a écrit : Hi Nicolas, I can check. Meanwhile, have you tried with the official builds ? My first guess would be broken audio sink.
_______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Just tried with gst-play-1.0 of the 1.14.3 msi install package to play with
the video file. It can play the video file, but due to "Interactive keyboard handling in terminal not available" on Win32/64 OS, I can't do any seek test. And I also tried with the devel version of the package to compile with my gstreamer based program(I used the gstreamer-1.0-devel-x86-1.14.3.msi package because the 64bit version can't be used to successfully compile my program). The test result is just as it uses MSYS2 32 bit 1.14.2 version on Win10. Are there any other suggestions? Thank you again! -- Sent from: http://gstreamer-devel.966125.n4.nabble.com/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
In reply to this post by Nicolas Dufresne-5
Here I'd like to mention about some additional information about the attached
video file mentioned in my 1st mail: Because the attached video file is just about several 10 MB, this file can somehow be seekable in my gstreamer based program. But it will not immediately play the video frame I seek to play. Most of the time it will wait for a while until it can play a screen. Most of the time the played screen frame is just the later frames of the video, not I desire to play one. (Unlike it is in VCL, when I point to a desired video seek postion, it plays immediately the video frame I desire to play. ) And when the video file is a long time video, such as a 15 minutes long video, it will not play a seeked screen. -- Sent from: http://gstreamer-devel.966125.n4.nabble.com/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |