On Fri, 25 May 2012 14:55:43 +0200, Bernhard Pöchtrager <[email protected]> wrote: > Hello > > I want to write a programm to convert a video. (for example from .mpg to > .flv) > I started with analysing the libavformat/output-example.c file. > This programm creates his own video and saves it in the file from the > parameter. > But I want to convert a video. > Now I add a second parameter. > Something like that.... > ./output-example in.mpg out.flv > I saw a tutorial about a programm that reads a video (but this is old and > throws exceptions). > Now I changed the Code and I got an exception during the runtime (when i > open the stream).
Your problem is that you are not adding any streams to the output file. In output example it is done by add_video_stream/add_audio_stream. They call avformat_new_stream() to create a stream in the output AVFormatContext and then set output stream parameters on it. -- Anton Khirnov _______________________________________________ libav-api mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-api
