hello there i have a movie clip which is in mkv container
i separated its video with following code
and also separated its audio with following codeCode:ffmpeg -i input.mkv -c:v copy -an video.mkv
Code:ffmpeg -i input.mkv -vn -c:a copy audio.ac3
after that i rencoded video with 2 pass rate control mode using this code
and also rencoded audio with this codeCode:ffmpeg -y -i video.mkv -c:v libx264 -vf scale=426:240 -b:v 400k -pass 1 -f null NUL && ^ ffmpeg -i video.mkv -c:v libx264 -vf scale=426:240 -b:v 400k -pass 2 v.mkv
Code:ffmpeg -i audio.ac3 -ac 2 -c:a libopus -b:a 128k a.opus
now i have 2 separated file
v.mkv = contains only video
a.opus = contains only audio
too combine them in mp4 i used this code
but it gave me this resultsCode:ffmpeg -i v.mkv -i a.opus -c copy clip.mp4
[Attachment 63598 - Click to enlarge]
[Attachment 63599 - Click to enlarge]
when i combine them in mkv it does not shows any yellow line that track 1: codec frame size is not set
but i want my final clip in mp4 without that yellow line
how can i fix this?
+ Reply to Thread
Results 1 to 24 of 24
-
Anonymous543Guest
-
Anonymous543Guest
when i done encoding with same settings on my source input.mkv(without separating audio and video) using this code
Code:ffmpeg -y -i input.mkv -vf scale=426:240 -c:v libx264 -preset ultrafast -b:v 400k -pass 1 -an -f null NUL && ^ ffmpeg -i input.mkv -vf scale=426:240 -c:v libx264 -preset ultrafast -b:v 400k -pass 2 -ac 2 -filter:a "volume=1.2" -c:a libopus -b:a 128k output.mp4
when i watched mediainfo of both encoding outputs..
1st output.mp4 which i got by separating audio and video then rencoded with yellow line error
2nd output.mp4 which was directly done to source
both outputs mediainfo is almost sameLast edited by Anonymous543; 11th Mar 2022 at 05:48.
-
try creating the audio inside a mkv container instead of writing it to a raw opus file.
My guess is the warning happens since ffmpeg isn't totally sure that the .opus stream does not contain just audio.
Cu Selurusers currently on my ignore list: deadrats, Stears555, marcorocchini -
Anonymous543Guest
-
Anonymous543Guest
will that yellow line cause any latency in my audio track or any bad affect on my output any way?
-
will that yellow line cause any latency in my audio track or any bad affect on my output any way?users currently on my ignore list: deadrats, Stears555, marcorocchini
-
Anonymous543Guest
still its a mystery, why this problem occurring while combining h264 video stream and opus audio stream in mp4 wrapper
-
Anonymous543Guest
It will be successful..
But if the
h264video.mkv(or any wrapper)(only video stream) and
lipopus.opus(only audio stream)
Are separated
ThenCode:ffmpeg -i h264video.mkv -i libopus.opus -c copy output.MP4
-
this here - https://holtstrom.com/michael/blog/post/517/MKV-to-MP4.html
says to use -acodec ac3 instead of -acodec copy it should solve your codec frame size is not set error -
Anonymous543Guest
But i want my final output in MP4 container with libx264 as my video codec and libopus as my audio codec
-
Anonymous543Guest
https://askubuntu.com/questions/768762/combine-h-264-video-and-opus-audio-stream-into-...audio%20tracks.
According to this website MP4 can't have opus audios with h264 video
After checking that website i readed about opus in Wikipedia
https://en.m.wikipedia.org/wiki/Opus_(audio_format)
Opus is Contained by
Ogg, Matroska, WebM, MPEG-TS
May be that's why MP4 is having issues with Opus audio track in ffmpeg -
Anonymous543Guest
Thanks for suggestion
But i still wanna know why ffmpeg is giving yellow line..
We can combine audio + video streams in mkv wrapper without yellow line ,
We can also combine them in mp4 wrapper but it gives yellow line ,i think it's ffmpeg bug or something is going wrong may be container issue or something else
There's one report on same issue on ffmpeg website here
https://ffmpeg.org/pipermail/ffmpeg-user/2018-February/038999.html
They suggested to rencode audio stream instead of copying codecs..but why it will need when my audio stream is already encoded in opus -
ffmpeg bug tracker (https://trac.ffmpeg.org/) or the mailing list you youself linked to might be a good place to contact the ffmpeg authors.
users currently on my ignore list: deadrats, Stears555, marcorocchini -
Anonymous543Guestffmpeg bug tracker (https://trac.ffmpeg.org/) or the mailing list you youself linked to might be a good place to contact the ffmpeg authors.
-
The MP4 writer tries to determine if the audio track is VBR, for the purposes of the some of the further metadata it has to write. It checks the encoded audio frame size as part of that. The MKV writer does not do this.
Since you're remuxing, that data isn't available for Opus, so the writer complains. But there is no deficiency with the file.
I'll change the log level for that message - not really something for general users to be concerned with. -
Anonymous543Guest
(am not sure)it can be problematic if we change remux audio which is also resampled..then maybe resampled audio framesize will be changed and can cause audio track end before video ends or can cause latency in track in short it cant be sync properly i guess..
what if sourceaudiovideo is not separated and rencoded together then this data will be available for mp4 writter? -
The decoder will pick up the frame size from the stream itself.
Yes, if there's an Opus encoder running in the process, it will fill out the frame size.
Similar Threads
-
Replacing audio track in MP4 with FFMPEG
By nicksteel in forum Video ConversionReplies: 2Last Post: 7th Aug 2021, 17:20 -
ffmpeg losing subtitle track converting MP4 to MP4
By the_steve_randolph in forum Newbie / General discussionsReplies: 9Last Post: 31st May 2021, 16:42 -
Set a default subtitle track in a .mp4 file (with BOX4)
By Alice in forum SubtitleReplies: 1Last Post: 4th Oct 2020, 16:38 -
FFMPEG Conversion from MKV to MP4 returns a empty MP4 file?
By lolmaisine in forum Video ConversionReplies: 4Last Post: 6th Mar 2019, 07:45 -
ffmpeg convert from mkv to mp4 [matroska,webm @ 0x1d06640] Read error at
By blurry in forum Video ConversionReplies: 6Last Post: 15th Jan 2018, 05:36