Somebody can help me for this error please :
"D:\Enregistrements>"D:\ffmpeg-full_build\bin\ffmpeg.exe" -hide_banner
-i "D:\Enregistrements\Test.mp4"
-vf "select='between(t,0.00,39.37)+between(t,66.32,159.05)',setpts=N/FRAME_RATE/TB"
-af "select='between(t,0.00,39.37)+between(t,66.32,159.05)',asetpts=N/SAMPLE_RATE/TB"
"D:\Enregistrements\Test_Coupe0 (1).mp4"
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'D:\Enregistrements\Test.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf59.4.101
Duration: 00:05:00.20, start: 0.000000, bitrate: 2215 kb/s
Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709), 1280x720 (SAR 1:1 DAR 16:9), 2099 kb/s, 25 fps, 25 tbr, 25k tbn (default)
Metadata:
handler_name : Mainconcept MP4 Video Media Handler
vendor_id : [0][0][0][0]
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 125 kb/s (default)
Metadata:
handler_name : Mainconcept MP4 Sound Media Handler
vendor_id : [0][0][0][0]
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Stream #0:1 -> #0:1 (aac (native) -> aac (native))
(Parsed_select_0 # 0000017d2feac700) Media type mismatch between the 'Parsed_select_0' filter output pad 0 (video) and the 'Parsed_asetpts_1' filter input pad 0 (audio)
(AVFilterGraph # 0000017d2feac680) Cannot create the link select:0 -> asetpts:0
Error reinitializing filters!
Failed to inject frame into filter network: Invalid argument
Error while processing the decoded data for stream #0:1
Conversion failed!*
Thank you
Related
Env: Windows7, ffmpeg 4.2.2
copy the first 10 seconds from long.mp4 to UNO.mp4
copy sec 120 to sec 130 from long.mp4 to DUE.mp4
create List.txt with
file 'C:\Users\Admin\Videos\UNO.mp4'
file 'C:\Users\Admin\Videos\DUE.mp4'
here the ffprobe output of the two files:
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'UNO.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.29.100
Duration: 00:00:10.04, start: 0.000000, bitrate: 671 kb/s
Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, smpte170m/smpte170m/bt709), 640x360 [SAR 1:1 DAR 16:9], 536 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
Metadata:
handler_name : ISO Media file produced by Google Inc. Created on: 09/18/2020.
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)
Metadata:
handler_name : ISO Media file produced by Google Inc. Created on: 09/18/2020.
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'DUE.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.29.100
Duration: 00:00:11.96, start: 0.000000, bitrate: 657 kb/s
Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, smpte170m/smpte170m/bt709), 640x360 [SAR 1:1 DAR 16:9], 524 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
Metadata:
handler_name : ISO Media file produced by Google Inc. Created on: 09/18/2020.
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 127 kb/s (default)
Metadata:
handler_name : ISO Media file produced by Google Inc. Created on: 09/18/2020.
use the two files as input to
ffmpeg -f concat -safe 0 -i "C:\Users\Admin\Videos\List.txt" -c copy "C:\Users\Admin\Videos\mergedVideo.mp4"
it outputs:
mov,mp4,m4a,3gp,3g2,mj2 # 00be7f80] Auto-inserting h264_mp4toannexb bitstream filter
nput #0, concat, from 'C:\Users\Admin\Videos\List.txt':
Duration: N/A, start: 0.000000, bitrate: 825 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 624x352 [SAR 1:1 DAR 39:22], 697 kb/s, 25 fps, 25
tbr, 90k tbn, 50 tbc
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s
Metadata:
handler_name : SoundHandler
utput #0, mp4, to 'C:\Users\Admin\Videos\mergedVideo.mp4':
Metadata:
encoder : Lavf58.29.100
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 624x352 [SAR 1:1 DAR 39:22], q=2-31, 697 kb/s, 25
fps, 25 tbr, 90k tbn, 90k tbc
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s
Metadata:
handler_name : SoundHandler
tream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
then a long series of :
mp4 # 00c43c40] Non-monotonous DTS in output stream 0:0; previous: 899370, current: 720000; changing to 899371. This may result in incorrect timestamps in the output file.
at end as last messages :
rame= 552 fps=528 q=-1.0 Lsize= 2220kB time=00:00:20.01 bitrate= 908.4kbits/s speed=19.2x
ideo:1873kB audio:329kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.827539%
When i play the output mergedVideo.mp4 with ffplay, it does not gove errors
it is only a time stamp problem, or some frames or some audio are lost ?
in the latter case, is there a parameter to correct the problem, or i have to re-encode ?
(to further test, i tried with avidemux an it concats UNO.mp4 and DUE.mp4 without re-encoding)
Thanks in advance to all for the support
Maurizio
First of all, unless you call FFmpeg with the -xerror option (which you didn't) "Non-monotonous DTS..." message is not an error. It's just a warning. It is just informing what it's doing for you, and thankfully its automatic adjustment indeed worked for your case base on your description.
It is making the adjustment because you are concatenate-and-copying streams, of which data frame carries timestamp (unlike WAV or MPEG streams). The concat demuxer likely cannot adjust the timestamp in the stream data on the fly (to avoid the warnings/corrections from the main ffmpeg program).
The bottom line. If the warning messages must go, change the log level to ignore warning: -loglevel error.
Reference ffmpeg.c Lines 817-834
ffmpeg -vsync 0 -hwaccel cuda -hwaccel_output_format cuda -c:v
mpeg4_cuvid -i "F:\dataset\celeb-df-v1\Celeb-real\id0_0002.mp4"
-vcodec mpeg4 -b:v 574k -y "F:\dataset\celeb-df-v1\compress\id0_0002.mp4"
It keeps reporting errors like:
Impossible to convert between the formats supported by the filter
'Parsed_null_0' and the filter 'auto_scaler_0' Error reinitializing
filters! Failed to inject frame into filter network: Function not
implemented Error while processing the decoded data for stream #0:0
Here is my video info
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'F:\dataset\celeb-df-v1\\Celeb-real\id0_0002.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2mp41
encoder : Lavf58.3.100
Duration: 00:00:11.67, start: 0.000000, bitrate: 1148 kb/s
Stream #0:0(und): Video: mpeg4 (Simple Profile) (mp4v / 0x7634706D), yuv420p, 942x500 [SAR 1:1 DAR 471:250], 1146 kb/s, 30 fps, 30 tbr, 90k tbn, 30 tbc (default)
Metadata:
handler_name : VideoHandler
vendor_id : [0][0][0][0]
Stream mapping:
Stream #0:0 -> #0:0 (mpeg4 (mpeg4_cuvid) -> mpeg4 (native))
Press [q] to stop, [?] for help
I have two video (with audio) clips that I want to join. The first clip has the following format:
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 358 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, stereo, fltp, 192 kb/s (default)
Metadata:
handler_name : SoundHandler
Side data:
audio service type: main
And the second:
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 320x240, 88 kb/s, 8 fps, 8 tbr, 16384 tbn, 16 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: ac3 (ac-3 / 0x332D6361), 11025 Hz, mono, fltp, 96 kb/s (default)
Metadata:
handler_name : SoundHandler
Side data:
audio service type: main
I want to join the two clips; the first followed by the latter while keeping the format options of the second clip.
Based on reading the documentation and other questions I have reached the following command:
ffmpeg -i secondClip.mp4 -i firstClip.mpg -filter_complex "[1:v:0][0:v:0]scale2ref=oh*mdar:ih[2nd][ref],[2nd][1:a:0][ref][0:a:0]concat=n=2:v=1:a=1[outv][outa]" -map "[outv]" -map "[outa]" output.mp4
This gives the following errors:
Stream mapping:
Stream #0:0 (h264) -> scale2ref:ref
Stream #0:1 (ac3) -> concat:in1:a0
Stream #1:0 (mpeg2video) -> scale2ref:default
Stream #1:1 (mp2) -> concat:in0:a0
concat:out:v0 -> Stream #0:0 (libx264)
concat:out:a0 -> Stream #0:1 (aac)
Press [q] to stop, [?] for help
[Parsed_concat_1 # 0000017896b6f400] Input link in1:v0 parameters (size 320x240, SAR 0:1) do not match the corresponding output link in0:v0 parameters (426x240, SAR 640:639)
[Parsed_concat_1 # 0000017896b6f400] Failed to configure output pad on Parsed_concat_1
Error reinitializing filters!
Failed to inject frame into filter network: Invalid argument
Error while processing the decoded data for stream #0:0
Conversion failed!
Using ffmpeg to replace audio in a QuickTime with audio from a WAV.
Anyone know why I'm getting Referenced QT chapter track not found?
Command:
$ ffmpeg \
-i "$video" -t 25 \
-i "$audio" -map 0:v -c:v copy -map 1:a -c:a pcm_s24le -ar 48000 \
-hide_banner "$output"
Output:
[mov,mp4,m4a,3gp,3g2,mj2 # 0x7faf62010600] Referenced QT chapter track not found
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'video.mov':
Metadata:
major_brand : qt
minor_version : 537199360
compatible_brands: qt
creation_time : 2018-11-06T09:27:43.000000Z
Duration: 00:00:25.00, start: 0.000000, bitrate: 186987 kb/s
Stream #0:0(eng): Video: prores (apch / 0x68637061), yuv422p10le(bt709, progressive), 1920x1080, 185115 kb/s, SAR 1:1 DAR 16:9, 25 fps, 25 tbr, 25 tbn, 25 tbc (default)
Metadata:
creation_time : 2018-11-06T09:27:43.000000Z
handler_name : Apple Alias Data Handler
encoder : Apple ProRes 422 (HQ)
timecode : 00:00:00:00
Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, stereo, s16, 1536 kb/s (default)
Metadata:
creation_time : 2018-11-06T09:27:43.000000Z
handler_name : Apple Alias Data Handler
timecode : 00:00:00:00
Stream #0:2(eng): Data: none (tmcd / 0x64636D74), 0 kb/s (default)
Metadata:
creation_time : 2018-11-06T09:27:43.000000Z
handler_name : Apple Alias Data Handler
timecode : 00:00:00:00
Guessed Channel Layout for Input Stream #1.0 : stereo
Input #1, wav, from 'audio.wav':
Metadata:
encoded_by : Pro Tools
originator_reference: aaOpKJaTN7Nk
date : 2018-11-08
creation_time : 13:53:50
time_reference : 166698000
Duration: 00:00:25.00, bitrate: 2128 kb/s
Stream #1:0: Audio: pcm_s24le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s32 (24 bit), 2116 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #1:0 -> #0:1 (pcm_s24le (native) -> pcm_s24le (native))
Press [q] to stop, [?] for help
Output #0, mov, to 'test19.mov':
Metadata:
major_brand : qt
minor_version : 537199360
compatible_brands: qt
encoder : Lavf58.12.100
Stream #0:0(eng): Video: prores (apch / 0x68637061), yuv422p10le(bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 185115 kb/s, 0.04 fps, 25 tbr, 12800 tbn, 25 tbc (default)
Metadata:
creation_time : 2018-11-06T09:27:43.000000Z
handler_name : Apple Alias Data Handler
encoder : Apple ProRes 422 (HQ)
timecode : 00:00:00:00
Stream #0:1: Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, stereo, s32 (24 bit), 2304 kb/s
Metadata:
encoder : Lavc58.18.100 pcm_s24le
frame= 625 fps=277 q=-1.0 Lsize= 566343kB time=00:00:24.96 bitrate=185876.0kbits/s speed=11.1x
video:564928kB audio:1406kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.001496%
Same error with -map 0:v:0
Output looks to be created without errors.
What the error means is that MOV header indicates that a text track with chapter titles and timestamps is present but FFmpeg can't actually find that track in the file.
Adding -ignore_chapters 1 before -i "$video" will stop ffmpeg from looking for that track.
While traversing my personal video collection with ffprobe, I ran into several such errors, including:
[mov,mp4,m4a,3gp,3g2,mj2 # 000000000039a980] Referenced QT chapter
track not found
and...
[mp3float # 000000000079bb80] Header missing
From what I can tell, these are non-fatal errors that seem to simply be an indicator of the video's original encoder doing a bad or incomplete job, and so for a video collection that's large enough and sourced from enough disparate sources, I'd guess that it would be a mathematical likelihood to run into at least a few of these errors while analysing the entire collection. For obvious reasons, however, it makes sense to want to suppress these errors since they aren't needed and look unseemly in STDOUT.
There seems to be no such -ignore-chapters option for ffprobe, but I was able to suppress all of these non-fatal errors by adding -v fatal, which changes the command's loglevel to only display fatal errors (the default shows fatal and non-fatal errors, warnings and extra information). This option doesn't suppress ffprobe's output, which is printed as normal.
While converting avi video to ogv, there is a color problem in output file.
How can I solve this issue ?
normal colors altered colors
Actually a part of the problem is from the player - so weak question
Command using ffmpeg-3.3.2-1.mga6.tainted :
ffmpeg -i dscn0146.avi -pix_fmt yuv422p -s 640x480 dscn0146_hq.ogv -y
And input metadata:
Guessed Channel Layout for Input Stream #0.1 : mono
Input #0, avi, from 'dscn0146.avi':
Metadata:
encoder :
maker : NIKON
model : COOLPIX S3500
creation_time : 2017-07-22 12:09:06
Duration: 00:00:07.33, start: 0.000000, bitrate: 11091 kb/s
Stream #0:0: Video: mjpeg (MJPG / 0x47504A4D), yuvj422p(pc, bt470bg/unknown/unknown), 640x480, 10770 kb/s, 30 fps, 30 tbr, 30 tbn, 30 tbc
Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 22050 Hz, mono, s16, 352 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (mjpeg (native) -> theora (libtheora))
Stream #0:1 -> #0:1 (pcm_s16le (native) -> vorbis (libvorbis))
Processes normaly, but fires a warning:
[swscaler # 0xd3c3a0] deprecated pixel format used, make sure you did set range correctly
Output metadata:
Output #0, ogv, to 'dscn0146_hq.ogv':
Metadata:
model : COOLPIX S3500
maker : NIKON
encoder : Lavf57.71.100
Stream #0:0: Video: theora (libtheora), yuv422p(progressive), 640x480, q=2-31, 200 kb/s, 30 fps, 30 tbn, 30 tbc
Metadata:
encoder : Lavc57.89.100 libtheora
model : COOLPIX S3500
maker : NIKON
Stream #0:1: Audio: vorbis (libvorbis), 22050 Hz, mono, fltp
Metadata:
encoder : Lavc57.89.100 libvorbis
model : COOLPIX S3500
maker : NIKON
this working code
ffmpeg -i totoa.avi -c:v libtheora -q:v 10 -c:a libvorbis -q:a 5 -s 640x480 -y toto.ogv