Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
ffmpeg (libavcodec) warning : encoded frame too large
23 décembre 2011, par ivymikeI'm trying to use libavcodec (ffmpeg) to encode raw pixel data to mp4 format. Every thing goes well and I'm getting .avi file with decent quality but some times the codec gives "encoded frame too large" warning. And when ever it does that, a part of some frames (usually bottom portion of the frame) look garbled or all mixed up. Can any one tell me when this warning is given. Following are the settings I'm using for encoder:
qmax = 6; qmin = 2; bit_rate = 200000; // if I increase this, I get more warnings. width = 1360; height = 768; time_base.den = 15; // frames per second time_base.num = 1; gop_size = 48; pix_fmt = PIX_FMT_YUV420P;
Regards,
-
FFMPEG never stops processing
23 décembre 2011, par aamiriI have a perl script that issues a command to run ffmpeg. this is the ffmpeg command issued by the script:
ffmpeg -y -i /path/to/video/input.mp4 -y -an -pass 1 -passlogfile x264-2pass-2763-log -threads 2 -vcodec libx264 -b 512k -flags +loop+mv4 -cmp 256 -partitions +parti4x4+parti8x8+partp4x4+partp8x8+partb8x8 -me_method hex -subq 7 -trellis 1 -refs 5 -bf 3 -flags2 +bpyramid+wpred+mixed_refs+dct8x8 -coder 1 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -qmin 10 -qmax 51 -qdiff 4 -s 608x406 -analyzeduration 2000M -vf [in] pad=720:406:56:0:black [out] /path/to/output/video/output.mp4
the file i am running it on, 'input.mp4' was an m4v that converted to mp4 by changing the extension to mp4. It plays as both mp4 and m4v. I noticed an issue in my script, where on m4v files it takes a long time to process. I thought converting it mp4 would help but it didn't. This ffmpeg command is to resize the video to fit in a custom made media player. I am currently running the script that issues that command, and it's stuck on the ffmpeg command. right now output.mp4 has exceded the filesize of input.mp4 and the file is still processing. This seems odd because for this particular video it should be shrinking the content. I fear that if i don't manually kill the ffmpeg command, output.mp4 is going to keep growing. What am i doing wrong here?
-
Is there a simple method to keep the same context from input to output with libavformat/libavcodec ?
23 décembre 2011, par rolandHello everybody and thank you for reading.
I need to get access to the frames of a video file/stream and to modify them. The modification part is done, but I still have problems for the accessing part. I am using libavformat/libavcodec to open the video file, get access to the packets and write the file back.
I manage to open the file and to access to the frames, i am still having problems for the encoding, so i am looking for a simple way to specify to libavcodec that my ouput context/format/codec is the same as the source.
Is there a method to do that? Or does anybody have a sample code doing simple opening and rewriting of a source file?
-
FFMPEG terrible conversion quality when using -sameq (same quality as source) flag
23 décembre 2011, par BradI'm trying to convert .flv videos to .ogg format. After experimenting for a while, the ogg is always produced as very low quality. Even when I use the
-sameq
flag which essentially outputs the same bitrate, size, etc as the input file, the quality is substantially worse.Since I am pretty new with ffmpeg, does anyone know some good options to convert video files with maximum quality? I'm trying to preserve as much quality as possible which is why
-sameq
would be perfect, but it doesn't seem to work..Any help is appreciated :)
-
how to read a http video stream with libavcodec (ffmpeg)
23 décembre 2011, par mwahabI'm trying to read a real-time http video stream (I've set one up using VLC and my webcam) using libavcodec from ffmpeg. so far I've been able to read an mpeg file fine but when I pass a url instead of the file name it hangs (I assume it's waiting for the end of the file).
anyone have experience/ideas on how to do this? I'm also open to alternatives if people have other suggestions.
the end goal is to do live video-streaming on the iphone. apple's http live streaming has too much lag for what I need but that's for another post :)
any help is greatly appreciated!