Closed LSrt-stack closed 3 years ago
Hi, I am using the following input config to roll a mp4 file in loop and stream it to udp port. without much success, could you please help with any errors in the config file ?
# List of inputs.
inputs:
# The type of input.
- input_type: external_command
name: >
ffmpeg
-threads 2
-re
-fflags +genpts
-stream_loop -1
-i ./test2.mp4
-v 0 -vcodec mpeg4
-f mpegts udp://127.0.0.1:23003
extra_input_args: '-i udp://127.0.0.1:23003?overrun_nonfatal=1'
media_type: video
frame_rate: 25
resolution: 720p
Please try something like https://github.com/google/shaka-streamer/blob/master/config_files/input_looped_file_config.yaml :
inputs:
# The type of input.
- input_type: looped_file
# Name of the input file.
# This example can be downloaded from https://storage.googleapis.com/shaka-streamer-assets/sample-inputs/Sintel.2010.720p.mkv
name: Sintel.2010.720p.mkv
# The media type of the input. Can be audio or video.
media_type: video
# The type of input.
- input_type: looped_file
# A second track (audio) from the same input file.
name: Sintel.2010.720p.mkv
media_type: audio
Instead of using external_command
to loop an input file, let Shaka Streamer do it for you.
You can find many more sample configs in the config_files/
folder in the repo: https://github.com/google/shaka-streamer/tree/master/config_files
Does this help?
@LSrt-stack Does this answer all your questions? Can we close the issue?
Hi, I checked all the example config files in config_files : my request is specific to a example config file which streams from a network source instead of static file "Sintel.2010.720p.mkv" as in the above example. Thank you
Hello,
If you mean how can you take an external input and package it based on some pipeline config, you can use the external command input config as the one you are using above but you need to specify the output from your external command to the environment variable $SHAKA_STREAMER_EXTERNAL_COMMAND_OUTPUT
so that the output of the external command is piped into Shaka Packager.
Apologies for letting this issue go unnoticed. We are catching up on issues.
my request is specific to a example config file which streams from a network source instead of static file
I think this is covered by https://github.com/google/shaka-streamer/issues/16#issuecomment-551956325, where we suggest adding docs and examples for RTMP. For example:
inputs:
- name: rtmp://localhost/live/foo
media_type: video
- name: rtmp://localhost/live/foo
media_type: audio
Does this help?
@LSrt-stack Does this answer all your questions? Can we close the issue?
Closing due to inactivity. If this is still an issue for you or if you have further questions, you can ask us to reopen or have the bot reopen it by including @shaka-bot reopen
in a comment.
Can we have a sample, live input config file ? Am currently using looped file as input and pipeline config is set to live : this should work ? Thank you