[FFmpeg-user] Determining how FFMPEG calculates start time for MPEG-2 files

2017-05-26 Thread Harold Tessmann
Hi all,

I'm trying to understand how ffmpeg calculates the start time for an
MPEG-2 file containing one video track and one audio track. For
example, when I run ffprobe, I get this output:

Input #0, mpeg, from 'file.mpg':
  Duration: 00:00:11.06, start: 579.376000, bitrate: 10704 kb/s

As a guess, I looked at the system clock reference in the first pack
header and the PTS/DTS values in the first PES header. When I
calculate those values by hand, or examine the same file in Wireshark,
I get a value that differs from the one calculated by ffmpeg. The
first pack header gives me a system clock reference of 578.4, while
the first video PES header gives PTS = DTS = 579.4. If I look at the
first audio PES header, I get 579.37565556, which is so close that
it may be just a matter of doing math in the wrong mode (integer vs.
floating-point). From looking at those values, I would guess that
ffmpeg takes the minimum value from all the PES headers, but I'm not
confident about that.

I see in av_dump_format() the lines that calculate & output seconds
(ic->start_time / AV_TIME_BASE) and microseconds (% instead of /), and
am working backwards from there. Any information or pointers on where
to look would be appreciated.

Thanks,
Harold
___
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] memory leak with vaapi decode since ffmpeg_vaapi: Convert to use hw_frames_ctx only

2017-05-26 Thread Andy Furniss

First reported on mpv github issues.

Since below ffmpeg -hwaccel vaapi -i sommething-h264 -f null -

will steadily eat memory.

commit 542a65d0b33abf81e5087ec9142bb11a54f23cde
Author: Mark Thompson 
Date:   Sun Jul 31 22:51:45 2016 +0100

ffmpeg_vaapi: Convert to use hw_frames_ctx only

Most of the functionality here has moved into lavc.

(cherry picked from commit 3e8651a7ccd8e89cc2f162cf614a3c9f7f4d9fcf)
___
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] ffmpeg does plays only one essence in quicktime reference conversion

2017-05-26 Thread Dan Ionescu
Hello!

 

I am trying to convert a quicktime reference mov file exported from Avid MC
8.4.5. I am using the following conversion command:

 

ffmpeg -threads 0 -enable_drefs 1 -use_absolute_path 1 -i testseq.mov
-strict -2 -pix_fmt yuv420p test.mp4 -y

 

After hardly managing to get ffmpeg to reach all the referenced files, here
is the problem. In the converted mp4 the cuts (timecodes where source media
is changing in the sequence) gets through allright, but only on source clip
is used as source. The other source clips are just ignored.

 

Is this behavior "normal". That's it, this is all that is implemented so fat
in ffmpeg or:

1.   I sould look for an updated version of the software

2.   I am missing something out

3.   I am doing something wrong

 

Here is the command with the output during conversion. After conversion no
error messages are displayed.

 

root@mediasync-ubuntu:/share# ffmpeg -threads 0 -enable_drefs 1
-use_absolute_path 1 -i test\ seq.mov -strict -2 -pix_fmt yuv420p test.mp4
-y

ffmpeg version 2.8.11-0ubuntu0.16.04.1 Copyright (c) 2000-2017 the FFmpeg
developers

  built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609

  configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1
--build-suffix=-ffmpeg --toolchain=hardened
--libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu
--cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping
--disable-decoder=libopenjpeg --disable-decoder=libschroedinger
--enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa
--enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca
--enable-libcdio --enable-libflite --enable-libfontconfig
--enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm
--enable-libmodplug --enable-libmp3lame --enable-libopenjpeg
--enable-libopus --enable-libpulse --enable-librtmp

--enable-libschroedinger --enable-libshine --enable-libsnappy
--enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora
--enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack
--enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi
--enable-openal --enable-opengl --enable-x11grab --enable-libdc1394
--enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264
--enable-libopencv

  libavutil  54. 31.100 / 54. 31.100

  libavcodec 56. 60.100 / 56. 60.100

  libavformat56. 40.101 / 56. 40.101

  libavdevice56.  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

  libpostproc53.  3.100 / 53.  3.100

[mov,mp4,m4a,3gp,3g2,mj2 @ 0x1c56520] Using absolute path on user request,
this is a possible security issue

[dnxhd @ 0x1c59160] frame size changed: 1920x1080 -> 1440x1080

Guessed Channel Layout for  Input Stream #0.0 : stereo

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test seq.mov':

  Metadata:

major_brand : qt

minor_version   : 537199360

compatible_brands: qt

creation_time   : 2017-05-25 19:04:15

comment : Source ID =
060a2b340101010101010f00-13-00-00-00-{59271bed-5179-0018-060e2b347f7f2a80}

comment-eng : Source ID =
060a2b340101010101010f00-13-00-00-00-{59271bed-5179-0018-060e2b347f7f2a80}

timecode: 01:00:00:00

  Duration: 00:00:44.48, start: 0.00, bitrate: 1 kb/s

Stream #0:0(eng): Audio: pcm_s16be (twos / 0x736F7774), 48000 Hz, 2
channels, s16, 1536 kb/s (default)

Metadata:

  creation_time   : 2017-05-25 19:04:16

  handler_name: Apple Alias Data Handler

Stream #0:1(eng): Video: dnxhd (AVdn / 0x6E645641), yuv422p(pc),
1440x1080 [SAR 4:3 DAR 16:9], 83558 kb/s, 25 fps, 25 tbr, 2500 tbn, 2500 tbc
(default)

Metadata:

  creation_time   : 2017-05-25 19:04:16

  handler_name: Apple Alias Data Handler

  encoder : Avid DNxHD Codec

Stream #0:2(eng): Data: none (tmcd / 0x64636D74) (default)

Metadata:

  creation_time   : 2017-05-25 19:04:16

  handler_name: Apple Alias Data Handler

  timecode: 01:00:00:00

[libx264 @ 0x1c8b780] using SAR=4/3

[libx264 @ 0x1c8b780] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2

[libx264 @ 0x1c8b780] profile High, level 4.0

[libx264 @ 0x1c8b780] 264 - core 148 r2643 5c65704 - H.264/MPEG-4 AVC codec
- Copyleft 2003-2015 - http://www.videolan.org/x264.html - options: cabac=1
ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00
mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11
fast_pskip=1 chroma_qp_offset=-2 threads=9 lookahead_threads=1
sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0
constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1
weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40
intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0
qpmax=69 qpstep=4 

Re: [FFmpeg-user] benching with -f null - fails on bluray sample since ffmpeg: init filtergraphs only after we have a frame on each input

2017-05-26 Thread Andy Furniss

Andy Furniss wrote:


andy [ffmpeg]$ ./ffmpeg -i ~/br-264-thd71.m2ts -f null -



Too many packets buffered for output stream 0:1.
Conversion failed!


With wm4s suggestion to raise max queue size this works.

ffmpeg -i ~/br-264-thd71.m2ts -max_muxing_queue_size 300 -f null -
___
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] (PAID JOB) I'm looking for a programmer that would be able to develope for me a script that work with ffmpeg/osx

2017-05-26 Thread nuvolablux
hello everybody
is there anybody here that is be able to develope for me a script that work
with ffmpeg/osx to split 1 hours long movie into few clips? This is a paid
project.

The script will have to work on mac osx
I recommend using ffmpeg as a video engine
Input File: Apple prores422hq MOV files / text file containing time code
and file names
The script must cut the videos with accuracy to the frame, the time code in
the text file is in this format: HH: MM: SS: frames (1 second contains 25
frames - from 00 to 24 -) while ffmpeg uses different syntax:

FFMPEG Time unit syntax

Note that you can use two different time unit formats: sexagesimal (HOURS:
MM: SS.MICROSECONDS, as in 01: 23: 45.678), or in seconds. If a fraction is
used, such as 02: 30.05, this is interpreted as "5 100ths of a second", not
as frame 5. For example, 02: 30.5 would be 2 minutes, 30 seconds and half a
second Would be the same as using 150.5 in seconds.
The ffmpeg command to use is the copy, which provides a crop and not the
file regeneration.

The script would be splitted into two parts

PART A:

Starting from a master video file (MOV apple prores 422HQ full HD) the
script must be able to divide it into many files according to the time
codes and names in the TXT file.
Below you can download the sample video file and the EDL(TXT) file
http://wetransfer.red-line.us/xzms4iU
Looking at the text contained in the edl file (see below) the script will
have to:
Generate video file called "Video Source256485.mov" from video master from
time code 00: 00: 00: 00 to 00: 00: 11: 14
Generate the second video file called "Video Source Copy 54.mov" from the
video master file from 00: 00: 11: 14 to 00: 00: 23: 03
...and so on...
Up to file 11 with the name "Video Source copy 2342342.mov" which in this
test file will be the last file that will process the script.
I have more than 1000 files to split and name, hence the need to automate
this process.


TITLE: Video Source Copy
FCM: NON-DROP FRAME

01 001 V 00: 00: 00: 00 00: 00: 11: 14 00: 00: 00: 00 00: 00: 11: 14
* FROM CLIP NAME: Video Source256485.mov

02 001 V C 00: 00: 00: 00 00: 00: 11: 14 00: 00: 11: 14 00: 00: 23: 03
* FROM CLIP NAME: Video Source Copy 54.mov

03 001 V 00: 00: 00: 00 00: 00: 11: 14 00: 00: 23: 03 00: 00: 34: 17
* FROM CLIP NAME: Video Source copy 33.mov

04 001 V C 00: 00: 00: 00 00: 00: 11: 14 00: 00: 34: 17 00: 00: 46: 06
* FROM CLIP NAME: Video Source Copy 433.mov

05 001 V C 00: 00: 00: 00 00: 00: 11: 14 00: 00: 46: 06 00: 00: 57: 20
* FROM CLIP NAME: Video Source Copy 255.mov

06 001 V C 00: 00: 00: 00 00: 00: 11: 14 00: 00: 57: 20 00: 01: 09: 09
* FROM CLIP NAME: Video Source Copy 6123.mov

07 001 V 00: 00: 00: 00 00: 00: 11: 14 00: 01: 09: 09 00: 01: 20: 23
* FROM CLIP NAME: Video Source Copy 2357.mov

08 001 V 00: 00: 00: 00 00: 00: 11: 14 00: 01: 20: 23 00: 01: 32: 12
* FROM CLIP NAME: Video Source 123434.mov copy

09 001 V 00: 00: 00: 00 00: 00: 11: 14 00: 01: 32: 12 00: 01: 44: 01
* FROM CLIP NAME: Video Source 74345fdf.mov copy

10 001 V C 00: 00: 00: 00 00: 00: 11: 14 00: 01: 44: 01 00: 01: 55: 15
* FROM CLIP NAME: Video Source copy 2342342.mov

11 001 V C 00: 00: 00: 00 00: 00: 11: 14 00: 01: 55: 15 00: 02: 07: 04
* FROM CLIP NAME: Video Source copia.mov


PART B)

Starting with two distinct folders of video files, containing files named
the same way and of the same duration

eg:

Folder A:
Aaa.mov duration 00: 00: 10: 12
Bbb.mov duration 00: 01: 14: 10
Ccc.mov duration 00: 10: 00: 14
and so on...

Folder B:
Aaa.mov duration 00: 00: 10: 12
Bbb.mov duration 00: 01: 14: 10
Ccc.mov duration 00: 10: 00: 14
and so on...

The script will have to:

Extract an image file (png?) From each movie that contains the frame that
is in the exact half of the movie.
Create an image from the audio of movie files (https://trac.ffmpeg.org/wiki/
Waveform)
Picture the exported frames and the audio image in a document according to
a predefined pattern and add text such as the name of the files from which
extra pictures and other standard texts have been extracted. .
Get a pdf document or a offline reference database that can serve as a
processing report.
Consider that we speak about 1000 images, then consider the format that
allows fast consultation (pdf too heavy?) And an alphanumeric string search.

Clearly I'm available for any further explanation.
nuvolab...@gmail.com
I would need a quote with splitted times and costs for the two scripts.
Thank you.
S.
___
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".

Re: [FFmpeg-user] Create an AAC stream matching the Core Media Audio packet format / priming etc?

2017-05-26 Thread Christian Ebert
* Mark Burton on Wednesday, May 24, 2017 at 13:20:34 +0100
> On 23 May 2017, at 11:20, Christian Ebert  wrote:
>>> So I looked back at your above -af and realised that the 1024 should 
>>> actually be 2112 which is Appleā€™s chosen fixed encoding delay.
>>> https://developer.apple.com/library/content/documentation/QuickTime/QTFF/QTFFAppenG/QTFFAppenG.html
>>>  
>>> 

Yes, the 'historical solution': implicit encoder delay:
https://developer.apple.com/library/content/documentation/QuickTime/QTFF/QTFFAppenG/QTFFAppenG.html#//apple_ref/doc/uid/TP4939-CH2-SW9

>>> -filter:a aresample=async=1:first_pts=0,asetpts=PTS-STARTPTS+2112
>> Strange, probably all depends on the demuxing application.
> My take on it is that Quicktime will always assume 2112 padding, so I believe 
> a .mov should be setup with this priming duration.

Yeah, filtering does not add an edit list (apparently the
'modern' solution):
https://developer.apple.com/library/content/documentation/QuickTime/QTFF/QTFFChap2/qtff2.html#//apple_ref/doc/uid/TP4939-CH204-25592
and therefore QuickTime fails over to a hardcoded 'historical'
default. That explains it.

There are some options referring to edit lists, but I haven't
tried whether, nevermind how, they could be used for this
purpose.

-- 
theatre - books - texts - movies
Black Trash Productions at home: https://blacktrash.org
Black Trash Productions on Facebook:
https://www.facebook.com/blacktrashproductions
___
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".