[FFmpeg-trac] #6650(ffmpeg:new): Re: previous post [feature request]
FFmpeg
trac at avcodec.org
Tue Sep 12 14:11:32 EEST 2017
#6650: Re: previous post [feature request]
-------------------------------------+-------------------------------------
Reporter: | Type:
thomas_johnson | enhancement
Status: new | Priority: important
Component: ffmpeg | Version:
Keywords: | unspecified
Blocking: | Blocked By:
Analyzed by developer: 0 | Reproduced by developer: 0
-------------------------------------+-------------------------------------
This is just a reply to my previous post, but because I promised I'll file
a new request if you don't see a comment I posted on my previous request
and therefore I'm filing new post here.
My previous post: https://trac.ffmpeg.org/ticket/6645
In my previous post I requested a feature: enable saving files to
different extensions. Some people from your team responded saying that
"Ffmpeg doesn't even determine format by extension, it determines format
by file content". So, apparently you've missed my point. Ffmpeg may (and
probably does) determine input format by file content. But, how in the
world Ffmpeg can determine output file format by its content? What are you
talking about?
Please read the previous post (if you didn't already), and more important:
read my last comment on that post, because I don't want to repeat
everything I've said in that comment. I will just remind you that in that
comment I've said that I had postead a question about this on stack
overflow, and ffmpeg experts responded that what I'm trying to do is not
easy at all and that I probably need to file a feature request here.
And when I filed my first feature request, you said that it is invalid
because ffmpeg determines format by file content and not by extension. I
really have no idea what you were talking about. Ffmpeg cannot detect
output file format by its content. Which content? Output file is not saved
yet, about which content are you talking about.
You probably didn't even read my previous feature request carefuly. My
feature request makes sense and if you didn't udnerstand what I had was
talking about, then I can explain it more clearly if you want.
Simply, what members of your team said (in comments on my previous
request, before it got invalidated) is outright false. How can ffmpeg
detect output format by its content? Output file is not saved yet, it has
no content. So, clearly ffmpeg detects output format by its extension.
Here is an example:
If I want to encode a png file into mp4 file, then I can do the following:
ffmpeg -hide_banner -i 1.png 1.mp4
But, what if I want my output file to be encoded as mp4 file, but to have
file name "2.png"? For this particular case, it is possible by providing
"-f mp4" commabnd line argument.
However, I asked on stack overflow: given extensions (lets say "mkv") and
given output file name (for example "2.mp4"), which command line arguments
one need to pass in order to encode file as mkv file, but file needs to be
named "2.mp4"? It turned out (and ffmpeg experts explained it) that it is
not easy. It is not easy at all, because each different extension require
different arguments to be passed. As I explained in previous post, for
example video files require "-f ext" where ext is target extension, and
image files require "-f image2 -c:v ext". But, definitelly, it is not for
all extensions and all video and image files.
I'm looking for a way to create a program which will for given file name
and target extension (different from real extension) output command line
arguemnts for ffmpeg required to encode file to that extension (like we
passed original extension in file name). In my previous post in comment,
members of your developer team explained that what I'm looking for is easy
and that there is no need for feature request and that ffmpeg already
detects format by file content and that extension is only fallback.
But, I've just explained here that no matter what you say, ffmpeg will
never be able to detect output format by file content, because output file
is not saved yet. There are two possibilities: 1) you've completelly
misunderstood my previous post or 2) you didn't even read my previous post
entirely.
Probably you underestimated (or didn't understand) what I was talking
about. To explain it again, I'm not ffmpeg expert, but people on stack
overflow know what they are talkign about. If it is still unclear what I'm
requestion, then ask me what is unclear to you and I'll explain it again,
as brief as I can.
IMPORTANT: Please don't post any comment here before you 1) Read my
previous post, 2) Read my last comment on my previous post and 3) Read
this whole post. I hope we will avoid further misunderstanding. Thanks.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/6650>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list