Avi movie file has extra data - update

William Salibrici bsalibrici at latticeinc.com
Thu Feb 2 20:52:00 UTC 2017


Original post -->
The following pipeline works ok and produces an avi movie file. My development machine is windows 7 and I'm using GStreamer 1.8.2 with your windows pre-built binaries.

gst-launch-1.0.exe -e



avimux name=mux ! filesink location=C:/myfile.avi

sync=true



rtpbin latency=6000 name=rtpbin_A



udpsrc address="192.168.1.101" port=5018

caps="application/x-rtp,media=video,payload=97,clock-rate=90000,encoding-name=VP8" !



rtpbin_A.recv_rtp_sink_0

rtpbin_A. ! rtpvp8depay ! avdec_vp8 output-corrupt=true ! videoconvert ! videorate ! videoscale !

capsfilter caps="video/x-raw,height=288,width=352,framerate=30/1" !

avenc_mpeg4 ! queue ! mux.



udpsrc address="192.168.1.101" port=5020

caps="application/x-rtp,media=audio,clock-rate=48000,encoding-name=OPUS,payload=96" !



rtpbin_A.recv_rtp_sink_1

rtpbin_A. ! rtpopusdepay ! opusdec ! audioconvert ! audiorate !

capsfilter caps="audio/x-raw,format=S16LE,rate=8000,channels=1" !

mulawenc ! queue ! mux.


I can use the standard Windows media player to play the resultant avi file. However, there are two problems:

1.       The avi file length is about 5 seconds longer that it should be.

2.       When I play the movie, there is about a 5 second delay in the beginning before it starts to play. The first video frame appears frozen during this initial delay.

Once the movie starts to play it is all ok. All the audio and video data is there and the audio and video are in sync.
I tried changing the rtpbin latency but that did not correct the problem.
Can anyone tell me what is causing this extra data in the avi file and the initial play delay, and what changes should be made to the above pipeline to eliminate it? Also, does anyone know of an open source avi file chunk viewer? I did a quick google search but have not found anything so far. I would like to see what data is actually in the avi file.
Thanks so much for your help,
Bill
Update -->
I thought maybe the standard Windows media player was responsible for the initial play delay so I tried the following gstreamer playback pipeline:

gst-launch-1.0 -e
filesrc location=C:/myfile.avi !
avidemux name=demux demux. ! queue ! avdec_mpeg4 ! videoconvert ! d3dvideosink
demux. ! queue ! mulawdec ! audioconvert ! directsoundsink

I get the same playback response as with the Windows media player with the same two issues mentioned above in my initial post! So this play delay appears to be a gstreamer issue.
I did google searches for avi file reader/viewer/chunk viewer and finally found a useful open source tool at http://ffmpeg.org/. They have a win32 command line tool named ffprobe that reads an avi file and displays a lot of info about what it contains. I looked at my test recording that has the initial play delay. It was decoded without problems. The stream info is correct. The audio and video frames also looked fine. The file had 15 frames between key frames for video. I didn't see anything that looked suspicious or broken. The first key frame came early in the recording - within the first half second.
Help to resolve this would be greatly appreciated!
Bill


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20170202/9f5467f3/attachment.html>


More information about the gstreamer-devel mailing list