[CinCV TNG] Fwd: Re: [PATCH] Removed can_copy_from from file* sources

Andrew Randrianasulu randrianasulu at gmail.com
Sun Jul 16 02:44:06 CEST 2017

I also tried dvcpro codec:

ffmpeg failed to encode:


ffmpeg -i ~/New_hdd/new_my_videos_magic_eye_cam/20150811_180635.MOV -vcodec 
dvvideo -b:v 90M -s 1280x1080 -pix_fmt yuv422p -acodec 
copy /dev/shm/tmp/dvcpro_hd.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
Guessed Channel Layout for  Input Stream #0.1 : stereo
Input #0, mov,mp4,m4a,3gp,3g2,mj2, 
from '/home/guest/New_hdd/new_my_videos_magic_eye_cam/20150811_180635.MOV':
    major_brand     : qt
    minor_version   : 0
    compatible_brands: qt
    creation_time   : 2015-08-11 18:06:35
  Duration: 00:00:35.98, start: 0.000000, bitrate: 9937 kb/s
    Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, 
bt709), 1280x720, 8128 kb/s, 30.02 fps, 30 tbr, 90k tbn, 180k tbc (default)
      creation_time   : 2015-08-11 18:06:35
      handler_name    : iCat Alias Data Handler
      encoder         : iCatch AVCC
    Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 44100 Hz, 2 
channels, s16, 1411 kb/s (default)
      creation_time   : 2015-08-11 18:06:35
      handler_name    : iCat Alias Data Handler
File '/dev/shm/tmp/dvcpro_hd.mov' already exists. Overwrite ? [y/N] y
[swscaler @ 0x9f55c40] deprecated pixel format used, make sure you did set range 
[dvvideo @ 0x9f6d640] DVCPRO HD encoding is not supported.
[dvvideo @ 0x9eecc40] ff_frame_thread_encoder_init failed


this warning also exist in current ffmpeg git.

so after some googling around I found those answers:

last message pointed at ffmpeg fork named FFmbc. I've downloaded and compiled 
it. Encoding run at 6 fps single-threaded (1.4Ghz), 16 fps at ondemand (up to 
4.0Ghz) :

./ffmbc -i ~/New_hdd/new_my_videos_magic_eye_cam/20150811_180635.MOV -vcodec 
dvvideo  -s 1440x1080 -pix_fmt yuv422p -acodec 
copy /dev/shm/tmp/dvcpro_hd.mov -threads 4
FFmbc version N-32102-ga863f7d
Copyright (c) 2008-2016 Baptiste Coudurier and the FFmpeg developers
Input #0, mov,mp4,m4a,3gp,3g2,mj2, 
from '/home/guest/New_hdd/new_my_videos_magic_eye_cam/20150811_180635.MOV':
    major_brand: qt
    minor_version: 0
    compatible_brands: qt
  Duration: 00:00:35.97, bitrate: 9937 kb/s
    Stream #0.0(eng): Video: h264 (High), yuvj420p, 1280x720p, 8135 kb/s, 30.05 
      codec_name: iCatch AVCC
    Stream #0.1(eng): Audio: pcm_s16le, 44100 Hz, 2 channels, s16, 1411 kb/s
File '/dev/shm/tmp/dvcpro_hd.mov' already exists. Overwrite ? [y/N] y
Adjusting fps from 60000/1997 to 30/1
[scale @ 0x98dc7c0] w:1280 h:720 fmt:yuvj420p -> w:1440 h:1080 fmt:yuv422p 
flags:0x4 il:0
Output #0, mov, to '/dev/shm/tmp/dvcpro_hd.mov':
    encoder: FFmbc 0.7
    Stream #0.0(und): Video: dvvideo, yuv422p, 1440x1080p [PAR 4:3 DAR 16:9], 
138240 kb/s, 30.00 fps
    Stream #0.1(und): Audio: pcm_s16le, 44100 Hz, 2 channels, s16, stream copy
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1
Press [q] to stop, [?] for help
frame= 1079 fps= 12 q=0.0 Lsize=  613139kB time=00:00:00.00 bitrate=   
0.0kbits/s dup=0 drop=1
video:606938kB audio:6192kB global headers:0kB muxing overhead 0.001555%

resulted file can't be loaded into Cinelerra-CV:

new_vcodec: couldn't find codec for "dvh6"
new_vcodec: couldn't find codec for "dvh6"
new_vcodec: couldn't find codec for "dvh6"

but can be played in Cin 5.1 .

There was message on quicktime ML back in time when dvc pro hd decoding was 
added to ffmpeg:


[Libquicktime-devel] DVCPROHD
From: Burkhard Plaum <plaum at ip...> - 2008-08-30 12:20:59 

looks like ffmpeg gets DVCPROHD support these days.
I've added the relevant fourccs to cvs:

"dvhq", // DVCPRO HD 720p50
"dvhp", // DVCPRO HD 720p60
"dvh5", // DVCPRO HD 50i produced by FCP
"dvh6", // DVCPRO HD 60i produced by FCP
"dvh3", // DVCPRO HD 30p produced by FCP

This together with ffmpeg svn from today decodes at least
the one file I tried. More testing is yet to be done :)


----quote end-----

also, compilation error for main branch with external 2.8 ffmpeg was (sorry I 
forgot to add it to my message before):


  CC     plugin.lo
  CC     qtcache.lo
  CC     qtdv.lo
  CC     qtffmpeg.lo
qtffmpeg.c: In function 'quicktime_new_ffmpeg':
qtffmpeg.c:71:53: warning: assignment makes pointer from integer without a cast
   AVCodecContext *context = ptr->decoder_context[i] = avcodec_alloc_context();
qtffmpeg.c:94:26: error: 'CODEC_FLAG_H263P_SLICE_STRUCT' undeclared (first use 
in this function)
             ffmpeg_id == CODEC_FLAG_H263P_SLICE_STRUCT))
qtffmpeg.c:94:26: note: each undeclared identifier is reported only once for 
each function it appears in
make[3]: *** [qtffmpeg.lo] Ошибка 1
make[3]: *** Ожидание завершения заданий...
make[3]: Выход из каталога `/dev/shm/tmp/cinelerra/quicktime'
make[2]: *** [all-recursive] Ошибка 1
make[2]: Выход из каталога `/dev/shm/tmp/cinelerra/quicktime'
make[1]: *** [all-recursive] Ошибка 1
make[1]: Выход из каталога `/dev/shm/tmp/cinelerra'
make: *** [all] Ошибка 2
root at slax:/home/guest/botva/src/cinelerra-git/cinelerra#

this was with CinelerraCV-1477939 ("Make EXR support optional")

----------  Пересланное сообщение  ----------

Тема: Re: [CinCV TNG] [PATCH] Removed can_copy_from from file* sources
Дата: Воскресенье 16 июля 2017
Отправитель: Andrew Randrianasulu <randrianasulu at gmail.com>
Получатель:  cinelerra at lists.cinelerra-cv.org

В сообщении от Saturday 15 July 2017 22:40:26 Einar Rc3bcnkaru написал(а):
> On 07/15/2017 10:11 PM, igor_ubuntu wrote:
> > If a user want to get directly copied frames, he should set:
> > 1 video track, no effects, input and output have the same size, input
> > and output media is all I-frames.
> >
> > Then he goes to File/Render and set the same parameters as in original.
> > If the parameters are not exactly the same (or (for example) if he had a
> > effect on track), the user will get reencoded result.
> >
> > Right ?
> Yes. When cinelerra decides to copy frame, rendering parameters
> affecting the result are ignored. DV hasnt any.

It seems to work with DV (input: dv in avi, output - quicktime/dv)
and with mjpeg (mjpeg/quicktime -> photo jpeg/quicktime)

(I looked at how fast rendering happened on slowed-down CPU, for ~8 sec. long DV 
cut down clip)

mjpeg file was encoded with ffmpeg 2.8.11:

ffmpeg -i /dev/shm/tmp/ud_04102010-small.mov -acodec copy -vcodec 
mjpeg /dev/shm/tmp/ud_04102010-small_mjpeg.mov

I also tried DNxHD, but there seems to be no such  codec at CinelerraCV's 
encoding side. Test file was encoded with this ffmpeg command:

 ffmpeg -i ~/New_hdd/new_my_videos_magic_eye_cam/20150811_180635.MOV -vcodec 
dnxhd -b:v 90M -s 1920x1080 -pix_fmt yuv422p -acodec 
copy /dev/shm/tmp/dxnhd.mov

parameters for ffmpeg converter were copied from this post to ffmpeg-users ML:

But I found it quite sad  cinelerraCV (main branch) can't be compiled with 
external ffmpeg 2.8.x (I saw few patches in 
https://git.cinelerra-cv.org/gitweb?p=einar/cinelerra.git;a=shortlog;pg=4 but 
not dared to try and apply them to main branch ....)

This brings interesting question - when next version of Cinelerra will be 
released? (from main branch). internal ffmpeg in main branch very old ....(like 
pre-0.5, from changelog). Is Cinelerra-CV-E not quite ready for replacing main 
version? Because I don't think moving forward TWO versions by basically 1 and 
1/2 developer is good idea ... so, if new release from main branch will be done 
soon -> CVE can become new main version, and old quicktime-based Cinelerra 
moved to branch ....

> Einar
> _______________________________________________
> Cinelerra mailing list
> Cinelerra at lists.cinelerra-cv.org
> http://lists.cinelerra-cv.org/cgi-bin/mailman/listinfo/cinelerra


More information about the Cinelerra mailing list