Opened 7 years ago
Closed 5 years ago
#2348 closed defect (worksforme)
-vo png does not create any output
Reported by: | drhex | Owned by: | beastd |
---|---|---|---|
Priority: | normal | Component: | undetermined |
Version: | 1.3 | Severity: | normal |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Reproduced by developer: | no | Analyzed by developer: | no |
Description
Summary of the bug:
How to reproduce:
% mplayer -quiet -nolirc -nojoystick -nosound -vo png:z=0:outdir=/tmp/dump -frames 4 -zoom -xy 256 /path/to/my/videofile.mp4
I'm trying (on ubuntu 18.04) to extract a few frames from a videofile into png files in directory /tmp/dump.
This worked fine in mplayer 1.2.1 but not in 1.3
Starting simply "mplayer /path/to/my/videofile.mp4" plays it fine, so it is the png part that causes the problem (the same problem regardless of which video file I try to play)
The output directory /tmp/dump is created by mplayer (but remains empty).
Mplayer also creates a folder called '(null)' in the current directory (this folder also remains empty)
Running mplayer via strace reveals that it successfully find and opens "/usr/lib/x86_64-linux-gnu/libpng16.so.16"
The error messages I get on the console are:
png: output directory: (null)
[png @ 0x7fe63e248920]The encoder timebase is not set.
FATAL: Cannot initialize video driver.
I also get these warnings despite having specified compression level 0 explicitly:
[VO_PNG] Warning: compression level set to 0, compression disabled!
[VO_PNG] Info: Use -vo png:z=<n> to set compression level from 0 to 9.
[VO_PNG] Info: (0 = no compression, 1 = fastest, lowest - 9 best, slowest compression)
Mplayer outputs
png: output directory: /tmp/dump
once, but then keeps saying
png: output directory: (null)
Change History (4)
comment:1 by , 7 years ago
comment:2 by , 6 years ago
Is z=0 a "really bad value" if you want the fastest output?
A full output, as requested:
>mplayer -quiet -nolirc -nojoystick -nosound -vo png:z=0:outdir=/tmp/dump -frames 4 -zoom -xy 256 /path/to/my/videofile.mp4 20:04:09 MPlayer 1.3.0 (Debian), built with gcc-7 (C) 2000-2016 MPlayer Team Playing /path/to/my/videofile.mp4. libavformat version 57.83.100 (external) libavformat file format detected. [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f24233162a0]Protocol name not provided, cannot determine if input is local or a network protocol, buffers and access patterns cannot be configured optimally without knowing the protocol [lavf] stream 0: video (h264), -vid 0 [lavf] stream 1: audio (aac), -aid 0, -alang und VIDEO: [H264] 1280x720 24bpp 25.000 fps 2698.8 kbps (329.4 kbyte/s) ========================================================================== Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family libavcodec version 57.107.100 (external) Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264) ========================================================================== Clip info: major_brand: isom minor_version: 512 compatible_brands: isomiso2avc1mp41 encoder: Lavf53.21.1 Load subtitles in /path/to/my/ Audio: no sound Starting playback... Could not find matching colorspace - retrying with -vf scale... Opening video filter: [scale] Movie-Aspect is 1.78:1 - prescaling to correct movie aspect. [swscaler @ 0x7f24237de020]bicubic scaler, from yuv420p to rgb24 using MMXEXT VO: [png] 256x144 => 256x144 RGB 24-bit [zoom] [VO_PNG] Warning: compression level set to 0, compression disabled! [VO_PNG] Info: Use -vo png:z=<n> to set compression level from 0 to 9. [VO_PNG] Info: (0 = no compression, 1 = fastest, lowest - 9 best, slowest compression) png: /tmp/dump - Output directory successfully created. [png @ 0x7f2422685920]The encoder timebase is not set. FATAL: Cannot initialize video driver. Movie-Aspect is 1.78:1 - prescaling to correct movie aspect. VO: [png] 256x144 => 256x144 RGB 24-bit [zoom] [VO_PNG] Warning: compression level set to 0, compression disabled! [VO_PNG] Info: Use -vo png:z=<n> to set compression level from 0 to 9. [VO_PNG] Info: (0 = no compression, 1 = fastest, lowest - 9 best, slowest compression) png: (null) - Output directory successfully created. [png @ 0x7f2422685920]The encoder timebase is not set. FATAL: Cannot initialize video driver. Movie-Aspect is 1.78:1 - prescaling to correct movie aspect. VO: [png] 256x144 => 256x144 RGB 24-bit [zoom] [VO_PNG] Warning: compression level set to 0, compression disabled! [VO_PNG] Info: Use -vo png:z=<n> to set compression level from 0 to 9. [VO_PNG] Info: (0 = no compression, 1 = fastest, lowest - 9 best, slowest compression) png: output directory: (null)
comment:3 by , 6 years ago
Can confirm on Ubuntu 18.04, MPlayer 1.0:
> mplayer -vo png:z=1 /home/gerhard/morpheus/Example-Pseudopodia_96/movie.mp4 MPlayer 1.3.0 (Debian), built with gcc-7 (C) 2000-2016 MPlayer Team do_connect: could not connect to socket connect: No such file or directory Failed to open LIRC support. You will not be able to use your remote control. Playing /home/gerhard/morpheus/Example-Pseudopodia_96/movie.mp4. libavformat version 57.83.100 (external) libavformat file format detected. [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7efe4d8fc2a0]Protocol name not provided, cannot determine if input is local or a network protocol, buffers and access patterns cannot be configured optimally without knowing the protocol [lavf] stream 0: video (h264), -vid 0 VIDEO: [H264] 626x600 24bpp 1.000 fps 16.6 kbps ( 2.0 kbyte/s) ========================================================================== Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family libavcodec version 57.107.100 (external) Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264) ========================================================================== Clip info: major_brand: isom minor_version: 512 compatible_brands: isomiso2avc1mp41 encoder: Lavf57.83.100 Load subtitles in /home/gerhard/morpheus/Example-Pseudopodia_96/ Audio: no sound Starting playback... Could not find matching colorspace - retrying with -vf scale... Opening video filter: [scale] Movie-Aspect is undefined - no prescaling applied. [swscaler @ 0x7efe4ddc4020]bicubic scaler, from yuv420p to rgb24 using MMXEXT [swscaler @ 0x7efe4ddc4020]using unscaled yuv420p -> rgb24 special converter VO: [png] 626x600 => 626x600 RGB 24-bit png: output directory: . [png @ 0x7efe4cc6b920]The encoder timebase is not set. FATAL: Cannot initialize video driver. Movie-Aspect is undefined - no prescaling applied. VO: [png] 626x600 => 626x600 RGB 24-bit png: (null) - Output directory successfully created. [png @ 0x7efe4cc6b920]The encoder timebase is not set. FATAL: Cannot initialize video driver. Movie-Aspect is undefined - no prescaling applied. VO: [png] 626x600 => 626x600 RGB 24-bit png: output directory: (null) [png @ 0x7efe4cc6b920]The encoder timebase is not set. FATAL: Cannot initialize video driver. Movie-Aspect is undefined - no prescaling applied. VO: [png] 626x600 => 626x600 RGB 24-bit png: output directory: (null) [png @ 0x7efe4cc6b920]The encoder timebase is not set. FATAL: Cannot initialize video driver. Movie-Aspect is undefined - no prescaling applied. VO: [png] 626x600 => 626x600 RGB 24-bit png: output directory: (null) [png @ 0x7efe4cc6b920]The encoder timebase is not set. FATAL: Cannot initialize video driver. Movie-Aspect is undefined - no prescaling applied. VO: [png] 626x600 => 626x600 RGB 24-bit png: output directory: (null) [png @ 0x7efe4cc6b920]The encoder timebase is not set. FATAL: Cannot initialize video driver. Movie-Aspect is undefined - no prescaling applied. VO: [png] 626x600 => 626x600 RGB 24-bit png: output directory: (null) [png @ 0x7efe4cc6b920]The encoder timebase is not set. FATAL: Cannot initialize video driver. FATAL: Could not initialize video filters (-vf) or video output (-vo). Exiting... (End of file)
comment:4 by , 5 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
works for me. if this is still an issue try with -fps 30 or so.
a 1fps h264 ? if you could upload the file for testing that would be nice.
ffmpeg can also convert to png files.
Please provide the FULL output, there might things we are missing with the incomplete and out-of-order summary you gave.
The warnings are intentional, they try to tell you that z=0 is a really bad value to choose. They are repeated because initializing the vo fails over and over (which also seems to cause the output directory null thing).
We don't use libpng in libvo anymore.
This is from libavcodec, not libpng. It seems libavcodec was updated, but MPlayer wasn't updated to include r37882 which fixes this.
That patch missing is likely the underlying cause for this issue.