StarCraft® II

Converting the Cutscene Editor's .y4m files

Does anyone have advice on what kind of program I should be using to convert the .y4m files that the Cutscene Editor outputs when recording?

I've tried numerous programs over the months, most don't even recognize the format. I've found something called Any Video Converter Ultimate. It does the job, but the output is dark and has very visible artifacts regardless of how much I up the quality (bitrate, fps).

I've made two cutscenes in the editor. The recorded videos look good when I watch the y4m source, but once I convert it to mp4 and upload to Youtube, they look barely acceptable...

http://www.youtube.com/watch?v=42w7IRXAxLU (warning: loud video, thank youtube for that)
This one is ok. Still darkened and a bitpixellated, but acceptable.

http://www.youtube.com/watch?v=LJ6od_Hirb8
This one is horrible no matter what I do. It looks like a 360p video upscaled to 720p :S

What the hell is y4m anyway? I wish the editor outputted something like Fraps does. I could just throw it into VirtualDub and convert it to a nice xvid ;(
Reply Quote
Developer
The open source program FFmpeg can read the y4m format. You'll need to pass in some command arguments -- something like this should work, assuming the video name is video.y4m and the audio name is video.wav:

ffmpeg -i video.y4m -i video.wav -acodec ac3 -ab 192k -vcodec libx264 -b 8000k -r 30 -threads 2 video.h264.avi
If you'd prefer uncompressed video, try this:

ffmpeg -i video.y4m -i video.wav -acodec pcm_s16le –vcodec rawvideo video.avi
For your convenience, you can even make a quick Windows batch file. Open up a text editor and save this as "VideoConverter.bat":

@echo off
set soundfile=""
IF EXIST "%~p1%~n1.wav" set soundfile=-i "%~p1%~n1.wav"
ffmpeg -i "%~1" %soundfile% -acodec ac3 -ab 192k -vcodec libx264 -b 8000k -r 30 -threads 2 "%~n1.h264.avi"

Put this in the same folder as ffmpeg.exe, then you can just drag any y4m file on top of the batch file to convert it. If a wav file exists with the same name as the video file, it will embed the audio into the resulting avi.
Edited by Artestru on 3/18/2013 3:45 PM PDT
Reply Quote
Why not ogg vorpis? It is what is used inside starcraft for the unn broadcasts and per rendered swarm videos.
Reply Quote
I directly use the Fraps to record the cutscenes.
Reply Quote
Thanks Artestru, FFmpeg is great :D I toyed around with it, tweaked some settings (replaced -b with -q, which I guess makes the bitrate variable) and the results are much better than with the other converters.

You also solved another of my problems: merging the audio with the video. Previously I had to do it in yet another program once I had the raw video converted into a .mp4 file. A lot less hassle now. Thanks! :D

I directly use the Fraps to record the cutscenes.


I wouldn't do it that way. The Record option in the editor might be very slow, but it allows you to set every graphics option to Ultra and still get an extremely smooth (60fps) and lossless quality video file at any resolution you desire.
Reply Quote
Why not ogg vorpis? It is what is used inside starcraft for the unn broadcasts and per rendered swarm videos.


y4m format is also playable in-game
Reply Quote
03/23/2013 04:02 AMPosted by Renee
Why not ogg vorpis? It is what is used inside starcraft for the unn broadcasts and per rendered swarm videos.


y4m format is also playable in-game


Can you explain just how exactly? I would like to have a nice cutscene between maps or whatever.
Reply Quote

Please report any Code of Conduct violations, including:

Threats of violence. We take these seriously and will alert the proper authorities.

Posts containing personal information about other players. This includes physical addresses, e-mail addresses, phone numbers, and inappropriate photos and/or videos.

Harassing or discriminatory language. This will not be tolerated.

Forums Code of Conduct

Report Post # written by

Reason
Explain (256 characters max)
Submit Cancel

Reported!

[Close]