ffmpeg -f lavfi -i 'testsrc=size=1280x720:rate=30' -f lavfi -i 'anoisesrc=color=pink' -c:v libx264 -profile:v baseline -level 3.0 -x264opts 'keyint=24:min-keyint=24:no-scenecut' -preset veryfast -maxrate 1984k -bufsize 3968k -vf "format=yuv420p" -g 60 -c:a aac -b:a 128k -ar 44100 -tune zerolatency -movflags +faststart -f flv "rtmp://10.162.20.20/rtmp_hls/bunny"But in the end, the stream will come in MP4 from a camcorder.
--
You received this message because you are subscribed to the Google Groups "Shaka Player Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shaka-player-users+unsub...@googlegroups.com.
To post to this group, send email to shaka-player-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shaka-player-users/e8d14604-ec07-4ecc-868e-fdc3bcb62e21%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I'm not sure I understand your question about demuxing. Are you asking if Shaka supports multiplexed streams? The answer to that is, no, but we also don't prevent it. Many browsers do not support multiplexed streams in MediaSource, and that is how Shaka does playback. So you can try a multiplexed stream, and we won't stop you, but it probably won't work on every browser.
I don't know anything about ngingx. The tools we use for packaging content come from our sister project, Shaka Packager. The packager will create the MPD and does support live streams. Of course, you can also use other tools. There are several open-source options available, including gpac's tools and others.
If you don't multiplex your content, you may get better results, whether you're using ngingx, gpac, or Shaka on packaging side, or dash.js, hls.js, or Shaka on the player side. This is because in the end, the browser has to consume the content via MediaSource, and multiplexed content is not universally supported in MediaSource implementations.
I suggest trying to get ffmpeg to output multiple streams at once. You can have multiple outputs and map input streams to outputs. So for example, input 0 stream 0 may be video, and input 0 stream 1 may be audio. You would map input 0.0 to output 0.0, and input 0.1 to output 1.0.
You may not have to change packaging tools or players to make this work. (Although we'd love to hear your feedback on Shaka Packager and Shaka Player if you decide to try them out.)
Does this help?
Rafael
--
You received this message because you are subscribed to the Google Groups "Shaka Player Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shaka-player-users+unsub...@googlegroups.com.
To post to this group, send email to shaka-player-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shaka-player-users/5d786bad-b4d1-4c03-aa06-4cd293513edd%40googlegroups.com.
Shaka Packager has a command line tool, so you don't have to build on the C++ API. But again, if you have other tools you like, you don't have to change to that.
With ffmpeg, you can output multiple bitrates at once. You'll just apply different bitrate and/or scaling parameters to each output.
ffmpeg -i rtmp://localhost:1935/live/$name
-c:a libfdk_aac -b:a 32k -c:v libx264 -profile:v baseline -level 3.0 -x264opts 'keyint=24:min-keyint=24:no-scenecut' -b:v 128K -f flv rtmp://localhost:1935/rtmp_hls/$name_hls_low
-c:a libfdk_aac -b:a 64k -c:v libx264 -profile:v baseline -level 3.0 -x264opts 'keyint=24:min-keyint=24:no-scenecut' -b:v 256k -f flv rtmp://localhost:1935/rtmp_hls/$name_hls_mid
-c:a libfdk_aac -b:a 128k -c:v libx264 -profile:v baseline -level 3.0 -x264opts 'keyint=24:min-keyint=24:no-scenecut' -b:v 512K -f flv rtmp://localhost:1935/rtmp_hls/$name_hls_hi
-c:a libfdk_aac -b:a 128k -c:v libx264 -profile:v baseline -level 3.0 -x264opts 'keyint=24:min-keyint=24:no-scenecut' -b:v 512K -f flv rtmp://localhost:1935/rtmp_dash/$name_dash
Would a sample command line be helpful?
#!/bin/bashVIDEO_OPTS="-an -c:v libx264 -profile:v baseline -level 3.0 -x264opts keyint=24:min-keyint=24:no-scenecut -f $FORMAT"AUDIO_OPTS="-vn -c:a libfdk_aac -f $FORMAT"ffmpeg -i "$INPUT" \$VIDEO_OPTS -b:v 512k "$OUTPUT_VIDEO_HIGH" \$VIDEO_OPTS -b:v 256k "$OUTPUT_VIDEO_MID" \$VIDEO_OPTS -b:v 128k "$OUTPUT_VIDEO_LOW" \$AUDIO_OPTS -b:a 128k "$OUTPUT_AUDIO"
INPUT=input.mkv \
FORMAT=mp4 \
OUTPUT_VIDEO_HIGH=v-high.mp4 \OUTPUT_VIDEO_MID=v-mid.mp4 \OUTPUT_VIDEO_LOW=v-low.mp4 \OUTPUT_AUDIO=a.mp4 \./test.sh
Stream mapping:Stream #0:0 -> #0:0 (mpeg2video (native) -> h264 (libx264))Stream #0:0 -> #1:0 (mpeg2video (native) -> h264 (libx264))Stream #0:0 -> #2:0 (mpeg2video (native) -> h264 (libx264))Stream #0:1 -> #3:0 (ac3 (native) -> aac (native))
packager \input=v-high.mp4,stream=video,output=v-high.mp4 \input=v-mid.mp4,stream=video,output=v-mid.mp4 \input=v-low.mp4,stream=video,output=v-low.mp4 \input=a.mp4,stream=audio,output=a.mp4 \--mpd_output dash.mpd
INPUT=long-input.mkv \FORMAT=mpegts \OUTPUT_VIDEO_LOW=udp://127.0.0.1:40001 \OUTPUT_VIDEO_MID=udp://127.0.0.1:40002 \OUTPUT_VIDEO_HIGH=udp://127.0.0.1:40003 \OUTPUT_AUDIO=udp://127.0.0.1:40004 \./test.sh
packager \'input=udp://127.0.0.1:40001,stream=video,init_segment=v-high-init.mp4,segment_template=v-high-$Number$.m4s,bandwidth=512000' \'input=udp://127.0.0.1:40002,stream=video,init_segment=v-med-init.mp4,segment_template=v-med-$Number$.m4s,bandwidth=256000' \'input=udp://127.0.0.1:40003,stream=video,init_segment=v-low-init.mp4,segment_template=v-low-$Number$.m4s,bandwidth=128000' \'input=udp://127.0.0.1:40004,stream=audio,init_segment=a-init.mp4,segment_template=a-$Number$.m4s,bandwidth=128000' \--mpd_output live.mpd
--
You received this message because you are subscribed to the Google Groups "Shaka Player Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shaka-player-users+unsub...@googlegroups.com.
To post to this group, send email to shaka-player-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shaka-player-users/d73a8266-dd26-41a4-9eb7-077b84e48fac%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Shaka Player Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shaka-player-users+unsub...@googlegroups.com.
To post to this group, send email to shaka-player-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shaka-player-users/b8691291-4a4c-4bdd-b9a7-a308905769fb%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Shaka Player Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shaka-player-users+unsub...@googlegroups.com.
To post to this group, send email to shaka-player-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shaka-player-users/4dec8164-680a-4402-97bb-22d6d149290f%40googlegroups.com.
Thank you in advance
#!/bin/bash
echo "-----------------------------"
INPUT=$1
NOMBRE=$(echo $1 | cut -f 1 -d '.')
FORMAT=mp4
video_ext=m4v
audio_ext=m4a
OUTPUT_VIDEO_HIGH="$NOMBRE"_high.$video_ext
OUTPUT_VIDEO_MID="$NOMBRE"_mid.$video_ext
OUTPUT_VIDEO_LOW="$NOMBRE"_low.$video_ext
OUTPUT_AUDIO="$NOMBRE"_128k.$audio_ext
LIVE_OPTS="-g 24 -keyint_min 24 -pix_fmt yuv420p -preset veryfast -tune zerolatency -movflags +faststart -vsync passthrough "
ffmpeg -y -i "$INPUT" $LIVE_OPTS -filter_complex '[0:v]yadif,split=3[out1][out2][out3];[0:a]aresample=44100[audio]' -map '[out1]' -b:v 512k "$OUTPUT_VIDEO_HIGH" -map '[out2]' -b:v 256k "$OUTPUT_VIDEO_MID" -map '[out3]' -b:v 128k "$OUTPUT_VIDEO_LOW" -map '[audio]' -b 128k "$OUTPUT_AUDIO"--
You received this message because you are subscribed to the Google Groups "Shaka Player Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shaka-player-users+unsub...@googlegroups.com.
To post to this group, send email to shaka-player-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shaka-player-users/9d79c940-e24d-4067-9f82-c6755aa66302%40googlegroups.com.
.
184 files checked, no errors found.
npm ERR! Error: version not found: html...@0.9.14
npm ERR! at /usr/share/npm/lib/cache/add-named.js:125:12
npm ERR! at RegClient.get_ (/usr/share/npm/node_modules/npm-registry-client/lib/get.js:130:14)
npm ERR! at RegClient.<anonymous> (/usr/share/npm/node_modules/npm-registry-client/lib/get.js:49:12)
npm ERR! at evalmachine.<anonymous>:272:14
npm ERR! at /usr/lib/nodejs/graceful-fs/graceful-fs.js:102:5
npm ERR! at Object.oncomplete (evalmachine.<anonymous>:107:15)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR! <http://github.com/npm/npm/issues>
npm ERR! System Linux 3.16.0-4-amd64
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "--prefix" "/home/shaka/shaka-player" "update"
npm ERR! cwd /home/shaka/shaka-player
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.21
npm WARN engine karma-edg...@0.4.1: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
npm WARN engine esp...@3.1.3: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
npm WARN engine esco...@1.8.1: wanted: {"node":">=0.12.0"} (current: {"node":"0.10.29","npm":"1.4.21"})
npm WARN optional dep failed, continuing fsev...@1.1.1
npm WARN engine esp...@3.1.3: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
npm WARN engine req...@2.79.0: wanted: {"node":">= 4"} (current: {"node":"0.10.29","npm":"1.4.21"})
npm WARN engine form...@2.1.4: wanted: {"node":">= 0.12"} (current: {"node":"0.10.29","npm":"1.4.21"})
npm WARN engine ha...@3.1.3: wanted: {"node":">=0.10.32"} (current: {"node":"0.10.29","npm":"1.4.21"})
npm WARN engine cryp...@2.0.5: wanted: {"node":">=0.10.40"} (current: {"node":"0.10.29","npm":"1.4.21"})
npm WARN engine bo...@2.10.1: wanted: {"node":">=0.10.40"} (current: {"node":"0.10.29","npm":"1.4.21"})
npm WARN engine ho...@2.16.3: wanted: {"node":">=0.10.40"} (current: {"node":"0.10.29","npm":"1.4.21"})
sh: 1: node: not found
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/shaka/shaka-player/npm-debug.log
npm ERR! not ok code 0
--
You received this message because you are subscribed to the Google Groups "Shaka Player Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shaka-player-users+unsub...@googlegroups.com.
To post to this group, send email to shaka-player-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shaka-player-users/ad4c911d-1223-4160-b38e-afc1b6752b4c%40googlegroups.com.