Re: [FFmpeg-user] Extracting stills frames from a DVB-T MPEG transport stream with subtitles

2020-06-20 Thread Tom Crane

On Sat, 20 Jun 2020, Hans Carlson wrote:


On Sat, 20 Jun 2020, Tom Crane wrote:

	I am attempting to extract still frames from a video stream in a 
multi-channel DVB-T MPEG transport stream, for example every 2 seconds, 
with selected accompanying subtitles but can't get it to work.




[cut]

If you want to combine the video and the sub into a single image, then try 
the overlay filter, eg:


 ffmpeg -i dvb.ts -filter_complex "[0:26][0:30]overlay" -r 0.5 
stills-%04d.jpg


Many thanks for that which does exactly what I wanted.


Add other options as necessary to get desired quality.


Adding '-qscale:v 1' provided the required quality.

Best regards
Tom Crane
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] Distorted output when encoding DVD as MP4, error message "ignoring pic cod ext after 0"

2020-06-20 Thread Hans Carlson

On Sat, 20 Jun 2020, M v D wrote:


I'm trying to convert a number of DVDs to MP4. Some of them work, others
result in lots of error messages and distorted output. All of them play
correctly in VLC if I open the IFO file, but the ones that give distorted
output fail to play in DVD if I open the VOB file. I'm using the following
command:

ffmpeg -i 'concat:VTS_02_1.VOB|VTS_02_2.VOB|VTS_02_3.VOB|VTS_02_4.VOB'
out.mp4

What stands out to me is that this message is only present for the DVDs
that fail:

[mpeg2video @ 0x7fffcfcfc0c0] ignoring pic cod ext after 0

More output, including lots of error messages for each frame, is included
below.

Does anyone know what this means and how I can fix it? Thanks in advance
for any help!


The short answer is -- don't do this.  Use mplayer -dumpstream to create a 
single .vob file, then use ffmpeg to convert that .vob to .mp4.


The longer answer is -- unfortunately, there are many links on the web 
that suggest the approach you tried, but as you discovered it doesn't 
always work.  And that's because vob files on a dvd are not as simple as 
they might appear.


There are multiple threads on this subject in the ffmpeg archives, I 
suggest you do a little searching and read through some of them if you 
want to understand why your original approach doesn't always work.


Try searching the ffmpeg mailing list with the following search 
parameters:


  site:lists.ffmpeg.org/pipermail/ffmpeg-user/ vob
  site:lists.ffmpeg.org/pipermail/ffmpeg-user/ dvd

Not everything in those results will be relevant to your question, but you 
should find several threads that are related.

___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] Extracting stills frames from a DVB-T MPEG transport stream with subtitles

2020-06-20 Thread Hans Carlson

On Sat, 20 Jun 2020, Tom Crane wrote:

	I am attempting to extract still frames from a video stream in a 
multi-channel DVB-T MPEG transport stream, for example every 2 seconds, 
with selected accompanying subtitles but can't get it to work.


This example command successfully extracts frames from video stream 0:26 to 
jpeg files.


ffmpeg -i dvb.ts -map 0:26 -qscale:v 1 -r 0.5 stills%04d.jpg

This one successfully copies the same file's video stream 0:26 along 
with subtitle stream 0:30 to a video file in a Matroska container.


ffmpeg -i dvb.ts -map 0:26 -c:v copy -map 0:30 -c:s copy tmp.mkv

Is there a way to combine the two to capture still frames from the video 
stream to JPEG files including the accompanying subtitles?


If you want to create 2 images/frame - 1 with the video and another with 
the subtitle, then use your first command for the video and try something 
like the following for the subtitle:


  ffmpeg -i dvb.ts -r 0.5 -lavfi "[0:30]null[sub]" -map "[sub]" subs-%04d.jpg

If you want to combine the video and the sub into a single image, then 
try the overlay filter, eg:


  ffmpeg -i dvb.ts -filter_complex "[0:26][0:30]overlay" -r 0.5 stills-%04d.jpg

Add other options as necessary to get desired quality.  You might want to 
test it on a small section that you know contains subtitles using -ss/-t.

___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-user] Some Tibetan characters aren't rendered correctly with drawtext filter.

2020-06-20 Thread 张一环
I'm trying to use ffmpeg drawtext filter to render Tibetan text to videos. But 
some characters aren't rendered correctly.

for example:

སྤྱི་སྟེགས

Expected render output:
https://i.stack.imgur.com/TJnQE.png

Actual render output:
https://i.stack.imgur.com/qtOlG.png

