[FFmpeg-user] Add time code AND a watermark in one pass

2018-02-24 Thread Kevin Duffey
Hi all,
I have figured out from various sources how to add a watermark using a png 
file. Works well enough.  
What I also want to do is add timecode at 00:00:00:00 to my video as a text 
overlay. 
I have tried a few variations with the filter_complex, but I cant seem to get 
past any number of issues. In particular I get an issue with both text and a 
text file.. though I am never loading a text file, when trying to use drawtext.
This is on a windows machine, though I suspect other than some of the batch 
syntax, it would be the same call on linux or mac. In particular I am trying to 
convert a directory of MOV DNxHR encoded videos to H.265, with the watermark 
AND timecode added.
I think it would not be hard to add them in two passes.. e.g. add timecode 
first pass with copy mode, to keep it as DNxHR, then 2nd pass add watermark and 
convert to H.265 with lower resolution. I was hoping, however, to do it all in 
one pass, so as to save a lot of time.
Here is what I have, which fails with  Cannot find a valid font for the family 
Sans.  Even though I specify the font file, and have tried by using \\ and \\\ 
as well.  One time I was able to get past that, though I dont recall how now, 
and got the issue of the using both text and a text file with drawtext.
Any help would be greatly appreciated. Naturally the watermark.png is the 
watermark image. My source DNxHR is 4K.  Here I am specifying h.264, though I 
would like to render to H.265 if possible... and assuming yahoo accept it as an 
upload format.

for /R %%a in ("*.mov") do ffmpeg -i "%%a" -i watermark.png -filter_complex 
"[2:v]scale=4096x2160 
[ovrl],[1:v][ovrl]overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2; 
drawtext=fontfile='C:\\Windows\\Fonts||arial.ttf':fontsize=15:timecode='00\:00\:00\:00':r=24:x=(w-tw)/2:y=h-(2*lh):fontcolor=white"
 -s 720x480 -c:v libx264 -preset ultrafast -crf 20 d:\encoded\%%~na.mp4


Thank you.
___
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] AMD screen record + h/w vaapi encode to mkv fails.

2018-02-24 Thread Andy Furniss

Andy Furniss wrote:

Haven't had time to bisect, but I can't screengrab to mkv any more.
kmsgrab + playing with vsync etc. give the same error as this example, 
mp4 works OK.


Bisected to -

commit ae7df68edd79bce5c318810c6b307ee4e81cd2a6
Author: James Almer 
Date:   Fri Nov 24 19:42:50 2017 -0300

avformat/avc: return an error in ff_isom_write_avcc if the buffer 
lenght is too small


Signed-off-by: James Almer 

___
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] Rip DVD with ffmpeg

2018-02-24 Thread Adi Marvillo


Am 2018-02-22 um 14:43 schrieb Nicolas George:
> Adi Marvillo (2018-02-22):
>> Thanks Steve and ZikZak. I've dumped the DVD with mencoder onto the HDD
>> but the chapters are still lost. I thought the chapter marks are stored
>> in Stream #0:0 below but they are not as VLC nor ffprobe don't show them...
>> I wanted to process the vob-file with ffmpeg afterwards ;)
>> FYI: I didn't encode anything in this dumping-step in order not to loose
>> quality.
>> I don't understand where the chapter information is stored in the DVDs.
>> Anybody knows?
> On DVDs, the chapter information, like all the rest of the metadata
> (language of the streams, palette of the subtitles, etc.), is stored in
> the IFO files. MPlayer can read them when reading the DVD directly
> through libdvdread/libdvdcss. FFmpeg, on the other hand, does not know
> how to read DVDs directly, and the information is not present in the VOB
> files.
>
> Also, concatenating the VOB files like you did will not work correctly,
> due to timestamps resets and menu data interleaved with the actual video
> data. You can use the "dvd2concat" script distributed along with FFmpeg
> to generate a concat script that only takes the relevant part of the VOB
> files and controls the timestamp resets. It does not handle chapters,
> but that could be added with a little effort.
>
>> Am 2018-02-21 um 17:27 schrieb Steve Boyer:
> Please remember that top-posting is forbidden on this list. If you do
> not know what it means, look it up.
>
> Regards,
>
>
>
> ___
> 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".
Hi Nicolas, thanks for your support!
Meanwhile I managed to extract the chapterinformation with the command
"mplayer dvd://TITLE -identify >> chapterfile.txt". This command dumps
all metainformation of the current title into chapterfile.txt. TITLE has
to be replaced by the number indicating the correct title on the current
source - in this case it's 7 .
I think this is "ID_DVD_TITLE_8_CHAPTERS=38" in chapterfile.txt (see
below) when beginning to count with the index 0 instead of
ID_DVD_TITLE_1_CHAPTERS=5

Here a part of chapterfile-dump:
adi@HOST:/media/adi/bd29891a-00d1-42f2-997c-6d3073626884/Videos/monsterBox$
cat chapterfile.txt
MPlayer 1.3.0 (Debian), built with gcc-6.2.1 (C) 2000-2016 MPlayer Team
Playing dvd://11.
ID_DVD_TITLES=15
ID_DVD_TITLE_1_CHAPTERS=5
ID_DVD_TITLE_1_ANGLES=1
ID_DVD_TITLE_2_CHAPTERS=11
ID_DVD_TITLE_2_ANGLES=1
ID_DVD_TITLE_3_CHAPTERS=4
ID_DVD_TITLE_3_ANGLES=1
ID_DVD_TITLE_4_CHAPTERS=4
ID_DVD_TITLE_4_ANGLES=1
ID_DVD_TITLE_5_CHAPTERS=5
ID_DVD_TITLE_5_ANGLES=1
ID_DVD_TITLE_6_CHAPTERS=3
ID_DVD_TITLE_6_ANGLES=1
ID_DVD_TITLE_7_CHAPTERS=2
ID_DVD_TITLE_7_ANGLES=1
ID_DVD_TITLE_8_CHAPTERS=38
ID_DVD_TITLE_8_ANGLES=1
ID_DVD_TITLE_9_CHAPTERS=3
ID_DVD_TITLE_9_ANGLES=1
ID_DVD_TITLE_10_CHAPTERS=3
ID_DVD_TITLE_10_ANGLES=1
ID_DVD_TITLE_11_CHAPTERS=14
ID_DVD_TITLE_11_ANGLES=1
ID_DVD_TITLE_12_CHAPTERS=3
ID_DVD_TITLE_12_ANGLES=1
ID_DVD_TITLE_13_CHAPTERS=3
ID_DVD_TITLE_13_ANGLES=1
ID_DVD_TITLE_14_CHAPTERS=3
ID_DVD_TITLE_14_ANGLES=1
ID_DVD_TITLE_15_CHAPTERS=3
ID_DVD_TITLE_15_ANGLES=1
ID_DVD_TITLE_1_LENGTH=5.000
ID_DVD_TITLE_2_LENGTH=174.960
ID_DVD_TITLE_3_LENGTH=74.960
ID_DVD_TITLE_4_LENGTH=74.960
ID_DVD_TITLE_5_LENGTH=99.960
ID_DVD_TITLE_6_LENGTH=49.960
ID_DVD_TITLE_7_LENGTH=127.920
ID_DVD_TITLE_8_LENGTH=258.960
ID_DVD_TITLE_9_LENGTH=138.400
ID_DVD_TITLE_10_LENGTH=170.040
ID_DVD_TITLE_11_LENGTH=6092.080
ID_DVD_TITLE_12_LENGTH=138.880
ID_DVD_TITLE_13_LENGTH=126.760
ID_DVD_TITLE_14_LENGTH=100.040
ID_DVD_TITLE_15_LENGTH=128.000
ID_DVD_DISC_ID=5FFA8A29BAAD6646A0683DA76B86EC39
ID_DVD_VOLUME_ID=XX
There are 15 titles on this DVD.

ID_DVD_CURRENT_TITLE=11
There are 1 angles in this DVD title.
audio stream: 0 format: ac3 (stereo) language: de aid: 128.

ID_AUDIO_ID=128
ID_AID_128_LANG=de
number of audio channels on disk: 1.
subtitle ( sid ): 0 language: de

ID_SUBTITLE_ID=0
ID_SID_0_LANG=de
number of subtitles on disk: 1

CHAPTERS:
00:00:00.000,00:07:30.720,00:14:29.280,00:24:08.640,00:32:42.240,00:41:30.400,00:49:51.040,00:57:35.200,01:05:51.040,01:11:55.360,01:19:26.560,01:25:59.200,01:30:36.640,01:35:31.840,
ID_VIDEO_ID=0
MPEG-PS file format detected.
ID_AUDIO_ID=128
VIDEO:  MPEG2  720x576  (aspect 3)  25.000 fps  8000.0 kbps (1000.0 kbyte/s)

Please see the line beginning with "CHAPTERS:"
Interesting: The chaptermarks are exactly 5 sec too late - might be
because of "ID_DVD_TITLE_1_LENGTH=5.000" in chapterfile.txt - anyhow I
don't understand it, but I accept it.

After ripping the XXX.vob with ffmpeg to an XXX.mkv the chaptermarks can
easily be included with mkvmerge. Please assure the Syntax below
(chapterfile2.txt)

adi@HOST:mkvmerge -o OUTPUT.mkv --chapters chapterfile2.txt XXX.mkv
adi@HOST:cat chapterfile2.txt         # Syntax of chapter textfile