Hi,
Been looking at converting VHS tapes into nice open digital media, using GStreamer naturally. However I'm having problems getting smooth recordings. I'm doing this on a Dual core Intel 3.06GHz with 4GB RAM running Fedora 16 (64bit) and using a Hauppauge Win/TV pci, Brooktree Corporation Bt878 Video Capture card. Using tvtime to watch videos works fine and I can capture video (and audio) using mencoder with the following: mencoder tv:// -tv driver=v4l2:device=/dev/video1:alsa:adevice=hw.1,1 -oac copy -ovc lavc -o video.avi and playback of the resultant video is smooth. However, I just can't get smooth video with GStreamer. E.g, using the following: gst-launch oggmux name=mux ! filesink location=vid.ogv v4l2src device=/dev/video1 ! videorate ! video/x-raw-yuv,width=320,height=240,framerate=25/1 ! ffmpegcolorspace ! queue ! theoraenc bitrate=800 ! queue ! mux. alsasrc buffer-time=100000 device=hw:1,1 ! audio/x-raw-int,channels=1,rate=119466 ! audioconvert ! queue ! vorbisenc ! mux. Works in as much as I get a Ogg Theora file that plays back and bits where there isn't a lot of movement look fine, however, scenes with a lot of (or not even that much) motion become choppy. Note: The above command was cobbled together by a lot of scouring the internet and trial and error. So I wouldn't be surprised if it's wrong in various ways. Any idea's would be appreciated. Cheers, Andrew _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
$ gst-launch-0.10 avimux name=mux ! filesink location=avcap.avi \ v4l2src device=/dev/video0 ! video/x-raw-yuv,width=320, height=240,framerate=\(fraction\)30000/1001 ! \ ffenc_mpeg4 ! queue ! mux. alsasrc device=hw:1,0 ! \ audio/x-raw-int,rate=32000,channels=2,depth=16 ! audioconvert ! lame ! mux. worked fine, with a SAA713x-based capture module, Sensoray Model 911 ( http://www.sensoray.com/products/911.htm ) > Hi, > > Been looking at converting VHS tapes into nice open digital media, > using GStreamer naturally. However I'm having problems getting smooth > recordings. > > I'm doing this on a Dual core Intel 3.06GHz with 4GB RAM running Fedora > 16 (64bit) and using a Hauppauge Win/TV pci, Brooktree Corporation > Bt878 Video Capture card. > > Using tvtime to watch videos works fine and I can capture video (and > audio) using mencoder with the following: > > mencoder tv:// -tv driver=v4l2:device=/dev/video1:alsa:adevice=hw.1,1 -oac > copy -ovc lavc -o video.avi > > and playback of the resultant video is smooth. > > > However, I just can't get smooth video with GStreamer. > > E.g, using the following: > > gst-launch oggmux name=mux ! filesink location=vid.ogv v4l2src > device=/dev/video1 ! videorate ! > video/x-raw-yuv,width=320,height=240,framerate=25/1 ! ffmpegcolorspace ! > queue ! theoraenc bitrate=800 ! queue ! mux. alsasrc buffer-time=100000 > device=hw:1,1 ! audio/x-raw-int,channels=1,rate=119466 ! audioconvert ! > queue ! vorbisenc ! mux. > > Works in as much as I get a Ogg Theora file that plays back and bits > where there isn't a lot of movement look fine, however, scenes with a > lot of (or not even that much) motion become choppy. > > Note: The above command was cobbled together by a lot of scouring the > internet and trial and error. So I wouldn't be surprised if it's wrong > in various ways. > > Any idea's would be appreciated. > > Cheers, > Andrew > _______________________________________________ > gstreamer-devel mailing list > [hidden email] > http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel > _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
In reply to this post by Andrew Clayton
On Wed, 2011-12-21 at 20:07 +0000, Andrew Clayton wrote:
> However, I just can't get smooth video with GStreamer. > > E.g, using the following: > > gst-launch oggmux name=mux ! filesink location=vid.ogv v4l2src device=/dev/video1 ! videorate ! video/x-raw-yuv,width=320,height=240,framerate=25/1 ! ffmpegcolorspace ! queue ! theoraenc bitrate=800 ! queue ! mux. alsasrc buffer-time=100000 device=hw:1,1 ! audio/x-raw-int,channels=1,rate=119466 ! audioconvert ! queue ! vorbisenc ! mux. > > Works in as much as I get a Ogg Theora file that plays back and bits > where there isn't a lot of movement look fine, however, scenes with a > lot of (or not even that much) motion become choppy. > > Note: The above command was cobbled together by a lot of scouring the > internet and trial and error. So I wouldn't be surprised if it's wrong > in various ways. > > Any idea's would be appreciated. Have you tried moving the first queue right after v4l2src, and making it larger or removing all of its limits? (Try queue max-size-buffers=0 max-size-time=0 max-size-bytes=0) It's quite small by default. I have a vague memory of theoraenc performing quite badly with lots of motion. Cheers -Tim _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
In reply to this post by Andrew Clayton
Hi, Hi Andrew, I do not think it is a v4l2 problem. theoraenc plugins by default drops frames when the bitrate is not enough. For a quick test why don't you increase your bitrate to say 5000 (just for a test of one file) and see if it still drops the frames. 5Mbps is waay to much for a 320x240 video sequence and hence if it was the encoder dropping it because bitrate wasn't enough you know you have found the problem.
eg. gst-launch oggmux name=mux ! filesink location=vid.ogv v4l2src device=/dev/video1 ! videorate ! video/x-raw-yuv,width=320,height=240,framerate=25/1 ! ffmpegcolorspace ! queue ! theoraenc bitrate=5000 ! queue ! mux. alsasrc buffer-time=100000 device=hw:1,1 ! audio/x-raw-int,channels=1,rate=119466 ! audioconvert ! queue ! vorbisenc ! mux. The solution is to set the property "drop-frames" to false in theoraenc] gst-launch oggmux name=mux ! filesink location=vid.ogv v4l2src device=/dev/video1 ! videorate ! video/x-raw-yuv,width=320,height=240,framerate=25/1 ! ffmpegcolorspace ! queue ! theoraenc bitrate=800 drop-frames=0 ! queue ! mux. alsasrc buffer-time=100000 device=hw:1,1 ! audio/x-raw-int,channels=1,rate=119466 ! audioconvert ! queue ! vorbisenc ! mux. This will reduce quality at the high motion frames but not drop them all together. To get best possible quality at that rate, I suggest you first capture as a YUV and then encode it using two passes. However it might not be an option if you do not have the disk space etc or for other reasons in which case the above should work.
_______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
In reply to this post by Tim-Philipp Müller-2
I found that you were talking about property "max-size-time"
Could you give me more details about how to use the property like "max-size-time","max-size-bytes" or "max-size-buffers"? I had a video decoder and audio decoder link with queue2, firstly I used command line to play a transport stream file, it did not work. After I adjust the those properties , it worked fine. but it still not work in my program I totally have no idea about the problem Could you give me some hint about it ? Thanks |
Free forum by Nabble | Edit this page |