Hi,everyone.
I'm trying to encode video to H265 bitstream with a YUV file in Gstreamer,then I send the H265 bitstream through Local Area Network to another host in this LAN and store them as a h265 file.In order to check that how much frames are there in this file,I decoded this file to YUV file,which can be calculated with the parameters of resolution ratio.I found a phenomenon:The decoded YUV file contains less frames than the YUV file before encoding(approximately dropped out 3 frames in each test). Why? I konw that in FFMpeg, there is a function called "flush_encoder()" will be invoked after encoding,which is used to output the remaining AVPacket in the encoder. I want to konw if Gstreamer has some similar operations I didn't use,which caused less frames than I expected. If hasn't, what's the reason actually?
Sent from the GStreamer-devel mailing list archive at Nabble.com. _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Hi, in order to get all frames, you have to send an EOS down the pipeline after the last frame and then wait until EOS is posted on the message
bus. Gruesse Von: gstreamer-devel <[hidden email]>
Im Auftrag von surprised Hi,everyone. I'm trying to encode video to H265 bitstream with a YUV file in Gstreamer,then I send the H265 bitstream through Local Area Network to another host in this LAN and store them as a h265 file.In order to check that how much frames
are there in this file,I decoded this file to YUV file,which can be calculated with the parameters of resolution ratio.I found a phenomenon:The decoded YUV file contains less frames than the YUV file before encoding(approximately dropped out 3 frames in each
test). Why? I konw that in FFMpeg, there is a function called "flush_encoder()" will be invoked after encoding,which is used to output the remaining AVPacket in the encoder. I want to konw if Gstreamer has some similar operations I didn't use,which caused
less frames than I expected. If hasn't, what's the reason actually? Sent from the
GStreamer-devel mailing list archive at Nabble.com. _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Hi,Thornton, Keith.
You say that I should send EOS down the pipeline. But I'm encoding video with live camera source,not file. If I send EOS,whether it seems the pipeline is stopped or not. After sending the EOS, can I still use the pipe a few seconds later without shutting down this pipe?
I'm a new hand to Gstreamer.If you can provide some simple pseudo codes showing how the send the EOS without shutting down the pipe,I will be very pleased. Thank you all the same.
Sent from the GStreamer-devel mailing list archive at Nabble.com. _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Hi, if you want to flush all the buffers out of the Encoder so that the file has all the buffers you have sent, you have to send EOS otherwise
the encoder will keep some Reference frames. If you want to close the file, you can set the pipeline state to ready, assign a new file and then set the pipeline to playing again. Von: gstreamer-devel <[hidden email]>
Im Auftrag von surprised Hi,Thornton, Keith. You say that I should send EOS down the pipeline. But I'm encoding video with live camera source,not file. If I send EOS,whether it seems the pipeline is stopped or not. After sending the EOS, can I still use the pipe
a few seconds later without shutting down this pipe? I'm a new hand to Gstreamer.If you can provide some simple pseudo codes showing how the send the EOS without shutting down the pipe,I will be very pleased. Thank you all the same.
Sent from the
GStreamer-devel mailing list archive at Nabble.com. _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Hi,Thornton, Keith.
Did you mean that EOS can function as some flushing operation? Is there some specialized funciton that flushes all the buffers out of the Encoder? Because I've tried send the EOS,but it didn't work...
Sent from the GStreamer-devel mailing list archive at Nabble.com. _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
You could try sending flush_start followed by flush_stop. I haven’t tried it and don’t know how the encoder would react. A test application
in which you can try these things out is always useful. Von: gstreamer-devel <[hidden email]>
Im Auftrag von surprised Hi,Thornton, Keith. Did you mean that EOS can function as some flushing operation? Is there some specialized funciton that flushes all the buffers out of the Encoder? Because I've tried send the EOS,but it didn't work...
Sent from the
GStreamer-devel mailing list archive at Nabble.com. _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Hi,
it works now! I try to send EOS in both sender and receiver programs and I can get the full frames. In the past, I just try to send EOS only in sender,without receiver,so I cannot get the full frames.
Thank you for you patient help!
Sent from the GStreamer-devel mailing list archive at Nabble.com. _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
In reply to this post by Thornton, Keith
Hi,but now I encountered another peoblem:After I send the EOS,how can I continue push data into the pipeline?
It seems that once I send the EOS,then the pipeline stop to receive data into the pipe.
I want to achieve a situation:as to the sender, I use appsrc to input outsider data into the pipe and and
once every 200 frames are sended into appsrc,I send EOS,and at the same time I stop input data.After 10s,I start to input data again,but at that time,the pipe seems not going to receive data because the previous EOS signal.
What should I do to let the pipe receive data again without shutting down the pipe?
Sent from the GStreamer-devel mailing list archive at Nabble.com. _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Hi in this case EOS is not the correct solution. Maybe tell us a little more about what you are trying to do and what the pipelines look
like with which you are currently trying. Gruesse Von: gstreamer-devel <[hidden email]>
Im Auftrag von surprised Hi,but now I encountered another peoblem:After I send the EOS,how can I continue push data into the pipeline? It seems that once I send the EOS,then the pipeline stop to receive data into the pipe. I want to achieve a situation:as to the
sender, I use appsrc to input outsider data into the pipe and and once every 200 frames are sended into appsrc,I send EOS,and at the same time I stop input data.After 10s,I start to input data again,but at that time,the pipe seems not going to receive data
because the previous EOS signal. What should I do to let the pipe receive data again without shutting down the pipe?
Sent from the
GStreamer-devel mailing list archive at Nabble.com. _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |