After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 491271 - [ffmpeg] make muxers reusable
[ffmpeg] make muxers reusable
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-libav
git master
Other Linux
: Normal enhancement
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
: 554901 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2007-10-29 04:22 UTC by Terry
Modified: 2018-11-03 12:54 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Terry 2007-10-29 04:22:01 UTC
Hi, 

I've got a problem int he following pipeline(for recording stream into a 3gp file):

gst-launch ffmux_3gp name=mux0 ! filesink name=file0 { udpsrc name=audioudp0 caps="application/x-rtp, media=(string)audio, payload=(int)98, clock-rate=(int)8000, encoding-name=(string)AMR, encoding-params=(string)1, octet-align=(string)1" ! gstrtpjitterbuffer name=audiojitter0 latency=0 ts-offset=1000000 ! rtpamrdepay queue-delay=0 name=audiodepay0 ! amrnbdec ! amrnbenc ! queue name=audioqueue0 } ! mux0.audio_0 { udpsrc name=videoudp0 caps="application/x-rtp, media=(string)video, payload=(int)34, clock-rate=(int)90000, encoding-name=(string)H263" ! gstrtpjitterbuffer name=videojitter0 latency=0 ts-offset=1000000 ! rtph263depay queue-delay=0 name=videodepay0 ! video/x-h263, framerate=8/1 ! ffdec_h263 name=videodec0 ! videorate name=videorate0 ! video/x-raw-yuv,framerate=8/1 ! ffenc_h263 name=videoenc0 rtp-payload-size=500 gop-size=20 me-method=4 !queue name=videoqueue0 } ! mux0.video_0

when i start the pipeline to record a stream, then i set the pipeline to NULL 
after that i restart the pipeline to record again(another stream)
it shows error like that 

0:00:49.519585000 12784 0xb0e05a90 ERROR               ffmpeg :0:: error, non monotone timestamps 210962 >= 2033

0:00:49.519638000 12784 0xb0e05920 ERROR               ffmpeg :0:: error, non monotone timestamps 210962 >= 2193

0:00:49.519672000 12784 0xb0e05920 ERROR               ffmpeg :0:: error, non monotone timestamps 210962 >= 2353

0:00:49.519705000 12784 0xb0e05920 ERROR               ffmpeg :0:: error, non monotone timestamps 210962 >= 2513

0:00:49.519737000 12784 0xb0e05920 ERROR               ffmpeg :0:: error, non monotone timestamps 210962 >= 2673

0:00:49.519768000 12784 0xb0e05920 ERROR               ffmpeg :0:: error, non monotone timestamps 210962 >= 2833

0:00:49.519803000 12784 0xb0e05920 ERROR               ffmpeg :0:: error, non monotone timestamps 210962 >= 2993

The problem is that it remember the last packet's timestamp value and hence not going to proccess the new stream packet until its timestamp higher the the last timestamp of the old stream.

As far as I know, the NULL state should not contain any state and should not remember anything. Therefore, I think this may be a bug
Comment 1 Wim Taymans 2007-10-29 11:01:56 UTC
reuse of ffmpeg muxers is not supported. Marking as possible enhancement in case someone wants to fix this.
Comment 2 Jeonghoon Park 2008-11-11 04:55:48 UTC
this one caused by av_new_stream that created in gst_ffmpegmux_request_new_pad() does not initialized 

I add following codes in gst_ffmpegmux_change_state().
how about this?


	for(i=0; i < ffmpegmux->context->nb_streams; i++)
	{
		ffmpegmux->context->streams[i]->start_time = AV_NOPTS_VALUE;
		ffmpegmux->context->streams[i]->duration = AV_NOPTS_VALUE;    
		ffmpegmux->context->streams[i]->cur_dts = AV_NOPTS_VALUE;

	}
Comment 3 Edward Hervey 2009-03-05 08:08:20 UTC
*** Bug 554901 has been marked as a duplicate of this bug. ***
Comment 4 GStreamer system administrator 2018-11-03 12:54:59 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-libav/issues/1.