0

For a class I am creating a custom codec called .utah. The whole idea is to immerse ourselves in a large and unfamiliar code base. So far this has been very fun, and to start we have created a .utah decoder file that will simply print hello world out to the console. The problem is, if we take a .png file and rename it with a .utah, ffmpeg won't route it (at all) and if we create a .utah file using a text editor, it will save as a text file even with a .utah extension.

The question is how do we create an empty file with our own extension (in this case .utah) to test that what will happen when we pass a file to ffplay, to ensure it's properly routing to our file. More concisely, can we create a dummy .utah file that is empty but has a

1
  • Did you forget to complete the last sentence?
    – Karan
    Feb 27, 2013 at 4:49

1 Answer 1

2

I'm assuming that you're working on a linux system (please use the appropriate tags). If so, you have two options for creating empty files with whatever name and extension you need.

touch filename.ext

or

echo -n "" > filename.ext

Added reference to extension based on @HairoftheDog's comment.

2
  • 1
    more precisely touch filename.utah Feb 27, 2013 at 1:32
  • Thank you kindly, my partner and I had tried this. Upon further inspection, something is wrong with our decoder implementation, because if we did something like touch filename.png ffplay would work. But doing that to generate a .utah file does not. This indicates that our decoder isn't working properly yet. Feb 27, 2013 at 2:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .