Difference between revisions of "User:StasFomin/GstreamerTranslation"
(→Sample 03) |
(→Sample 11) |
||
(12 intermediate revisions by the same user not shown) | |||
Line 71: | Line 71: | ||
[[File:stas-gst-sample-03.svg|800px]] | [[File:stas-gst-sample-03.svg|800px]] | ||
+ | |||
+ | === Sample 04 === | ||
+ | Помощь от gmelnikov | ||
+ | |||
+ | <pre> | ||
+ | gst-launch hdv1394src \ | ||
+ | ! tsdemux name=dem \ | ||
+ | ! queue \ | ||
+ | ! ac3parse \ | ||
+ | ! a52dec \ | ||
+ | ! audioconvert \ | ||
+ | ! audioresample \ | ||
+ | ! flvmux streamable=1 name=mux \ | ||
+ | dem. \ | ||
+ | ! queue \ | ||
+ | ! mpegvideoparse \ | ||
+ | ! mpeg2dec \ | ||
+ | ! x264enc bitrate=768 tune=zerolatency pass=17 \ | ||
+ | ! mux. mux. ! filesink location="out.flv" | ||
+ | </pre> | ||
+ | |||
+ | [[File:stas-gst-sample-04.svg|800px]] | ||
+ | |||
+ | Вариант, который можно тестировать на тестовом входном файле | ||
+ | https://cloud.mail.ru/public/2KtUehQBJLx2/mydump.ts | ||
+ | |||
+ | <pre> | ||
+ | gst-launch filesrc location="mydump.ts" \ | ||
+ | ! tsdemux name=dem \ | ||
+ | ! queue \ | ||
+ | ! ac3parse \ | ||
+ | ! a52dec \ | ||
+ | ! audioconvert \ | ||
+ | ! audioresample \ | ||
+ | ! flvmux streamable=1 name=mux \ | ||
+ | dem. \ | ||
+ | ! queue \ | ||
+ | ! mpegvideoparse \ | ||
+ | ! mpeg2dec \ | ||
+ | ! x264enc bitrate=768 tune=zerolatency pass=17 \ | ||
+ | ! mux. mux. ! filesink location="out.flv" | ||
+ | </pre> | ||
+ | |||
+ | === Sample 05 === | ||
+ | Проверенный работающий пример от gmelnikov. | ||
+ | |||
+ | Пытался запустить на своем тестовом | ||
+ | https://cloud.mail.ru/public/2KtUehQBJLx2/mydump.ts | ||
+ | |||
+ | Версия 0.10 зафейлилась | ||
+ | <pre> | ||
+ | gst-launch-0.10 \ | ||
+ | filesrc location=mydump.ts \ | ||
+ | ! tsdemux name=dem \ | ||
+ | ! queue \ | ||
+ | ! ac3parse \ | ||
+ | ! a52dec \ | ||
+ | ! audioconvert \ | ||
+ | ! audioresample \ | ||
+ | ! flvmux streamable=1 name=mux \ | ||
+ | dem. \ | ||
+ | ! queue \ | ||
+ | ! mpegvideoparse \ | ||
+ | ! mpeg2dec \ | ||
+ | ! x264enc bitrate=768 tune=zerolatency pass=17 ! \ | ||
+ | mux. mux.! \ | ||
+ | filesink location=test.flv | ||
+ | </pre> | ||
+ | |||
+ | Получил ошибки | ||
+ | <pre> | ||
+ | No accelerated IMDCT transform found | ||
+ | Подготовка конвейера (PREROLL)... | ||
+ | 0:00:00.039853666 14497 0x1cb20f0 WARN mpegtsbase mpegtsbase.c:843:mpegts_base_apply_pmt: Got pmt without pat first. Returning | ||
+ | 0:00:00.039918622 14497 0x1cb20f0 WARN mpegtsbase mpegtsbase.c:961:mpegts_base_handle_psi:<dem> bad crc in psi pid 0x810 | ||
+ | 0:00:00.040253360 14497 0x1cb20f0 WARN mpegtsbase mpegtsbase.c:961:mpegts_base_handle_psi:<dem> bad crc in psi pid 0x814 | ||
+ | 0:00:00.040726205 14497 0x1cb20f0 WARN mpegtsbase mpegtsbase.c:961:mpegts_base_handle_psi:<dem> bad crc in psi pid 0x810 | ||
+ | 0:00:00.040803007 14497 0x1cb20f0 WARN mpegtsbase mpegtsbase.c:961:mpegts_base_handle_psi:<dem> bad crc in psi pid 0x814 | ||
+ | 0:00:00.041350560 14497 0x1cb20f0 WARN mpegtsbase mpegtsbase.c:961:mpegts_base_handle_psi:<dem> bad crc in psi pid 0x814 | ||
+ | 0:00:00.041469962 14497 0x1cb20f0 WARN mpegtsbase mpegtsbase.c:961:mpegts_base_handle_psi:<dem> bad crc in psi pid 0x810 | ||
+ | 0:00:00.041866178 14497 0x1cb20f0 WARN mpegtsbase mpegtsbase.c:961:mpegts_base_handle_psi:<dem> bad crc in psi pid 0x814 | ||
+ | 0:00:00.043802936 14497 0x1cb20f0 ERROR mpegtsbase mpegtsbase.c:895:mpegts_base_apply_pmt: Attempted to apply a PMT on a program that wasn't created | ||
+ | 0:00:00.049958082 14497 0x1cb20f0 WARN mpegtsbase mpegtsbase.c:1409:mpegts_base_loop:<dem> error: Внутренняя ошибка потока данных. | ||
+ | 0:00:00.050013169 14497 0x1cb20f0 WARN mpegtsbase mpegtsbase.c:1409:mpegts_base_loop:<dem> error: stream stopped, reason error | ||
+ | ОШИБКА: из элемента /GstPipeline:pipeline0/GstTSDemux:dem: Внутренняя ошибка потока данных. | ||
+ | Дополнительная отладочная информация: | ||
+ | mpegtsbase.c(1409): mpegts_base_loop (): /GstPipeline:pipeline0/GstTSDemux:dem: | ||
+ | stream stopped, reason error | ||
+ | ОШИБКА: конвейер не хочет подготавливаться (PREROLL). | ||
+ | Установка конвейера в состояние NULL... | ||
+ | Освобождение конвейера... | ||
+ | </pre> | ||
+ | |||
+ | Версия 1.0 не упала, | ||
+ | <pre> | ||
+ | gst-launch-1.0 \ | ||
+ | filesrc location=mydump.ts \ | ||
+ | ! tsdemux name=dem \ | ||
+ | ! queue \ | ||
+ | ! ac3parse \ | ||
+ | ! a52dec \ | ||
+ | ! audioconvert \ | ||
+ | ! audioresample \ | ||
+ | ! flvmux streamable=1 name=mux \ | ||
+ | dem. \ | ||
+ | ! queue \ | ||
+ | ! mpegvideoparse \ | ||
+ | ! mpeg2dec \ | ||
+ | ! x264enc bitrate=768 tune=zerolatency pass=17 ! \ | ||
+ | mux. mux.! \ | ||
+ | filesink location=test.flv | ||
+ | </pre> | ||
+ | |||
+ | но тестовый файл пустой. | ||
+ | |||
+ | Та же фигня с графом — звук из TS не идет в FLV | ||
+ | |||
+ | [[File:stas-gst-sample-05.svg|800px]] | ||
+ | |||
+ | === Sample 06 === | ||
+ | <pre> | ||
+ | gst-launch filesrc location="mydump.ts" \ | ||
+ | ! tsdemux name=dem \ | ||
+ | ! queue \ | ||
+ | ! decodebin \ | ||
+ | ! audioconvert \ | ||
+ | ! audioresample \ | ||
+ | ! flvmux streamable=1 name=mux \ | ||
+ | dem. \ | ||
+ | ! queue \ | ||
+ | ! mpegvideoparse \ | ||
+ | ! mpeg2dec \ | ||
+ | ! x264enc bitrate=768 tune=zerolatency pass=17 \ | ||
+ | ! mux. mux. ! filesink location="out.flv" | ||
+ | </pre> | ||
+ | |||
+ | Воткнул сильнодействующий decodebin — появился ненулевой выходной файл. | ||
+ | |||
+ | |||
+ | === Sample 07 === | ||
+ | |||
+ | Простейший сплиттинг работает, если не забыть проложится очередями. | ||
+ | <pre> | ||
+ | gst-launch filesrc location="mydump.ts" \ | ||
+ | ! tee name="srctee" \ | ||
+ | ! queue \ | ||
+ | ! filesink location="out1.ts" \ | ||
+ | srctee. \ | ||
+ | ! queue \ | ||
+ | ! filesink location="out2.ts" | ||
+ | </pre> | ||
+ | |||
+ | === Sample 08 === | ||
+ | А вот сплиттинг с вышедобавленной перепаковкой какогото хрена не работает. | ||
+ | <pre> | ||
+ | gst-launch filesrc location="mydump.ts" \ | ||
+ | ! tee name="srctee" \ | ||
+ | ! queue \ | ||
+ | ! filesink location="out.ts" \ | ||
+ | srctee. \ | ||
+ | ! queue \ | ||
+ | ! tsdemux name=dem \ | ||
+ | ! queue \ | ||
+ | ! decodebin \ | ||
+ | ! audioconvert \ | ||
+ | ! audioresample \ | ||
+ | ! flvmux streamable=1 name=mux \ | ||
+ | dem. \ | ||
+ | ! queue \ | ||
+ | ! mpegvideoparse \ | ||
+ | ! mpeg2dec \ | ||
+ | ! x264enc bitrate=768 tune=zerolatency pass=17 \ | ||
+ | ! mux. \ | ||
+ | mux. ! filesink location="out.flv" | ||
+ | </pre> | ||
+ | |||
+ | |||
+ | === Sample 09 === | ||
+ | И даже не работает тупейший сплиттинг — я точно не понимаю чего-то важного. | ||
+ | <pre> | ||
+ | gst-launch filesrc location="mydump.ts" \ | ||
+ | ! tee name="srctee" \ | ||
+ | ! queue \ | ||
+ | ! filesink location="out.ts" \ | ||
+ | srctee. \ | ||
+ | ! queue \ | ||
+ | ! decodebin \ | ||
+ | ! autovideosink | ||
+ | </pre> | ||
+ | |||
+ | Граф выглядит графом здорового человека | ||
+ | |||
+ | [[File:stas-gst-sample-09.svg|800px]] | ||
+ | |||
+ | === Sample 10 === | ||
+ | |||
+ | <pre> | ||
+ | gst-launch-1.0 filesrc location="mydump.ts" \ | ||
+ | ! tee name=srctee \ | ||
+ | ! queue \ | ||
+ | ! filesink location=out.ts async=0 \ | ||
+ | srctee. \ | ||
+ | ! queue \ | ||
+ | ! tsdemux name=dem \ | ||
+ | ! queue \ | ||
+ | ! mad \ | ||
+ | ! audioconvert \ | ||
+ | ! audioresample \ | ||
+ | ! voaacenc bitrate=64 ! audio/mpeg,rate=22050,channels=2 \ | ||
+ | ! flvmux streamable=1 name=mux \ | ||
+ | dem. \ | ||
+ | ! queue \ | ||
+ | ! mpegvideoparse \ | ||
+ | ! mpeg2dec \ | ||
+ | ! x264enc bitrate=768 tune=zerolatency pass=17 \ | ||
+ | ! mux. mux.! \ | ||
+ | filesink location=test.flv async=0 | ||
+ | </pre> | ||
+ | |||
+ | Ругань | ||
+ | <pre> | ||
+ | etting pipeline to PAUSED ... | ||
+ | Pipeline is PREROLLED ... | ||
+ | Setting pipeline to PLAYING ... | ||
+ | 0:00:00.035578290 11049 0xff7540 WARN basesrc gstbasesrc.c:2865:gst_base_src_loop:<filesrc0> error: Internal data flow error. | ||
+ | 0:00:00.035624372 11049 0xff7540 WARN basesrc gstbasesrc.c:2865:gst_base_src_loop:<filesrc0> error: streaming task paused, reason not-negotiated (-4) | ||
+ | New clock: GstSystemClock | ||
+ | ERROR: from element /GstPipeline:pipeline0/GstFileSrc:filesrc0: Internal data flow error. | ||
+ | Additional debug info: | ||
+ | gstbasesrc.c(2865): gst_base_src_loop (): /GstPipeline:pipeline0/GstFileSrc:filesrc0: | ||
+ | streaming task paused, reason not-negotiated (-4) | ||
+ | Execution ended after 0:00:00.001247587 | ||
+ | Setting pipeline to PAUSED ... | ||
+ | Setting pipeline to READY ... | ||
+ | Setting pipeline to NULL ... | ||
+ | Freeing pipeline ... | ||
+ | </pre> | ||
+ | |||
+ | |||
+ | === Sample 11 === | ||
+ | |||
+ | <pre> | ||
+ | gst-launch-1.0 videotestsrc ! queue ! x264enc bitrate=700 tune=zerolatency pass=17 ! avimux name=mux audiotestsrc ! audioconvert ! wavenc ! mux. mux. ! filesink testavi.avi | ||
+ | </pre> | ||
+ | |||
+ | == Misc == | ||
+ | === gst-inspect hdv1394src === | ||
+ | <pre> | ||
+ | Factory Details: | ||
+ | Rank none (0) | ||
+ | Long-name Firewire (1394) HDV video source | ||
+ | Klass Source/Video | ||
+ | Description Source for MPEG-TS video data from firewire port | ||
+ | Author Edward Hervey <bilboed@bilboed.com> | ||
+ | |||
+ | Plugin Details: | ||
+ | Name 1394 | ||
+ | Description Source for video data via IEEE1394 interface | ||
+ | Filename /usr/lib64/gstreamer-1.0/libgst1394.so | ||
+ | Version 1.2.4 | ||
+ | License LGPL | ||
+ | Source module gst-plugins-good | ||
+ | Source release date 2014-04-18 | ||
+ | Binary package ROSA Desktop Fresh R4 gstreamer1.0-plugins-good package | ||
+ | Origin URL http://www.rosalab.ru/ | ||
+ | |||
+ | GObject | ||
+ | +----GInitiallyUnowned | ||
+ | +----GstObject | ||
+ | +----GstElement | ||
+ | +----GstBaseSrc | ||
+ | +----GstPushSrc | ||
+ | +----GstHDV1394Src | ||
+ | |||
+ | Implemented Interfaces: | ||
+ | GstURIHandler | ||
+ | |||
+ | Pad Templates: | ||
+ | SRC template: 'src' | ||
+ | Availability: Always | ||
+ | Capabilities: | ||
+ | video/mpegts | ||
+ | systemstream: true | ||
+ | packetsize: 188 | ||
+ | |||
+ | |||
+ | Element Flags: | ||
+ | no flags set | ||
+ | |||
+ | Element Implementation: | ||
+ | Has change_state() function: gst_base_src_change_state | ||
+ | |||
+ | Element has no clocking capabilities. | ||
+ | Element has no indexing capabilities. | ||
+ | |||
+ | URI handling capabilities: | ||
+ | Element can act as source. | ||
+ | Supported URI protocols: | ||
+ | hdv | ||
+ | |||
+ | Pads: | ||
+ | SRC: 'src' | ||
+ | Implementation: | ||
+ | Has getrangefunc(): gst_base_src_getrange | ||
+ | Has custom eventfunc(): gst_base_src_event | ||
+ | Has custom queryfunc(): gst_base_src_query | ||
+ | Pad Template: 'src' | ||
+ | |||
+ | Element Properties: | ||
+ | name : The name of the object | ||
+ | flags: readable, writable | ||
+ | String. Default: "hdv1394src0" | ||
+ | parent : The parent of the object | ||
+ | flags: readable, writable | ||
+ | Object of type "GstObject" | ||
+ | blocksize : Size in bytes to read per buffer (-1 = default) | ||
+ | flags: readable, writable | ||
+ | Unsigned Integer. Range: 0 - 4294967295 Default: 4096 | ||
+ | num-buffers : Number of buffers to output before sending EOS (-1 = unlimited) | ||
+ | flags: readable, writable | ||
+ | Integer. Range: -1 - 2147483647 Default: -1 | ||
+ | typefind : Run typefind before negotiating | ||
+ | flags: readable, writable | ||
+ | Boolean. Default: false | ||
+ | do-timestamp : Apply current stream time to buffers | ||
+ | flags: readable, writable | ||
+ | Boolean. Default: false | ||
+ | port : Port number (-1 automatic) | ||
+ | flags: readable, writable | ||
+ | Integer. Range: -1 - 16 Default: -1 | ||
+ | channel : Channel number for listening | ||
+ | flags: readable, writable | ||
+ | Integer. Range: 0 - 64 Default: 63 | ||
+ | use-avc : Use AV/C VTR control | ||
+ | flags: readable, writable | ||
+ | Boolean. Default: true | ||
+ | guid : select one of multiple DV devices by its GUID. use a hexadecimal like 0xhhhhhhhhhhhhhhhh. (0 = no guid) | ||
+ | flags: readable, writable | ||
+ | Unsigned Integer64. Range: 0 - 18446744073709551615 Default: 0 | ||
+ | device-name : user-friendly name of the device | ||
+ | flags: readable | ||
+ | String. Default: "Default" | ||
+ | </pre> |
Latest revision as of 01:21, 24 April 2015
gst-launch hdv1394src ! queue ! decodebin name=d ! queue ! xvimagesink d. ! queue ! alsasink
— Работает, показывает.
Надо задемуксить, и собрать FLV-поток в RTMP.
Путаюсь в mux-demux синтаксисе.
Contents
Sample 01
Без звука уже получается... осталось засунуть звук
gst-launch-1.0 -v \ hdv1394src \ ! queue \ ! tsdemux name=demux\ ! queue \ ! mpeg2dec \ ! queue \ ! x264enc bitrate=700 tune=zerolatency pass=17 \ ! queue \ ! flvmux streamable=1 name=mux \ ! fakesinc
Sample 02
Вот тут я считал, что demux. в предпоследней строчке даст аудиопоток, который придет в flvmux. Но по графу, видно, что не пришел, т.е. «demux.» ссылка почему-то не работает..
gst-launch-1.0 -v \ hdv1394src \ ! queue \ ! tsdemux name=demux\ ! queue \ ! mpeg2dec \ ! queue \ ! x264enc bitrate=700 tune=zerolatency pass=17 \ ! queue \ ! flvmux streamable=1 name=mux \ ! filesink location="output.flv" \ demux. ! audioresample ! voaacenc bitrate=64 \ ! mux.
Sample 03
Попытки указать порт для звука (с видео все и так вроде отлично) не помогают.
gst-launch-1.0 -v \ filesrc location=mydump.ts \ ! queue \ ! tsdemux name=demux\ ! queue \ ! mpeg2dec \ ! queue \ ! x264enc bitrate=700 tune=zerolatency pass=17 \ ! queue \ ! flvmux streamable=1 name=mux \ ! fakesink \ demux.audio_0814 ! audioresample ! voaacenc bitrate=64 \ ! mux.
Sample 04
Помощь от gmelnikov
gst-launch hdv1394src \ ! tsdemux name=dem \ ! queue \ ! ac3parse \ ! a52dec \ ! audioconvert \ ! audioresample \ ! flvmux streamable=1 name=mux \ dem. \ ! queue \ ! mpegvideoparse \ ! mpeg2dec \ ! x264enc bitrate=768 tune=zerolatency pass=17 \ ! mux. mux. ! filesink location="out.flv"
Вариант, который можно тестировать на тестовом входном файле https://cloud.mail.ru/public/2KtUehQBJLx2/mydump.ts
gst-launch filesrc location="mydump.ts" \ ! tsdemux name=dem \ ! queue \ ! ac3parse \ ! a52dec \ ! audioconvert \ ! audioresample \ ! flvmux streamable=1 name=mux \ dem. \ ! queue \ ! mpegvideoparse \ ! mpeg2dec \ ! x264enc bitrate=768 tune=zerolatency pass=17 \ ! mux. mux. ! filesink location="out.flv"
Sample 05
Проверенный работающий пример от gmelnikov.
Пытался запустить на своем тестовом https://cloud.mail.ru/public/2KtUehQBJLx2/mydump.ts
Версия 0.10 зафейлилась
gst-launch-0.10 \ filesrc location=mydump.ts \ ! tsdemux name=dem \ ! queue \ ! ac3parse \ ! a52dec \ ! audioconvert \ ! audioresample \ ! flvmux streamable=1 name=mux \ dem. \ ! queue \ ! mpegvideoparse \ ! mpeg2dec \ ! x264enc bitrate=768 tune=zerolatency pass=17 ! \ mux. mux.! \ filesink location=test.flv
Получил ошибки
No accelerated IMDCT transform found Подготовка конвейера (PREROLL)... 0:00:00.039853666 14497 0x1cb20f0 WARN mpegtsbase mpegtsbase.c:843:mpegts_base_apply_pmt: Got pmt without pat first. Returning 0:00:00.039918622 14497 0x1cb20f0 WARN mpegtsbase mpegtsbase.c:961:mpegts_base_handle_psi:<dem> bad crc in psi pid 0x810 0:00:00.040253360 14497 0x1cb20f0 WARN mpegtsbase mpegtsbase.c:961:mpegts_base_handle_psi:<dem> bad crc in psi pid 0x814 0:00:00.040726205 14497 0x1cb20f0 WARN mpegtsbase mpegtsbase.c:961:mpegts_base_handle_psi:<dem> bad crc in psi pid 0x810 0:00:00.040803007 14497 0x1cb20f0 WARN mpegtsbase mpegtsbase.c:961:mpegts_base_handle_psi:<dem> bad crc in psi pid 0x814 0:00:00.041350560 14497 0x1cb20f0 WARN mpegtsbase mpegtsbase.c:961:mpegts_base_handle_psi:<dem> bad crc in psi pid 0x814 0:00:00.041469962 14497 0x1cb20f0 WARN mpegtsbase mpegtsbase.c:961:mpegts_base_handle_psi:<dem> bad crc in psi pid 0x810 0:00:00.041866178 14497 0x1cb20f0 WARN mpegtsbase mpegtsbase.c:961:mpegts_base_handle_psi:<dem> bad crc in psi pid 0x814 0:00:00.043802936 14497 0x1cb20f0 ERROR mpegtsbase mpegtsbase.c:895:mpegts_base_apply_pmt: Attempted to apply a PMT on a program that wasn't created 0:00:00.049958082 14497 0x1cb20f0 WARN mpegtsbase mpegtsbase.c:1409:mpegts_base_loop:<dem> error: Внутренняя ошибка потока данных. 0:00:00.050013169 14497 0x1cb20f0 WARN mpegtsbase mpegtsbase.c:1409:mpegts_base_loop:<dem> error: stream stopped, reason error ОШИБКА: из элемента /GstPipeline:pipeline0/GstTSDemux:dem: Внутренняя ошибка потока данных. Дополнительная отладочная информация: mpegtsbase.c(1409): mpegts_base_loop (): /GstPipeline:pipeline0/GstTSDemux:dem: stream stopped, reason error ОШИБКА: конвейер не хочет подготавливаться (PREROLL). Установка конвейера в состояние NULL... Освобождение конвейера...
Версия 1.0 не упала,
gst-launch-1.0 \ filesrc location=mydump.ts \ ! tsdemux name=dem \ ! queue \ ! ac3parse \ ! a52dec \ ! audioconvert \ ! audioresample \ ! flvmux streamable=1 name=mux \ dem. \ ! queue \ ! mpegvideoparse \ ! mpeg2dec \ ! x264enc bitrate=768 tune=zerolatency pass=17 ! \ mux. mux.! \ filesink location=test.flv
но тестовый файл пустой.
Та же фигня с графом — звук из TS не идет в FLV
Sample 06
gst-launch filesrc location="mydump.ts" \ ! tsdemux name=dem \ ! queue \ ! decodebin \ ! audioconvert \ ! audioresample \ ! flvmux streamable=1 name=mux \ dem. \ ! queue \ ! mpegvideoparse \ ! mpeg2dec \ ! x264enc bitrate=768 tune=zerolatency pass=17 \ ! mux. mux. ! filesink location="out.flv"
Воткнул сильнодействующий decodebin — появился ненулевой выходной файл.
Sample 07
Простейший сплиттинг работает, если не забыть проложится очередями.
gst-launch filesrc location="mydump.ts" \ ! tee name="srctee" \ ! queue \ ! filesink location="out1.ts" \ srctee. \ ! queue \ ! filesink location="out2.ts"
Sample 08
А вот сплиттинг с вышедобавленной перепаковкой какогото хрена не работает.
gst-launch filesrc location="mydump.ts" \ ! tee name="srctee" \ ! queue \ ! filesink location="out.ts" \ srctee. \ ! queue \ ! tsdemux name=dem \ ! queue \ ! decodebin \ ! audioconvert \ ! audioresample \ ! flvmux streamable=1 name=mux \ dem. \ ! queue \ ! mpegvideoparse \ ! mpeg2dec \ ! x264enc bitrate=768 tune=zerolatency pass=17 \ ! mux. \ mux. ! filesink location="out.flv"
Sample 09
И даже не работает тупейший сплиттинг — я точно не понимаю чего-то важного.
gst-launch filesrc location="mydump.ts" \ ! tee name="srctee" \ ! queue \ ! filesink location="out.ts" \ srctee. \ ! queue \ ! decodebin \ ! autovideosink
Граф выглядит графом здорового человека
Sample 10
gst-launch-1.0 filesrc location="mydump.ts" \ ! tee name=srctee \ ! queue \ ! filesink location=out.ts async=0 \ srctee. \ ! queue \ ! tsdemux name=dem \ ! queue \ ! mad \ ! audioconvert \ ! audioresample \ ! voaacenc bitrate=64 ! audio/mpeg,rate=22050,channels=2 \ ! flvmux streamable=1 name=mux \ dem. \ ! queue \ ! mpegvideoparse \ ! mpeg2dec \ ! x264enc bitrate=768 tune=zerolatency pass=17 \ ! mux. mux.! \ filesink location=test.flv async=0
Ругань
etting pipeline to PAUSED ... Pipeline is PREROLLED ... Setting pipeline to PLAYING ... 0:00:00.035578290 11049 0xff7540 WARN basesrc gstbasesrc.c:2865:gst_base_src_loop:<filesrc0> error: Internal data flow error. 0:00:00.035624372 11049 0xff7540 WARN basesrc gstbasesrc.c:2865:gst_base_src_loop:<filesrc0> error: streaming task paused, reason not-negotiated (-4) New clock: GstSystemClock ERROR: from element /GstPipeline:pipeline0/GstFileSrc:filesrc0: Internal data flow error. Additional debug info: gstbasesrc.c(2865): gst_base_src_loop (): /GstPipeline:pipeline0/GstFileSrc:filesrc0: streaming task paused, reason not-negotiated (-4) Execution ended after 0:00:00.001247587 Setting pipeline to PAUSED ... Setting pipeline to READY ... Setting pipeline to NULL ... Freeing pipeline ...
Sample 11
gst-launch-1.0 videotestsrc ! queue ! x264enc bitrate=700 tune=zerolatency pass=17 ! avimux name=mux audiotestsrc ! audioconvert ! wavenc ! mux. mux. ! filesink testavi.avi
Misc
gst-inspect hdv1394src
Factory Details: Rank none (0) Long-name Firewire (1394) HDV video source Klass Source/Video Description Source for MPEG-TS video data from firewire port Author Edward Hervey <bilboed@bilboed.com> Plugin Details: Name 1394 Description Source for video data via IEEE1394 interface Filename /usr/lib64/gstreamer-1.0/libgst1394.so Version 1.2.4 License LGPL Source module gst-plugins-good Source release date 2014-04-18 Binary package ROSA Desktop Fresh R4 gstreamer1.0-plugins-good package Origin URL http://www.rosalab.ru/ GObject +----GInitiallyUnowned +----GstObject +----GstElement +----GstBaseSrc +----GstPushSrc +----GstHDV1394Src Implemented Interfaces: GstURIHandler Pad Templates: SRC template: 'src' Availability: Always Capabilities: video/mpegts systemstream: true packetsize: 188 Element Flags: no flags set Element Implementation: Has change_state() function: gst_base_src_change_state Element has no clocking capabilities. Element has no indexing capabilities. URI handling capabilities: Element can act as source. Supported URI protocols: hdv Pads: SRC: 'src' Implementation: Has getrangefunc(): gst_base_src_getrange Has custom eventfunc(): gst_base_src_event Has custom queryfunc(): gst_base_src_query Pad Template: 'src' Element Properties: name : The name of the object flags: readable, writable String. Default: "hdv1394src0" parent : The parent of the object flags: readable, writable Object of type "GstObject" blocksize : Size in bytes to read per buffer (-1 = default) flags: readable, writable Unsigned Integer. Range: 0 - 4294967295 Default: 4096 num-buffers : Number of buffers to output before sending EOS (-1 = unlimited) flags: readable, writable Integer. Range: -1 - 2147483647 Default: -1 typefind : Run typefind before negotiating flags: readable, writable Boolean. Default: false do-timestamp : Apply current stream time to buffers flags: readable, writable Boolean. Default: false port : Port number (-1 automatic) flags: readable, writable Integer. Range: -1 - 16 Default: -1 channel : Channel number for listening flags: readable, writable Integer. Range: 0 - 64 Default: 63 use-avc : Use AV/C VTR control flags: readable, writable Boolean. Default: true guid : select one of multiple DV devices by its GUID. use a hexadecimal like 0xhhhhhhhhhhhhhhhh. (0 = no guid) flags: readable, writable Unsigned Integer64. Range: 0 - 18446744073709551615 Default: 0 device-name : user-friendly name of the device flags: readable String. Default: "Default"