Video encoding question

Forum: LinuxTotal Replies: 6
Author Content
techiem2

May 07, 2010
12:03 PM EDT
We are doing some work with video formats for our digital sign here at the college. Our video making teacher wants to supply videos in h264 mov format (yeah yeah, I know. He's a Macster). The file he gave me the other day loses audio sync very quickly. There are a couple videos on the box already that play fine (not from him I don't think).

The only difference is that midentify shows the existing files with ID_AUDIO_FORMAT=twos and the file he gave me with ID_AUDIO_FORMAT=1.

Can someone enlighten me as to what this means? We would LIKE to be able to have him output the videos and upload them. Otherwise he has to give them to me so I can run them through ffmpeg to convert them to happily running mpeg (I can't see the quality diff, but picky people like him might) then upload them.

Thanks!
vect

May 08, 2010
1:49 AM EDT
Why is it your problem if his video files aren't syncing correctly with the audio?

I would put ffmpeg on the server and write a script that uses ffmpeg to covert his videos. I would also use the -sameq flag and -vcodec libx264.
techiem2

May 08, 2010
12:25 PM EDT
It's my problem cuz I manage the server and want to make things as easy as possible (i.e. less work for me). :)

I have a processing script on the server, but I don't think I have video re-encoding enabled. I think I coded it to possibly re-encode if the resolution is different, but the option is off. Maybe having it check the codec and formats as well would be good....

The interesting thing is, if I play the video on my machine, it plays perfectly. The main difference between my machine and the server is that I have a real video card (Nvidia 256MB) and the server has an integrated Intel something or other. Of course, if I run his video through ffmpeg to convert it to an mpeg it plays fine on the server. heh.
vect

May 08, 2010
2:29 PM EDT
I thought most servers only served files to a client and the client's computer rendered them. Am I wrong?

It sounds like a fun challenge and so here's what I _think_ I would do.

I would create a table or file for storing locations of videos. All video files would be in one directory. I would have a script query the table twice a day and compare the names of the video files to names of videos in the directory. If a video in the directory was not found in database ffmpeg would automatically process it and the output video would have a unique name like 'bruce_lee_wxpg445c2e.mov'. The new video information would be added to the database and the pre-processed video would be removed.

If the website was static, I would write something to parse the html page and add html for the new video.
vect

May 08, 2010
2:35 PM EDT
It would also be fun to write these things with something that is either obscure or something that I have never used before, like 'haskell' or 'go'. Since you're a student you get to do cool and arguably impractical stuff like that.
gus3

May 08, 2010
4:34 PM EDT
SMB/NFS server Print server Web server DNS server DHCP server FTP server NIS server Proxy server SMTP/POP3 server NTP server Rendering server X server NNTP server

Only SMB/NFS and FTP are guaranteed to serve files only, although SMTP/POP3 and NNTP infrastructures usually use files for their message store. Any web server configured for CGI can serve generated content, in addition to static files.

In the case of a rendering server, one powerful SMP system can do better than several weaker desktop systems.
techiem2

May 09, 2010
2:43 AM EDT
It's not a server that feeds video to clients. It's a full digital sign system I designed and setup.

It's a Gentoo box running a 42"? LCD TV at 1280x720. It's running a fluxbox session with mplayer running full screen controlled by fifo file input for reloading playlist after changes, playing items specified in the quick-access slots, etc. There's a web interface to allow for uploading new files, editing the playlist, etc. My processing script has some conversion capabilities built in, but they are not enabled since we've been trying to upload content that doesn't need to be changed (and we realized that resizing things up generally leaves us with videos of unacceptable quality loss). Right now the processing script is primarily used for converting an image to a video of x length, I don't think any other features are enabled right now.

I did notice a bug when I was messing with things the other day...guess I need to dive my code on there again and find it (fortunately not a feature we use other than for testing).

And I'm not a student, I'm the Assistant to the CTO. :)

I've got some info on it on one of my wikis somewhere or other...really need to update it probably...

You cannot post until you login.