Search code examples
ffmpegdirectshow

FFPLAY shows video, but FFMPEG just shows black


I'm trying to record video/audio from a VIDBOX device using ffmpeg. Using Windows 10 and ffmpeg version N-86129-g1e8daf3, I can see and hear the video/audio fine when I execute

ffplay -f dshow -i video="VIDBOX NW07":audio="Microphone (VIDBOX NW07)"

but, I only record a black screen (and the correct audio) when I execute

ffmpeg -f dshow -i video="VIDBOX NW07":audio="Microphone (VIDBOX NW07)" -c:v libx264 out.mp4

What could be causing this to work in ffplay but not ffmpeg?


Solution

  • You are probably testing the output in a generic player. Add -pix_fmt yuv420p to force ffmpeg's output to a standard pixel format that all players can show.