Fixed version of the post: Hi, I'm having trouble piping into ffmpeg with fast seeking on several videos, for example, <a href="https://vid.me/07OE">this one</a> ('Download file' under 'more'). What I'm trying to do is to pipe some video in, seek to a specific point and write out a frame. This is written in python, but my problem is the same using the command line. For example:
cat Communist\ propaganda.mp4 | ffmpeg -ss 1 -i pipe: -frames:v 1 out.jpg When I run the above command I receive a couple of warning and errors: ffmpeg version 3.2.2 Copyright (c) 2000-2016 the FFmpeg developers built with Apple LLVM version 8.0.0 (clang-800.0.42.1) configuration: --prefix=/usr/local/Cellar/ffmpeg/3.2.2 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-libass --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-opencl --enable-openssl --disable-lzma --enable-nonfree --enable-vda libavutil 55. 34.100 / 55. 34.100 libavcodec 57. 64.101 / 57. 64.101 libavformat 57. 56.100 / 57. 56.100 libavdevice 57. 1.100 / 57. 1.100 libavfilter 6. 65.100 / 6. 65.100 libavresample 3. 1. 0 / 3. 1. 0 libswscale 4. 2.100 / 4. 2.100 libswresample 2. 3.100 / 2. 3.100 libpostproc 54. 1.100 / 54. 1.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'pipe:': Metadata: major_brand : isom minor_version : 1 compatible_brands: isomavc1mp42 creation_time : 2016-12-09T04:48:21.000000Z Duration: 00:00:42.07, start: 0.000000, bitrate: N/A Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 640x480 [SAR 1:1 DAR 4:3], 1022 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc (default) Metadata: creation_time : 2016-12-09T04:48:17.000000Z Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 131 kb/s (default) Metadata: creation_time : 2016-12-09T04:48:17.000000Z [swscaler @ 0x7f9c2b82be00] deprecated pixel format used, make sure you did set range correctly Output #0, image2, to 'out.jpg': Metadata: major_brand : isom minor_version : 1 compatible_brands: isomavc1mp42 encoder : Lavf57.56.100 Stream #0:0(und): Video: mjpeg, yuvj420p(pc), 640x480 [SAR 1:1 DAR 4:3], q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc (default) Metadata: creation_time : 2016-12-09T04:48:17.000000Z encoder : Lavc57.64.101 mjpeg Side data: cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1 Stream mapping: Stream #0:0 -> #0:0 (h264 (native) -> mjpeg (native)) [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f9c2b808800] stream 0, offset 0x34fa: partial file pipe:: Invalid data found when processing input frame= 0 fps=0.0 q=0.0 Lsize=N/A time=00:00:00.00 bitrate=N/A speed= 0x video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used) And nothing is output. However, if I use output seeking instead, with: cat Communist\ propaganda.mp4 | ffmpeg -i pipe: -ss 1 -frames:v 1 out.jpg out.jpg is written to as expected, and just the pixel format warning is shown. What's going on here? Note that it seems to have problems on only some videos but not others (I haven't found a pattern but it seems to work better on .webms than .mp4s). Given that output seeking is so much slower than fast seeking, it really isn't practical for me to use it instead. I'm on OSX 10.11, but I had the exact same problem on a Raspberry Pi 2 running Arch Linux. > On 8/01/2017, at 11:48 AM, Moritz Barsnick <barsn...@gmx.net> wrote: > > On Sat, Jan 07, 2017 at 14:44:01 -0800, expenses wrote: >> command I receive a couple of warning and errors:And nothing is output. > > And you were going to keep these warnings and errors a secret? Or you > believe they don't mean anything? > > Please show us the actual ffmpeg command line you used, and its > complete, uncut console output. > > Moritz > _______________________________________________ > ffmpeg-user mailing list > ffmpeg-user@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-user > > To unsubscribe, visit link above, or email > ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe". _______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".