Here's my ffmpeg command line:
ffmpeg -i input.mp4 -filter_complex 
"drawtext=fontsize=80:fontcolor=black:fontfile=himalaya.ttf:shadowx=1:shadowy=1:text='སྤྱི་སྟེགས':x=0:y=0"
 -c:v libx264 -b:v 400k -c:a copy output.mp4

The font himalaya.ttf (Microsoft Himalaya) is the default built-in font for 
Tibetan on Windows. (See 
https://docs.microsoft.com/en-us/typography/font-list/microsoft-himalaya )

I tried many other Tibetan fonts, and many ffmpeg versions, problem exists 
anyway.

All of those fonts are rendered correctly in other places such as a web browser.

I asked a question on stackoverflow (Link: 
https://stackoverflow.com/questions/62458321/ffmpeg-drawtext-support-for-tibetan-fonts
 ),
and now I know this unlikely freetype fault, I tired using harfbuzz as shaping 
engine, to render Tibetan in an ass subtitle, it works correctly.

But the problem is, ffmpeg drawtext filter does not support to specify a 
shaping engine (use harfbuzz rather than fribidi).

So this is a bug? Thank you.
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] How to terminate cleanly a recording on Windows

2020-06-20 Thread Matteo Contrini
On Fri, 19 Jun 2020, at 12:05 PM, Verachten Bruno wrote:
> I haven't tried this particular command under Linux, but usually hitting
> "q" ends the recording properly.
> On Windows, "q" seems to do nothing, and CTRL+C ends the process, but not
> at the right time. Most of the time, I miss the end of the recording. My
> recordings are just a few seconds long.

I've just tried your command on Windows 10 version 2004 with Windows Terminal 
1.0.1401.0 and I have no problems. Pressing 'q' ends the recording correctly.

Which terminal/console are you using?

--
Matteo
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-user] Distorted output when encoding DVD as MP4, error message "ignoring pic cod ext after 0"

2020-06-20 Thread M v D
I'm trying to convert a number of DVDs to MP4. Some of them work, others
result in lots of error messages and distorted output. All of them play
correctly in VLC if I open the IFO file, but the ones that give distorted
output fail to play in DVD if I open the VOB file. I'm using the following
command:

ffmpeg -i 'concat:VTS_02_1.VOB|VTS_02_2.VOB|VTS_02_3.VOB|VTS_02_4.VOB'
out.mp4

What stands out to me is that this message is only present for the DVDs
that fail:

[mpeg2video @ 0x7fffcfcfc0c0] ignoring pic cod ext after 0

More output, including lots of error messages for each frame, is included
below.

Does anyone know what this means and how I can fix it? Thanks in advance
for any help!


--


ffmpeg version 4.2.3 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
  configuration: --prefix=/home/erik/packages
  libavutil  56. 31.100 / 56. 31.100
  libavcodec 58. 54.100 / 58. 54.100
  libavformat58. 29.100 / 58. 29.100
  libavdevice58.  8.100 / 58.  8.100
  libavfilter 7. 57.100 /  7. 57.100
  libswscale  5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
[mpeg2video @ 0x7fffcfcfc0c0] ignoring pic cod ext after 0
Input #0, mpeg, from
'concat:VTS_02_1.VOB|VTS_02_2.VOB|VTS_02_3.VOB|VTS_02_4.VOB':
  Duration: 00:00:05.98, start: 0.287267, bitrate: 4707454 kb/s
Stream #0:0[0x1bf]: Data: dvd_nav_packet
Stream #0:1[0x1e0]: Video: mpeg2video (Main), yuv420p(tv, top first),
720x576 [SAR 64:45 DAR 16:9], 8500 kb/s, 25 fps, 50 tbr, 90k tbn, 50 tbc
Stream #0:2[0x80]: Audio: ac3, 48000 Hz, 5.1(side), fltp, 448 kb/s
Stream #0:3[0x81]: Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
Stream #0:4[0x82]: Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
Stream #0:5[0x83]: Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
Stream #0:6[0x84]: Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
Stream #0:7[0x85]: Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
Stream #0:8[0x86]: Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
Stream mapping:
  Stream #0:1 -> #0:0 (mpeg2video (native) -> mpeg4 (native))
  Stream #0:2 -> #0:1 (ac3 (native) -> aac (native))
