Thread: Creating a video playback software

  1. #1
    Registered User
    Join Date
    Nov 2020
    Posts
    18

    Creating a video playback software

    I am very new to C programming, and I've spent the past several days learning all the functions, variables, pointers, basically all the basic components that C has to offer.

    I'm trying to create a video playback software, and I need some tips on how to get started. I'm more than willing to do the studies myself, so I just need some pointers on how to begin. I'm not looking for tutorials, as I want to study and create it all on my own. But I just need some direction to simply get started.

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Quote Originally Posted by leopoldo100
    I am very new to C programming, and I've spent the past several days learning all the functions, variables, pointers, basically all the basic components that C has to offer.
    Since you mention "very new to C programming" specifically, does this mean that you're coming from a programming background, i.e., you're already familiar with all the basic algorithms and data structures stuff, and you already have a good idea of how to design and organise programs larger than those found in introductory programming textbooks? Are you familiar with unit testing and the use of a version control system?

    I ask because from your previous posts, you gave me the impression that you're new to programming in general, in which case you might want to build your basic skills first before trying to tackle something like this. For example, your calculator idea is not a bad one: you can start with a simple text-based one where you learn how to parse the infix notation such that your program can do the calculations. Then later you can learn the GUI APIs necessary to create a GUI version.

    Quote Originally Posted by leopoldo100
    I'm trying to create a video playback software, and I need some tips on how to get started. I'm more than willing to do the studies myself, so I just need some pointers on how to begin.
    I would begin by understanding the problem. For example, I have a vague idea that in the video world, there are codecs and containers. If you aren't already clear on what these are, you would need to learn about them. Then you might decide what you're trying to tackle, e.g., are you trying to implement a codec, or are you going to make use of an existing library and write a frontend video player, etc.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    Registered User
    Join Date
    Nov 2020
    Posts
    18
    Quote Originally Posted by laserlight View Post
    Since you mention "very new to C programming" specifically, does this mean that you're coming from a programming background, i.e., you're already familiar with all the basic algorithms and data structures stuff, and you already have a good idea of how to design and organise programs larger than those found in introductory programming textbooks? Are you familiar with unit testing and the use of a version control system?

    I ask because from your previous posts, you gave me the impression that you're new to programming in general, in which case you might want to build your basic skills first before trying to tackle something like this. For example, your calculator idea is not a bad one: you can start with a simple text-based one where you learn how to parse the infix notation such that your program can do the calculations. Then later you can learn the GUI APIs necessary to create a GUI version.


    I would begin by understanding the problem. For example, I have a vague idea that in the video world, there are codecs and containers. If you aren't already clear on what these are, you would need to learn about them. Then you might decide what you're trying to tackle, e.g., are you trying to implement a codec, or are you going to make use of an existing library and write a frontend video player, etc.
    It'll be a basic video playback software where someone uploads a video file and it plays it. That's it.
    I have no prior experience in programming, and C is the first language I am trying to learn. I am purposefully giving myself a challenge so that I learn a lot in the process. I can make a text based calculator easily, and I've already done it as part of my practice.

    Basically I know the basic components, like loops, variables, strings, arrays, pointers (not 100%, still a bit confusing), header files (some), dynamic memory allocation, functions, and am now getting into linked lists.

    I'm trying to step up my gear because I feel that I am really slow right now. I have started learning C about a month ago, actually a little bit less than that. I've heard CS classes at universities gives students projects like making a game, stock trading ai, etc. I'm already almost a month in and I can't make a game right now. I'm sure classes give projects like these as homeworks like the first week or so of starting class, and I'm a month in. So I'm giving myself a more challenging project so I learn as I go while creating.

    P.S: I've only used command prompt for practice coding sessions. So far I've made a calculator, file storage management system (practicing creating, writing, editing files) /w a password, inventory handling system (practicing arrays), and that mage warrior healer project you know about. I've created mini projects for each new concept I was learning, so I've made more than that but those were the more "complex" ones to test my knowledge by utilizing different learned components.
    Last edited by leopoldo100; 12-07-2020 at 09:13 PM.

  4. #4
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Quote Originally Posted by leopoldo100
    It'll be a basic video playback software where someone uploads a video file and it plays it. That's it.
    What do you mean by "upload"? I would expect something like the the user providing the path to a file, whereas "upload" tends to have connotations of transferring a file over a network.

    As for "it plays it": that's back to my previous post: are you trying to implement a codec, or are you going to make use of an existing library and write a frontend video player, etc. Frankly, I don't have the background to advise you specifically, i.e., this is not an area that I am familiar with. Maybe it is actually quite easy because there are readily available libraries that you can patch together, but if you're trying to do this from scratch as you seem to want to, I would rate this more a final year university project or a penultimate year group project than a first year project, much less something I'd expect from someone in their first semester (or with just a month's worth of experience).

    So maybe it is a good long term goal, but I'm not sure if you're really going to go faster by attempting something like this because it seems to me that there's a great deal of research involved rather than actually learning fundamental programming and computer science concepts. Keep in mind also the notion that it is faster to build a 3 inch telescope and then build a 6 inch telescope than it is to build a 6 inch telescope, i.e., doing easier stuff to build a strong foundation and then attempting the harder stuff is ultimately faster than trying to do the harder stuff straightaway.

    Quote Originally Posted by leopoldo100
    I can make a text based calculator easily, and I've already done it as part of my practice.
    Is your text-based calculator able to correctly evaluate the expression (-5 * (4 - 7) + 1) / (20 / 10)? That's a fairly typical first-year university programming homework question, so if you haven't gotten to that point yet, it would be good practice.

    Quote Originally Posted by leopoldo100
    Basically I know the basic components, like loops, variables, strings, arrays, pointers (not 100%, still a bit confusing), header files (some), dynamic memory allocation, functions, and am now getting into linked lists.
    That's good.

    Quote Originally Posted by leopoldo100
    I'm trying to step up my gear because I feel that I am really slow right now. I have started learning C about a month ago, actually a little bit less than that. I've heard CS classes at universities gives students projects like making a game, stock trading ai, etc. I'm already almost a month in and I can't make a game right now. I'm sure classes give projects like these as homeworks like the first week or so of starting class, and I'm a month in.
    Not even rock-paper-scissors, tic-tac-toe, or some kind of "guess the number" game? Those are the kind of games that beginners are expected to start with. As for "stock trading ai": it'll probably be some simple stock trading simulation.
    Last edited by laserlight; 12-07-2020 at 10:47 PM.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  5. #5
    Registered User
    Join Date
    Nov 2020
    Posts
    18
    Quote Originally Posted by laserlight View Post
    What do you mean by "upload"? I would expect something like the the user providing the path to a file, whereas "upload" tends to have connotations of transferring a file over a network.

    As for "it plays it": that's back to my previous post: are you trying to implement a codec, or are you going to make use of an existing library and write a frontend video player, etc.


    Is your text-based calculator able to correctly evaluate the expression (-5 * (4 - 7) + 1) / (20 / 10)? That's a fairly typical first-year university programming homework question, so if you haven't gotten to that point yet, it would be good practice.


    That's good.


    Not even rock-paper-scissors, tic-tac-toe, or some kind of "guess the number" game? Those are the kind of games that beginners are expected to start with. As for "stock trading ai": it'll probably be some simple stock trading simulation.
    It was a very simple calculator, so no I don't think it can do those kind of operations. I can give it a go though for practice!
    I haven't created those kinds of games yet. I will definitely try and make those for good practice.

    By upload, I mean the user selects a video file from their computer and it plays on the player. That, or the user can drag and drop media files in and it plays it. Kinda like a much simpler version of VLC.

  6. #6
    Registered User
    Join Date
    Feb 2019
    Posts
    1,078
    leopoldo100, when you say "very simple" it means from a user point of view. Video players aren't "simple", even when using some library (like ffmpeg's libav*).

  7. #7
    Registered User
    Join Date
    Nov 2020
    Posts
    18
    Quote Originally Posted by flp1969 View Post
    leopoldo100, when you say "very simple" it means from a user point of view. Video players aren't "simple", even when using some library (like ffmpeg's libav*).
    Yes, I am very aware of that. By "very simple" I was meaning it from the user point of view. It won't have any other functions besides what I have mentioned. I've already said "I wanted to give myself a challenging project", so yes I am 100% aware this project will not be simple. I purposefully gave myself a tough assignment so I can learn heaps while doing it.

    That being said, if anyone has any pointers in getting started, I would greatly appreciate the help.

  8. #8
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    But you already have a few pointers to get started: I mentioned reading up on topics like codecs and containers; flp1969 mentioned a library.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  9. #9
    Registered User
    Join Date
    Nov 2020
    Posts
    18
    Quote Originally Posted by laserlight View Post
    But you already have a few pointers to get started: I mentioned reading up on topics like codecs and containers; flp1969 mentioned a library.
    Okay, thank you. I'll have to start studying the general structure of computer programming first as for now I've only done function based studies. I think I'll actually hold off on the video playback project and take on more manageable projects as I go, just as I have done so far with the basics.

    Do you have any recommendations for books I can read to study this? I was thinking of getting C programming for Dummies to start.

  10. #10
    Registered User
    Join Date
    May 2009
    Posts
    4,183
    DO NOT TRUST the information on the non-official c-for-dummies.com website. I wasted two hours because they implied getline was a part of standard C; it is only part of POSIX C.

    The getline() Function | C For Dummies Blog

    Tim S.
    "...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson

  11. #11
    Registered User
    Join Date
    May 2012
    Location
    Arizona, USA
    Posts
    945
    Quote Originally Posted by stahta01 View Post
    DO NOT TRUST the information on the non-official c-for-dummies.com website. I wasted two hours because they implied getline was a part of standard C; it is only part of POSIX C.

    The getline() Function | C For Dummies Blog

    Tim S.
    To be fair, getline is also defined by a standard extension to C as ISO/IEC TR 24731 (Dynamic Allocation Functions), though it's not part of the C standard itself.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Creating software
    By Krewella in forum C Programming
    Replies: 8
    Last Post: 06-30-2016, 11:37 AM
  2. Replies: 14
    Last Post: 07-31-2010, 12:45 PM
  3. Creating Video Encoder/Decoder Question
    By chiefmonkey in forum C++ Programming
    Replies: 6
    Last Post: 05-08-2009, 11:02 AM
  4. Creating handheld video games(odd question)
    By nubby in forum Tech Board
    Replies: 0
    Last Post: 03-11-2008, 04:18 PM
  5. Creating Demo Software?
    By DanMan in forum C++ Programming
    Replies: 4
    Last Post: 10-24-2001, 10:33 AM

Tags for this Thread