Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

share|improve this question
    
Did you forget to complete the last sentence? –  Karan Feb 27 '13 at 4:49
add comment

1 Answer

up vote 2 down vote accepted

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.

share|improve this answer
1  
more precisely touch filename.utah –  HairOfTheDog Feb 27 '13 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. –  Jon Mcdonald Feb 27 '13 at 2:05
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.