Press [q] to stop, [?] for help
[ac3 @ 0x7fffcfd24f40] exponent 25 is out-of-range
[ac3 @ 0x7fffcfd24f40] error decoding the audio block
Error while decoding stream #0:2: Error number -16976906 occurred
[ac3 @ 0x7fffcfd24f40] expacc 127 is out-of-range
[ac3 @ 0x7fffcfd24f40] error decoding the audio block
Error while decoding stream #0:2: Error number -16976906 occurred
[aac @ 0x7fffcfd19240] Using a PCE to encode channel layout "5.1(side)"
[mpeg2video @ 0x7fffcfcff180] ignoring pic cod ext after 0
Error while decoding stream #0:2: Error number -16976906 occurred
[ac3 @ 0x7fffcfd24f40] expacc 125 is out-of-range
[ac3 @ 0x7fffcfd24f40] error decoding the audio block
Error while decoding stream #0:2: Error number -16976906 occurred
[ac3 @ 0x7fffcfd24f40] exponent -1 is out-of-range
[ac3 @ 0x7fffcfd24f40] error decoding the audio block
Error while decoding stream #0:2: Error number -16976906 occurred
Last message repeated 1 times
[mpeg2video @ 0x7fffcfcff180] warning: first frame is no keyframe
[mpeg2video @ 0x7fffcfcff180] ac-tex damaged at 7 0
[mpeg2video @ 0x7fffcfcff180] ac-tex damaged at 11 20
[mpeg2video @ 0x7fffcfcff180] 00 motion_type at 12 13
[mpeg2video @ 0x7fffcfcff180] 00 motion_type at 5 35
[mpeg2video @ 0x7fffcfcff180] ac-tex damaged at 2 34
[mpeg2video @ 0x7fffcfcff180] Warning MVs not available
[mpeg2video @ 0x7fffcfcff180] concealing 1620 DC, 1620 AC, 1620 MV errors
in P frame
Output #0, mp4, to 'out.mp4':
  Metadata:
encoder : Lavf58.29.100
Stream #0:0: Video: mpeg4 (mp4v / 0x7634706D), yuv420p, 720x576 [SAR
64:45 DAR 16:9], q=2-31, 200 kb/s, 25 fps, 12800 tbn, 25 tbc
Metadata:
  encoder : Lavc58.54.100 mpeg4
Side data:
  cpb: bitrate max/min/avg: 0/0/20 buffer size: 0 vbv_delay: -1
Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 5.1(side),
fltp, 394 kb/s
Metadata:
  encoder : Lavc58.54.100 aac
[mpeg2video @ 0x7fffcfcff180] ac-tex damaged at 3 0
[mpeg2video @ 0x7fffcfcff180] Invalid mb type in P-frame at 10 10
[mpeg2video @ 0x7fffcfcff180] 00 motion_type at 18 20
[mpeg2video @ 0x7fffcfcff180] Invalid mb type in P-frame at 13 35
[mpeg2video @ 0x7fffcfcff180] 00 motion_type at 33 31
[mpeg2video @ 0x7fffcfcff180] Warning MVs not available
[mpeg2video @ 0x7fffcfcff180] concealing 945 DC, 945 AC, 945 MV errors in P
frame
concat:VTS_02_1.VOB|VTS_02_2.VOB|VTS_02_3.VOB|VTS_02_4.VOB: corrupt decoded
frame in stream 1
[ac3 @ 0x7fffcfd24f40] exponent -1 is out-of-range
[ac3 @ 0x7fffcfd24f40] error decoding the audio block
Error while decoding stream #0:2: Error number -16976906 occurred
[ac3 @ 0x7fffcfd24f40] expacc 127 is out-of-range
[ac3 @ 0x7fffcfd24f40] error decoding the audio block
Error while decoding stream #0:2: Error number -16976906 occurred

[FFmpeg-user] 20200617-win64-static-Converted video clips into key frames are blurry

2020-06-20 Thread ??????
win10 ffmpeg-20200617-0b3bd00-win64-static.zip CPU i5-9400 
GPUNVIDIAGTX 1660s ffmpeg -i ss11.mp4 -strict -2 -qscale 0 
-intra -c:v h264_nvenc ss111.mp4 I converted the mp4 video clips into key 
frames, using the above hardware and commands, the video became very blurred 
after the conversion. The video bit rate is very high and should not be the 
case. I often clip video into many clips. Direct merging will cause video 
length and video picture to be bothered by key frame problem, so I will convert 
video into key frame. In the past, on the old computer, I could convert the 
video into key frame through the above command and then merge. Now the new 
computer doesn't know why it will be very fuzzy after conversion. YouTube 
Update video https://youtu.be/feXEOfcTkVA or Play address 
feXEOfcTkVA
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".