No, someone on an ATEM forum wrote it.
http://www.atemuser.com/forums/atem-...tv#comment-868
- A LunaticYou wanna destroy the nation, balance the budget.
Here's a link to the file that the script spits out.
It's debug message in VLC shows loads of errors. However, if I record from the official ATEM software, the resulting MP4 plays back just fine. The problem is though, since it's repackaged as an MP4, VLC cannot stream it as it's being recorded. The data coming over the USB is a transport stream (.ts), so it can be played on the fly.
This perl script is supposed to intercept that stream, which comes from a program that runs in the background called "bmdstreamingserver.exe", and saves it as a .ts instead of a .mp4.
The threads I linked to above give more insight into how they achieved this. Many of them got it working, so there has to be something simple wrong here.
---------- Post added at 05:13 AM ---------- Previous post was at 05:02 AM ----------
If this gets sorted out, E-mpire TV will launch. A round the clock channel that will run game trailers and pre-recorded gaming news clips, as well as interviews, live multicam webcasts from events like e3, and reviews and news bits which can be submitted by members of the e-mpire community.
it'll basically be a playlist of gaming related media, comedy, playthroughs, and video reviews, all of which can be submitted by the e-mpire community and will be placed in rotation, that we will cut into at specific points every day to do news, roundtable discussions, interviews, etc...
but in order to do all of this I have to get a live stream from my mixer.
The station will loop all of it's content round the clock with live cut-ins. It will run every day that I don't have a gig where I have to use that equipment, we'll notify the community in advance of any downtime.
Last edited by frosty; 02-16-2012 at 04:06 AM.
- A LunaticYou wanna destroy the nation, balance the budget.
Sorry... can't find anything... but it seems this problem is at least partially related to VLC...
you might want to try a different player to see if the stream is alright. I would at least try MPC and Mplayer. In my experience, Mplayer is a lot more lenient with dodgy streams.
Kept you waiting
do you have a virtual linux box?
---------- Post added at 11:32 AM ---------- Previous post was at 11:25 AM ----------
also are you manually running the perl script? you can edit the file and append -w to the first line to get more verbose output.
#!/usr/bin/perl -w
This is a detailed description of how the perl script intercepts the stream. Can any of our code junkies around here whip up something that could do this that does not use perl?
http://www.atemuser.com/forums/atem-...der-usb-streamHi folks,
i just fiddled around a bit with my H.264 Pro Recoder and was wondering,
why the BMDStreamingServer.exe is listening on localhost:13823.
Guess what i found :>
First of all, Media Express is talking to BMDStreamingServer.exe via
TCP to control the H.264 Pro. It looks like:
get -id 1 -device
OK: get -id 1 device: idle
get -id 1 -displaymodes
OK: get -id 1 displaymodes: 1080p2398,1080p24,1080p25,1080p2997,1080p30,1080i5 0,1080i5994,1080i60,1080p50,1080p5994,1080p60,720p 50,720p5994,720p60,PALp,NTSCp,PAL,NTSC
get -id 1 -encoding
OK: get -id 1 encoding: -fps 50p -srcx 0 -srcy 0 -srcw 1280 -srch 720 -dstw 1280 -dsth 720 -vkbps 5500 -profile high -level 40 -cabac 1 -bframes 1 -arate 48000 -achannels 2 -abits 16 -akbps 256 -preset 1
get -id 1 -input
OK: get -id 1 input: 1080i50
validate -id 1 -input 1080i50 -fps 25p -srcx 0 -srcy 0 -srcw 1920 -srch 1080 -dstw 1920 -dsth 1080 -vkbps 5500 -profile high -level 40 -cabac 1 -bframes 1 -arate 48000 -achannels 2 -abits 16 -akbps 256 -preset 1
OK: validate -id 1 -fps 25p -srcx 0 -srcy 0 -srcw 1920 -srch 1080 -dstw 1920 -dsth 1080 -vkbps 5500 -profile high -level 40 -cabac 1 -bframes 1 -arate 48000 -achannels 2 -abits 16 -akbps 256 -preset 1
set -id 1 -encoding -fps 25p -srcx 0 -srcy 0 -srcw 1920 -srch 1080 -dstw 1920 -dsth 1080 -vkbps 5500 -profile high -level 40 -cabac 1 -bframes 1 -arate 48000 -achannels 2 -abits 16 -akbps 256 -preset 1
OK: set -id 1
start -id 1
OK: start -id 1
As you can see, it's possible to modify the encoding parameters on your own.
Just do a "telnet localhost 13823" and play a bit.
To receive the MPEG-TS with H.264 and AAC Audio a second tcp connection
to the same port is used.
There Media Express issues the following command:
receive -id 1 -transport tcp
When you enter "start -id 1" on the telnet console, raw stream data
run's on top of the last mentioned connection.
I've used wireshare and RawCap.exe to sniff local traffic.
To test it, you can save the raw tcp stream from wireshark:
- Find the packet with "receive -id 1..."
- Right click on the packet and select "Follow TCP Stream"
- in this window say: "Save as"
- Use VLC to open this file
(if it doesn't work, remove the "receive -id 1..." from the beginning)
At the moment, i use putty with ssh tunnels to stream the output
to my laptop.
On the laptop i run:
echo "receive -id 1 -transport tcp" | nc -v -v 127.0.0.1 6666 | mplayer -
Next thing i will try is to glue together a small c program
for windows which talks to BMDStreamingServer.exe
and send's out the H.264 stream to a rtmp server
and record it to disk with tunable options for all the parameters.
Any other suggestions what could be done with this stream?
Kind regards
Michael
- A LunaticYou wanna destroy the nation, balance the budget.
I tried running the stream through mplayer, got this out of it:
command line:
"C:\Program Files\MPlayer for Windows\mplayer.exe" -slave -identify
-noquiet -wid 132352 -colorkey 0x101010 -nokeepaspect -framedrop
-autosync 100 -vf screenshot -font C:\WINDOWS\Fonts\Arial.ttf -priority
abovenormal -ao dsound:device=0 -sws 9 -af volnorm=2 "C:\Documents and
Settings\Dustin\Desktop\h264ProRec.ts"
MPlayer Sherpya-SVN-r33574-4.2.5 (C) 2000-2011 MPlayer Team
SSE supported but disabled
SSE2 supported but disabled
Setting process priority: abovenormal
160 audio & 368 video codecs
Playing C:\Documents and Settings\Dustin\Desktop\h264ProRec.ts.
Invalid seek to negative position ffffffffffffffff!
ID_VIDEO_ID=0
libavformat file format detected.
ID_VIDEO_ID=0
[lavf] stream 0: video (h264), -vid 0
ID_AUDIO_ID=0
[lavf] stream 1: audio (aac), -aid 0
LAVF: Program 1
PROGRAM_ID=1
VIDEO: [H264] 1920x1088 0bpp 30.000 fps 0.0 kbps ( 0.0 kbyte/s)
Load subtitles in C:\Documents and Settings\Dustin\Desktop\
ID_FILENAME=C:\Documents and Settings\Dustin\Desktop\h264ProRec.ts
ID_DEMUXER=lavf
ID_VIDEO_FORMAT=H264
ID_VIDEO_BITRATE=0
ID_VIDEO_WIDTH=1920
ID_VIDEO_HEIGHT=1088
ID_VIDEO_FPS=30.000
ID_VIDEO_ASPECT=1.7647
ID_AUDIO_FORMAT=MP4A
ID_AUDIO_BITRATE=255000
ID_AUDIO_RATE=48000
ID_AUDIO_NCH=2
ID_START_TIME=0.77
ID_LENGTH=95455.72
ID_SEEKABLE=1
ID_CHAPTERS=0
[gl] using extended formats. Use -vo gl:nomanyfmts if playback fails.
Opening video filter: [screenshot]
================================================== ========================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
================================================== ========================
ID_VIDEO_CODEC=ffh264
================================================== ========================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 48000 Hz, 2 ch, s16le, 255.0 kbit/16.60% (ratio: 31875->192000)
ID_AUDIO_BITRATE=255000
ID_AUDIO_RATE=48000
ID_AUDIO_NCH=2
Selected audio codec: [ffaac] afm: ffmpeg (FFmpeg AAC (MPEG-2/MPEG-4 Audio))
================================================== ========================
AO: [dsound] 48000Hz 2ch s16le (2 bytes per sample)
ID_AUDIO_CODEC=ffaac
Starting playback...
[h264 @ 02c1b010] top block unavailable for requested intra mode at 26 0
[h264 @ 02c1b010] error while decoding MB 26 0, bytestream (433)
[h264 @ 02c1b010] concealing 8160 DC, 8160 AC, 8160 MV errors
[h264 @ 02c1b010] top block unavailable for requested intra mode at 26 0
[h264 @ 02c1b010] error while decoding MB 26 0, bytestream (429)
[h264 @ 02c1b010] concealing 8160 DC, 8160 AC, 8160 MV errors
[h264 @ 02c1b010] top block unavailable for requested intra mode at 26 0
[h264 @ 02c1b010] error while decoding MB 26 0, bytestream (429)
[h264 @ 02c1b010] concealing 8160 DC, 8160 AC, 8160 MV errors
[mpegts @ 02ac7010] max_analyze_duration 5000000 reached at 5000000
[aac @ 01259a74]Sample rate index in program config element does not match the sample rate index configured by the container.
[aac @ 01259a74]Input buffer exhausted before END element found
[aac @ 01259a74]Sample rate index in program config element does not match the sample rate index configured by the container.
[aac @ 01259a74]Sample rate index in program config element does not match the sample rate index configured by the container.
[aac @ 01259a74]Input buffer exhausted before END element found
[aac @ 01259a74]Sample rate index in program config element does not match the sample rate index configured by the container.
[aac @ 01259a74]Input buffer exhausted before END element found
[aac @ 01259a74]Sample rate index in program config element does not match the sample rate index configured by the container.
[aac @ 01259a74]Input buffer exhausted before END element found
[aac @ 01259a74]Sample rate index in program config element does not match the sample rate index configured by the container.
[aac @ 01259a74]Input buffer exhausted before END element found
[aac @ 01259a74]Sample rate index in program config element does not match the sample rate index configured by the container.
[aac @ 01259a74]Input buffer exhausted before END element found
[aac @ 01259a74]Sample rate index in program config element does not match the sample rate index configured by the container.
[aac @ 01259a74]Not evaluating a further program_config_element as this construct is dubious at best.
[aac @ 01259a74]channel element 1.6 is not allocated
[aac @ 01259a74]Sample rate index in program config element does not match the sample rate index configured by the container.
[aac @ 01259a74]Input buffer exhausted before END element found
[aac @ 01259a74]channel element 0.8 is not allocated
[aac @ 01259a74]Sample rate index in program config element does not match the sample rate index configured by the container.
[aac @ 01259a74]Not evaluating a further program_config_element as this construct is dubious at best.
[aac @ 01259a74]channel element 1.6 is not allocated
[aac @ 01259a74]Prediction is not allowed in AAC-LC.
[aac @ 01259a74]Sample rate index in program config element does not match the sample rate index configured by the container.
[aac @ 01259a74]Input buffer exhausted before END element found
[aac @ 01259a74]Sample rate index in program config element does not match the sample rate index configured by the container.
[aac @ 01259a74]Input buffer exhausted before END element found
[aac @ 01259a74]Sample rate index in program config element does not match the sample rate index configured by the container.
[aac @ 01259a74]Input buffer exhausted before END element found
[aac @ 01259a74]Sample rate index in program config element does not match the sample rate index configured by the container.
[aac @ 01259a74]Input buffer exhausted before END element found
[aac @ 01259a74]Sample rate index in program config element does not match the sample rate index configured by the container.
[aac @ 01259a74]Input buffer exhausted before END element found
[aac @ 01259a74]channel element 0.8 is not allocated
[aac @ 01259a74]Prediction is not allowed in AAC-LC.
[aac @ 01259a74]channel element 2.6 is not allocated
[aac @ 01259a74]Sample rate index in program config element does not match the sample rate index configured by the container.
[aac @ 01259a74]Input buffer exhausted before END element found
[aac @ 01259a74]Sample rate index in program config element does not match the sample rate index configured by the container.
[aac @ 01259a74]Input buffer exhausted before END element found
[aac @ 01259a74]Sample rate index in program config element does not match the sample rate index configured by the container.
[aac @ 01259a74]Input buffer exhausted before END element found
[aac @ 01259a74]channel element 0.8 is not allocated
[aac @ 01259a74]Prediction is not allowed in AAC-LC.
[aac @ 01259a74]channel element 2.6 is not allocated
[aac @ 01259a74]Sample rate index in program config element does not match the sample rate index configured by the container.
[aac @ 01259a74]Input buffer exhausted before END element found
[aac @ 01259a74]Sample rate index in program config element does not match the sample rate index configured by the container.
[aac @ 01259a74]Input buffer exhausted before END element found
[aac @ 01259a74]Sample rate index in program config element does not match the sample rate index configured by the container.
[aac @ 01259a74]Input buffer exhausted before END element found
[aac @ 01259a74]channel element 0.8 is not allocated
[aac @ 01259a74]Prediction is not allowed in AAC-LC.
[aac @ 01259a74]channel element 2.6 is not allocated
[aac @ 01259a74]Sample rate index in program config element does not match the sample rate index configured by the container.
===== PAUSE =====
ID_PAUSED
- A LunaticYou wanna destroy the nation, balance the budget.
Hmm... is the audio the culprit here? Try exchanging the -ao flag to "-ao dummy" and see if the video works without audio.
Kept you waiting
Good news folks... Some kind fella over at the ATEMuser.com forums wrote a program that successfully pulls a live video stream from my mixer. I'm still getting a "Main stream output warning: trying to send non-dated packet to stream output!" error when I try to stream it from his program to VLC, however I wrote the author of the software about it so hopefully we'll get it sorted out. We have succeeded in getting video from the ATEM to the PC live though, the first step is over with.
the software costs about $50, which is far cheaper than the $250 i'd need for a good HDMI capture card, and well within my limited reach budget-wise.
We'll very soon be able to live stream events like e3, tournaments, developer interviews (you'll get to submit questions live!), etc...
We also can do head to head comparison videos, direct feed video of all the games we record, and the return of video reviews with direct feed gameplay.
Last edited by frosty; 02-21-2012 at 07:15 AM.
- A LunaticYou wanna destroy the nation, balance the budget.
Cool... with lossless video, I could write a framerate comparison program^^ That's actually quite trivial, from a programmers standpoint^^
Kept you waiting
well, the video is h264 as it's being streamed from the ATEM to my PC, so it is compressed at the source. You have to buy the more expensive model that has USB 3.0 to get uncompressed output.
- A LunaticYou wanna destroy the nation, balance the budget.
i can do 720p60, or 1080i60.
- A LunaticYou wanna destroy the nation, balance the budget.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks