[CinCV TNG] [PATCH] Removed can_copy_from from file* sources

Andrew Randrianasulu randrianasulu at gmail.com
Mon Jul 17 00:12:23 CEST 2017


В сообщении от Monday 17 July 2017 00:38:30 igor_ubuntu написал(а):
> 2017-07-17 0:20 GMT+03:00 Andrew Randrianasulu <randrianasulu at gmail.com>:
> > What about motion jpeg? It seems to be used in today's (web)cams, for
> > example,
> > and with quite big resolution , too.
>
> And DNxHD, FF1, ProRes
> DV as master file

Well, many codecs simply not exposed via libquicktime for encoding, currently. I 
tested direct copy mode again with this file:


Input #0, avi, from 'IMGP5232.AVI':
  Metadata:
    creation_time   : 2015-08-04 18:33:15
    encoder         : PENTAX K-5
  Duration: 00:01:00.00, start: 0.000000, bitrate: 27579 kb/s
    Stream #0:0: Video: mjpeg (MJPG / 0x47504A4D), yuvj420p(pc, 
bt470bg/unknown/unknown), 1280x720, 27081 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc
    Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 32000 Hz, 1 channels, 
s16, 512 kb/s


------------

as-is cinelerra-CV  NOT able to use direct copy if instructed to encode into avi 
or mov. BUT

if I remux file with this ffmpeg command:


 ffmpeg -i ~/New_hdd/fotos_from_Vald_O_Murovets/IMGP5232.AVI -acodec 
copy -vcodec copy /dev/shm/tmp/I.mov
ffmpeg version 2.8.11 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 4.8.4 (GCC)
  
configuration: --arch=i486 --target-os=linux --prefix=/usr --libdir=/usr/lib --mandir=/usr/man --docdir=/usr/doc/ffmpeg-2.8.11 --enable-gpl --enable-version3 --disable-static --enable-shared --enable-runtime-cpudetect --enable-ffmpeg --enable-ffplay --enable-ffprobe --enable-ffserver --enable-doc --enable-avdevice --enable-avcodec --enable-avformat --enable-avutil --enable-swresample --enable-swscale --enable-postproc --enable-avfilter --enable-avresample --enable-pthreads --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-ladspa --enable-libass --enable-libbluray --disable-libbs2b --disable-libcaca --disable-libcelt --enable-libcdio --disable-libdc1394 --disable-libflite --enable-libfreetype --enable-libfribidi --disable-libgme --enable-libgsm --enable-libiec61883 --disable-libilbc --disable-libkvazaar --disable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --disable-libpulse --disable-libquvi --enable-librtmp --enable-libschroedinger --enable-libsmbclient --disable-libsnappy --disable-libsoxr --enable-libspeex --disable-libssh --enable-libtheora --enable-libtwolame --enable-libv4l2 --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxvid --enable-libzvbi --enable-lzma --enable-openal --enable-opengl --enable-sdl --enable-x11grab --enable-zlib --disable-debug
  libavutil      54. 31.100 / 54. 31.100
  libavcodec     56. 60.100 / 56. 60.100
  libavformat    56. 40.101 / 56. 40.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 40.101 /  5. 40.101
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
  libpostproc    53.  3.100 / 53.  3.100
[mjpeg @ 0x89a27e0] Changeing bps to 8
Guessed Channel Layout for  Input Stream #0.1 : mono
Input #0, avi, 
from '/home/guest/New_hdd/fotos_from_Vald_O_Murovets/IMGP5232.AVI':
  Metadata:
    creation_time   : 2015-08-04 18:33:15
    encoder         : PENTAX K-5
  Duration: 00:01:00.00, start: 0.000000, bitrate: 27579 kb/s
    Stream #0:0: Video: mjpeg (MJPG / 0x47504A4D), yuvj420p(pc, 
bt470bg/unknown/unknown), 1280x720, 27081 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc
    Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 32000 Hz, 1 channels, 
s16, 512 kb/s
[mov @ 0x89a5f60] Codec for stream 0 does not use global headers but container 
format requires global headers
[mov @ 0x89a5f60] Codec for stream 1 does not use global headers but container 
format requires global headers
Output #0, mov, to '/dev/shm/tmp/I.mov':
  Metadata:
    encoder         : Lavf56.40.101
    Stream #0:0: Video: mjpeg (jpeg / 0x6765706A), yuvj420p, 1280x720, q=2-31, 
27081 kb/s, 25 fps, 25 tbr, 12800 tbn, 25 tbc
    Stream #0:1: Audio: pcm_s16le (sowt / 0x74776F73), 32000 Hz, mono, 512 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame= 1500 fps=0.0 q=-1.0 Lsize=  201999kB time=00:01:00.00 
bitrate=27579.7kbits/s
video:198222kB audio:3750kB subtitle:0kB other streams:0kB global headers:0kB 
muxing overhead: 0.013808%


-----

resulting file I.mov can be direct_copied to output mov (no effects, track 
size/project size = input file resolution) - it renders in just 5 seconds, 
instead of nearly minute (4 core  * 1.4 Ghz).

I think those checks live(d) here:

https://git.cinelerra-cv.org/gitweb?https://git.cinelerra-cv.org/gitweb?p=CinelerraCV.git;a=blob;f=cinelerra/filemov.C;h=e145cfa83a777dd7e6e9cd79942e43b3e2004099;hb=1477939fd06b454adf0237cfb972d59f072eec2cp=CinelerraCV.git;a=blob;f=cinelerra/filemov.C;h=e145cfa83a777dd7e6e9cd79942e43b3e2004099;hb=1477939fd06b454adf0237cfb972d59f072eec2c


function FileMOV::can_copy_from


More information about the Cinelerra mailing list