<div dir="ltr"><div dir="ltr">seems to be the "interlace field-pattern=2:2" to generate the problem.</div><div dir="ltr"><br></div><div>without it video runs smooth on autovideosink (and audioaudiosink), but have to change decklink mode to mode=5 (sd pal 50p).</div><div><br></div><div>PS: in this case i have black and white images :-(<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 3 Apr 2019 at 19:14, Federico Allegretti <<a href="mailto:allegfede@gmail.com">allegfede@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>kind replay of Ray Tiley solved the issue.</div><div>I workaround also the interlace/progressive input problem looking the blackmagic forum for a my old post, so now the pipeline is (sd pal interlaced=decklink mode 3)</div><div>"uridecodebin uri=file://Path/of/video/file  name=decode decode. ! deinterlace ! autovideoconvert ! interlace field-pattern=2:2 ! videoconvert ! video/x-raw,format=UYVY ! videoscale ! video/x-raw,width=720,height=576 ! videorate ! video/x-raw,framerate=25/1 ! decklinkvideosink mode=3 decode. ! audioconvert !  audio/x-raw, format=S32LE, channels=2 ! audioresample ! decklinkaudiosink"</div><div><br></div><div>and is quite perfect, but i have some problems with (at most) mpeg2 videos.</div><div><br></div><div>Some will be played with accelerated video (audio is normal and duration is calculated well).</div><div>If i transcode them to mpeg4 with a simple <br></div><div>ffmpeg -i accelerated_video_clip.mpg  ok_video.mp4</div><div>pipeline plays well.</div><div><br></div><div>ffmpe probe for the BAD video says:</div><div>Duration: 00:00:42.26, start: 0.270000, bitrate: 6041 kb/s<br>    Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p(tv, bottom first), 720x576 [SAR 16:15 DAR 4:3], 25 fps, 25 tbr, 90k tbn, 50 tbc<br>    Stream #0:1[0x1c0]: Audio: mp2, 48000 Hz, stereo, s16p, 224 kb/s<br></div><div><br></div><div>and media info says:</div><div>General<br>Complete name                            : /home/v1p3r/Video/temp/spot_i_miei_diritti_video_accelerato.mpg<br>Format                                   : MPEG-PS<br>File size                                : 30.4 MiB<br>Duration                                 : 42 s 264 ms<br>Overall bit rate mode                    : Variable<br>Overall bit rate                         : 6 041 kb/s<br><br>Video<br>ID                                       : 224 (0xE0)<br>Format                                   : MPEG Video<br>Format version                           : Version 2<br>Format profile                           : Main@Main<br>Format settings                          : BVOP<br>Format settings, BVOP                    : Yes<br>Format settings, Matrix                  : Default<br>Format settings, GOP                     : Variable<br>Duration                                 : 42 s 200 ms<br>Bit rate mode                            : Variable<br>Bit rate                                 : 5 697 kb/s<br>Maximum bit rate                         : 9 500 kb/s<br>Width                                    : 720 pixels<br>Height                                   : 576 pixels<br>Display aspect ratio                     : 4:3<br>Frame rate                               : 25.000 FPS<br>Standard                                 : PAL<br>Color space                              : YUV<br>Chroma subsampling                       : 4:2:0<br>Bit depth                                : 8 bits<br>Scan type                                : Progressive<br>Scan order                               : Bottom Field First<br>Compression mode                         : Lossy<br>Bits/(Pixel*Frame)                       : 0.549<br>Time code of first frame                 : 00:00:00:00<br>Time code source                         : Group of pictures header<br>GOP, Open/Closed                         : Closed<br>Stream size                              : 28.7 MiB (94%)<br><br>Audio<br>ID                                       : 192 (0xC0)<br>Format                                   : MPEG Audio<br>Format version                           : Version 1<br>Format profile                           : Layer 2<br>Duration                                 : 42 s 264 ms<br>Bit rate mode                            : Constant<br>Bit rate                                 : 224 kb/s<br>Channel(s)                               : 2 channels<br>Sampling rate                            : 48.0 kHz<br>Frame rate                               : 41.667 FPS (1152 SPF)<br>Compression mode                         : Lossy<br>Stream size                              : 1.13 MiB (4%)<br></div><div><br></div><div>for a working mpeg 2<br></div><div>ffprobe says:</div><div>Duration: 00:00:35.76, start: 0.270000, bitrate: 5937 kb/s<br>    Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p(tv, bottom first), 720x576 [SAR 16:15 DAR 4:3], 25 fps, 25 tbr, 90k tbn, 50 tbc<br>    Stream #0:1[0x1c0]: Audio: mp2, 48000 Hz, stereo, s16p, 224 kb/s</div><div><br></div><div>media info:</div><div>General<br>Complete name                            : /home/v1p3r/Video/temp/spot_linea_verde_febbraio_2014_ok.mpg<br>Format                                   : MPEG-PS<br>File size                                : 25.3 MiB<br>Duration                                 : 35 s 784 ms<br>Overall bit rate mode                    : Variable<br>Overall bit rate                         : 5 934 kb/s<br><br>Video<br>ID                                       : 224 (0xE0)<br>Format                                   : MPEG Video<br>Format version                           : Version 2<br>Format profile                           : Main@Main<br>Format settings                          : BVOP<br>Format settings, BVOP                    : Yes<br>Format settings, Matrix                  : Default<br>Format settings, GOP                     : M=3, N=12<br>Duration                                 : 35 s 720 ms<br>Bit rate mode                            : Variable<br>Bit rate                                 : 5 592 kb/s<br>Maximum bit rate                         : 9 500 kb/s<br>Width                                    : 720 pixels<br>Height                                   : 576 pixels<br>Display aspect ratio                     : 4:3<br>Frame rate                               : 25.000 FPS<br>Standard                                 : PAL<br>Color space                              : YUV<br>Chroma subsampling                       : 4:2:0<br>Bit depth                                : 8 bits<br>Scan type                                : Progressive<br>Scan order                               : Bottom Field First<br>Compression mode                         : Lossy<br>Bits/(Pixel*Frame)                       : 0.539<br>Time code of first frame                 : 00:00:00:00<br>Time code source                         : Group of pictures header<br>GOP, Open/Closed                         : Closed<br>Stream size                              : 23.8 MiB (94%)<br><br>Audio<br>ID                                       : 192 (0xC0)<br>Format                                   : MPEG Audio<br>Format version                           : Version 1<br>Format profile                           : Layer 2<br>Duration                                 : 35 s 784 ms<br>Bit rate mode                            : Constant<br>Bit rate                                 : 224 kb/s<br>Channel(s)                               : 2 channels<br>Sampling rate                            : 48.0 kHz<br>Frame rate                               : 41.667 FPS (1152 SPF)<br>Compression mode                         : Lossy<br>Stream size                              : 978 KiB (4%)<br><br></div><div>This will appen also with autoaudiosink and autovideosink. Accelerated video.</div><div>Seems the problem disappear if i remove the deinterlace/interlace filters (but now do not play on declink):</div><div>gst-launch-1.0  uridecodebin uri=file:///path/to/acceleratedvideo.mpg name=decode decode. ! autovideoconvert !  videoconvert ! video/x-raw,format=UYVY ! videoscale ! video/x-raw,width=720,height=576 ! videorate ! autovideosink decode. ! audioconvert ! audioresample! autoaudiosink<br></div><div><br></div></div></div></div></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 2 Apr 2019 at 19:05, Federico Allegretti <<a href="mailto:allegfede@gmail.com" target="_blank">allegfede@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div></div><div>hello, searching the net, seeking a way to playback my digital video files out of a black magic video card (i got an intensity pro),  i found this pipeline to work for most of my video files:</div><div>gst-launch-1.0 uridecodebin uri=file:///mnt/nas/postion/of/th/file.extenision name=decode decode. ! interlace field-pattern=1 ! videoconvert ! video/x-raw,format=UYVY ! videoscale ! video/x-raw,width=720,height=576 ! videorate ! video/x-raw,framerate=25/1 ! decklinkvideosink mode=3 decode. ! audioconvert ! decklinkaudiosink<br><br></div><div>PS: mode=3 stands for PAL SD 50i as i whant the card to play content out of the composite cideo connector.</div><div><br></div><div>This works quite well, but with some file  playback do not occours.</div><div><br></div><div>for example, with a file shot by cell phone i got no problem (those are stats by ffmpeg):</div><div>h264 (Baseline) (avc1 / 0x31637661), yuv420p(tv, bt709), 1280x720, 13976 kb/s, SAR 1:1 DAR 16:9, 15.03 fps, 15 tbr, 90k tbn, 180k tbc (default)<br>Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 156 kb/s (default)</div><div><br></div><div>but with another edited with pinnacle studio (stats by ffmpeg):</div><div>Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 2024 kb/s, 25 fps, 25 tbr, 25k tbn, 50 tbc (default)</div><div>Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)<br><br></div><div></div><div>i got this error:</div><div><br></div><div>ERRORE: dall'elemento /GstPipeline:pipeline0/GstURIDecodeBin:decode/GstDecodeBin:decodebin0/GstQTDemux:qtdemux0: Internal data stream error.<br>Informazioni di debug aggiuntive:<br>qtdemux.c(6073): gst_qtdemux_loop (): /GstPipeline:pipeline0/GstURIDecodeBin:decode/GstDecodeBin:decodebin0/GstQTDemux:qtdemux0:<br>streaming stopped, reason not-negotiated (-4)<br>ERRORE: la pipeline non vuole fare il preroll.<br>Impostazione della pipeline a NULL ...<br>Esecuzione di free sulla pipeline...<br><br></div><div>I suppose that the problem could be the samplerate, so i resampled the audio in this way:</div><div>ffmpeg -i grand_prix_casagrande.mp4 -vcodec copy -acodec aac -ar 48000 -ab 128000 -ac 2 grand_prix_casagrande_48.mp4</div><div><br></div><div>and now the new file could be played back.</div><div><br></div><div>My question now is: There is a way to make the resample AT RUNTIME (and maybe only if needed)?</div><div><br></div><div>Thanks a lot,</div><div><br></div><div>Federico<br></div><div><br>-- <br><div dir="ltr" class="gmail-m_-8369521026582944516gmail-m_-2804440384677242387gmail-m_-4620848940248736416gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">Sourceforge: <a href="https://sourceforge.net/u/allegfede/" target="_blank">https://sourceforge.net/u/allegfede/</a><br><div><br>YouTube Channel: <a href="https://www.youtube.com/c/v1p3rslab" target="_blank">https://www.youtube.com/c/v1p3rslab</a><br><br>VIMEO HD videos: <a href="http://www.vimeo.com/user1912745/videos" target="_blank">http://www.vimeo.com/user1912745/videos</a></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail-m_-8369521026582944516gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">Sourceforge: <a href="https://sourceforge.net/u/allegfede/" target="_blank">https://sourceforge.net/u/allegfede/</a><br><div><br>YouTube Channel: <a href="https://www.youtube.com/c/v1p3rslab" target="_blank">https://www.youtube.com/c/v1p3rslab</a><br><br>VIMEO HD videos: <a href="http://www.vimeo.com/user1912745/videos" target="_blank">http://www.vimeo.com/user1912745/videos</a></div></div></div></div></div></div></div>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">Sourceforge: <a href="https://sourceforge.net/u/allegfede/" target="_blank">https://sourceforge.net/u/allegfede/</a><br><div><br>YouTube Channel: <a href="https://www.youtube.com/c/v1p3rslab" target="_blank">https://www.youtube.com/c/v1p3rslab</a><br><br>VIMEO HD videos: <a href="http://www.vimeo.com/user1912745/videos" target="_blank">http://www.vimeo.com/user1912745/videos</a></div></div></div></div></div></div></div>