LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-26-2010, 08:09 AM   #1
Steve W
Member
 
Registered: Mar 2007
Distribution: Linux Mint 18.1
Posts: 522

Rep: Reputation: 44
mencoder and the lost icons


I edited some mpeg videos using Mencoder to crop unwanted footage from the beginning and the end. It worked, but now the file does not have a "visual" icon, i.e. a still from the video. The properties of the new file also reveal that it thinks it's an audio file! The file still plays (as a video) okay though.

A typical command I used to extract just the first 14 seconds of the video was:

mencoder "e03.mpg" -o ee03a.mpg -ss 0:0:0 -endpos 0:0:14 -oac copy -ovc copy

I did try to make up a new icon by making a snapshot of the movie playing, then using the image to replace the icon in the properties window. (I am using Nautilus file manager in Ubuntu). The icon it now gives me looks like a small sheet of paper with one end curled up.

I can appreciate that editing the video length might have "lost" the icon information, but is there any way I can put it back again?

Thanks for any help you can give.

Steve
 
Old 05-26-2010, 11:43 AM   #2
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora40
Posts: 6,152

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
Maybe you have broken the file in some way. Whatever is generating the preview is probably looking at the first frame it sees, which might be broken.

You might try avidemux - it is good at mending broken files.

Install it. Open your file. Tools -> Rebuild I & B frames. Wait.
File.. Save.. Save_Video

Give it a new filename ending with .mpg

Save it.
Any better?
 
Old 05-26-2010, 11:54 AM   #3
Steve W
Member
 
Registered: Mar 2007
Distribution: Linux Mint 18.1
Posts: 522

Original Poster
Rep: Reputation: 44
Well, I installed that package and followed your instructions. The new file was reduced to 245Kb (from 1.1Mb). I didn't need to tell it to rebuild frames - as soon as I opened the file, the program suggested it. It even brought up on the screen a "suggested" frame. No effect on the icon though. And it still thought it was a sound file - albeit a 245Kb one.

I feel I am on the right track - is there anything else with that Avidemux program I can try?

Steve
 
Old 05-26-2010, 01:14 PM   #4
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora40
Posts: 6,152

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
Quote:
The new file was reduced to 245Kb
Well, that's a start If it still works.
Quote:
is there anything else with that Avidemux program I can try?
To be honest, I haven't used it very much, and I am not at all sure what all its options do ( a bit like man mencoder - it just gives me a headache, with way too much information that I do not understand! )

avidemux will make mpgs -> other formats by re-encoding them, perhaps try this? Maybe some magical combination of options will eventually be applied. (avidemux probably uses mencoder to do this, but perhaps has a better idea of the correct mencoder options than I do).

I think my original suspicion might be right - the thumbnailing program looks at just the first frame in the file. In encoded video, there are generally whole-frames, and then difference-encodings for the next few frames, then another whole-frame etc. How all this is managed depends on all the different (da?ned) codecs. If your editor just makes a "cut" at a certain frame, then maybe your output file is starting with a "difference" frame, which is unrenderable without knowing about the preceeding frames, which you have cut.
The video will still play, because the player will discard the first few frames it cannot render.

Maybe try mplayer yourbadfilename.mpg in a terminal, perhaps some useful error information will be seen (Discarding ... because ....)

Otherwise, maybe start with your unedited file, and use something else to edit it.

I don't generally "do" video, unless it is point, click, play, on the BBC's website, so you have reached the limit of my (very limited) video knowledge.

Please post a follow-up if you manage to fix it, others will appreciate it.

HTH.
 
Old 05-27-2010, 02:32 AM   #5
Steve W
Member
 
Registered: Mar 2007
Distribution: Linux Mint 18.1
Posts: 522

Original Poster
Rep: Reputation: 44
Quote:
The new file was reduced to 245Kb
Well, that's a start If it still works.
No, it didn't even play that one. Although, as you say, error messages from a Shell-invoked running might have revealed why.

It isn't just this file, it is every mpeg I do this kind of cropping on, using Mencoder. I think I need to do "man mencoder" and look through the options - maybe there is an "index rebuilding" option somewhere. As you say, looking at the man pages for something like this can be quite a trawl. Maybe a Google search for some relevant web pages will reveal more.

But thanks for your advice.

Steve
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ubuntu-lost icons zzzfoot Ubuntu 2 04-26-2009 06:31 AM
Lost Workspace Icons with F7 JonBL Linux - Newbie 2 01-14-2008 12:13 AM
mencoder: voices lost, orchestra still there lagu2653 Linux - Software 1 11-04-2005 06:11 PM
9.1 -> 9.2 lost gnome icons mpachis SUSE / openSUSE 0 02-14-2005 11:09 PM
Icons in menu is lost. cobbe Mandriva 1 05-06-2004 10:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration