Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

help, can't encode #2

Open
diramazioni opened this Issue · 1 comment

2 participants

@diramazioni

Hello, I made the first video capture with glc with great success (thanks!) however in this state it appears useless since only glc-play is able to play, mencoder doesn't encode it, here is the output of the glc-encode.sh script

MEncoder 1.0rc4-4.4.5 (C) 2000-2010 MPlayer Team                                                                                                   
Option x264encopts: Bad argument b_pyramid=(null)                                                                                                  
Option x264encopts: Unknown suboption bime                                                                                                         
Option x264encopts: turbo option is deprecated; use slow_firstpass to disable turbo                                                                
Reading from stdin...                                                                                                                              
success: format: 0  data: 0x0 - 0x0                                                                                                                
YUV4MPEG2 file format detected.                                                                                                                    
YUV4MPEG2 Video stream 0 size: display: 1400x768, codec: 1400x768                                                                                  
VIDEO:  [YV12]  1400x768  12bpp  30.000 fps    0.0 kbps ( 0.0 kbyte/s)                                                                             
[V] filefmt:12  fourcc:0x32315659  size:1400x768  fps:30.000  ftime:=0.0333                                                                        
** MUXER_LAVF *****************************************************************                                                                    
REMEMBER: MEncoder's libavformat muxing is presently broken and can generate                                                                       
INCORRECT files in the presence of B-frames. Moreover, due to bugs MPlayer                                                                         
will play these INCORRECT files as if nothing were wrong!                                                                                          
*******************************************************************************                                                                    
OK, exit.                                                                                                                                          
Opening video filter: [expand osd=1]                                                                                                               
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1                                                                                       
==========================================================================                                                                         
Opening video decoder: [raw] RAW Uncompressed Video                                                                                                
Could not find matching colorspace - retrying with -vf scale...                                                                                    
Opening video filter: [scale]                                                                                                                      
Movie-Aspect is undefined - no prescaling applied.                                                                                                 
[swscaler @ 0x1aae2c0]using unscaled yuv420p -> yuv420p special converter                                                                          
FATAL: Cannot initialize video driver.
VDecoder init failed :(
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffrawyv12] vfm: ffmpeg (RAW YV12)
==========================================================================
Movie-Aspect is undefined - no prescaling applied.
FATAL: Cannot initialize video driver.

Exiting...

if I take out thos options this is the output
MEncoder 1.0rc4-4.4.5 (C) 2000-2010 MPlayer Team

Option x264encopts: Bad argument b_pyramid=(null)

Reading from stdin...

success: format: 0 data: 0x0 - 0x0

YUV4MPEG2 file format detected.

YUV4MPEG2 Video stream 0 size: display: 1400x768, codec: 1400x768

VIDEO: [YV12] 1400x768 12bpp 30.000 fps 0.0 kbps ( 0.0 kbyte/s)

[V] filefmt:12 fourcc:0x32315659 size:1400x768 fps:30.000 ftime:=0.0333

** MUXER_LAVF *****************************************************************

REMEMBER: MEncoder's libavformat muxing is presently broken and can generate

INCORRECT files in the presence of B-frames. Moreover, due to bugs MPlayer

will play these INCORRECT files as if nothing were wrong!

*******************************************************************************

OK, exit.

Opening video filter: [expand osd=1]

Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1

==========================================================================

Opening video decoder: [raw] RAW Uncompressed Video

Could not find matching colorspace - retrying with -vf scale...

Opening video filter: [scale]

Movie-Aspect is undefined - no prescaling applied.

[swscaler @ 0x29772b0]using unscaled yuv420p -> yuv420p special converter

FATAL: Cannot initialize video driver.
VDecoder init failed :(
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffrawyv12] vfm: ffmpeg (RAW YV12)
==========================================================================
Movie-Aspect is undefined - no prescaling applied.
FATAL: Cannot initialize video driver.

This is the command that runs

glc-play geometryShader-31239-0.glc -o - -y 1 | mencoder - -nosound -demuxer y4m -ovc x264 -x264encopts qp=20:ref=4:mixed_refs:bframes=3:b_pyramid:weightb:direct_pred=auto:filter=-1,0:partitions=all:threads=auto:keyint=300:pass=1 -passlogfile pass.log -of lavf -lavfopts format=mp4 -o video.mp4

can you suggest the right options?

@balasarius

hey @diramazioni

try this bash script. it will extract the audio into a wav file then it encodes the glc video in to HD quality mp4 with the audio included
this uses ffmpeg for the encoding which memcoder would already use anyway.

#!/bin/bash
AUDIOFILE=$(echo $1 | sed 's/.glc/.wav/')
RESULTFILE=$(echo $1 | sed 's/.glc/.mp4/')

# Extract audio
glc-play $1 -a 1 -o /tmp/$AUDIOFILE

glc-play $1 -o - -y 1 | ffmpeg -i - -i /tmp/$AUDIOFILE -acodec libmp3lame -ab 128k -ac 2 -vcodec libx264 -vpre slow -crf 22 -threads 0 "$RESULTFILE"

just save this scriptfile and do

chmod a+x <scriptfile>

on it then to use it just type

./<scriptfile> myfile.glc 

hope this helps.

@lano1106 lano1106 referenced this issue from a commit in lano1106/glcs
@lano1106 lano1106 More cleanup #2 cfb2515
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.