Special extensions m4v, ogv, ogm

Moderator: Moderator

User avatar
ubitux
Posts: 8
Joined: Sun Aug 30, 2009 6:28 pm
Contact:

Special extensions m4v, ogv, ogm

Postby ubitux » Wed Sep 02, 2009 7:19 am

Hi again!

I've try adding this in the /etc/mms/MovieConfig file:

Code: Select all

filetypes_m = m4v, mpeg
filetypes_m = ogv, ogv
filetypes_m = ogm, ogm


With this, I'm able to see the {m4v,ogv,ogm} files and play them without too much trouble.

But...

The first issue I found with m4v files is a segfault: if I select "list view" for videos, when I focus an m4v video, mms crash (but not with the default icons view). Maybe it's specific to the video, so you can try this one: http://miroir.toile-libre.org/rmll/RMLL_6.m4v if you want to confirm the issue...

And the second one is with ogm files. Here is some info about the video:

Code: Select all

01.ogm: Ogg data, OGM video (DivX 5)
    Stream #0.0: Video: mpeg4, yuv420p, 640x480, 23.98 tbr, 23.98 tbn, 23.98 tbc
    Stream #0.1: Audio: vorbis, 48000 Hz, stereo, s16, 128 kb/s
    Stream #0.2: Audio: vorbis, 48000 Hz, stereo, s16, 128 kb/s
    Stream #0.3: Subtitle: 0x0000


The issue is simply that thumbnails are f**ked up: it does not seem to be able to find the original frame, so every preview are made of gray and sometimes I can dicern some colors shapes in the thumbnail... Well, that second one is not a big deal.

As I'm using special extensions, I know I have to expect that kind of behavior. Thought, It may be a good thing to be aware of that...

Have a nice day :)

User avatar
Uatschitchun
Overlord
Posts: 3189
Joined: Tue Dec 06, 2005 6:55 pm
Location: Germany
Contact:

Re: Special extensions m4v, ogv, ogm

Postby Uatschitchun » Wed Sep 02, 2009 9:39 am

On first one pls post a bug-report in bug-db.

On second one, post a feature-request against ffmpeg-thumbnailer in bug-db, too ;)

Nice posts btw!
Lg
Roman

User avatar
ubitux
Posts: 8
Joined: Sun Aug 30, 2009 6:28 pm
Contact:

Re: Special extensions m4v, ogv, ogm

Postby ubitux » Sat Sep 05, 2009 8:22 am

Uatschitchun wrote:On first one pls post a bug-report in bug-db.


Al'right, here it is: http://bugs.mymediasystem.org/?do=details&task_id=1029

Edit: 'seems I've found a way to fix it, see first comment :)

Uatschitchun wrote:On second one, post a feature-request against ffmpeg-thumbnailer in bug-db, too ;)


I've asked for the OGM support on ffmpeg-thumbnailer bug tracker here: http://code.google.com/p/ffmpegthumbnai ... tail?id=36. But by looking at the mms code, I didn't found any direct call to ffmpeg-thumbnailer. Also, loswillios says me on IRC that mplayer is used when ffmpeg-thumbnailer is not available (which is the case on my install) so the issue may be relative to mplayer too (same libs I suppose).

Of course, concerning the ffmpeg-thumbnailer issue, I've tested it by hand before reporting it, and it has the issue.

Can anyone enlight me about the thumbnailing procedure? I would like to know how mplayer is used (if it's the case)

User avatar
acmelabs
Overlord
Posts: 2365
Joined: Mon Feb 20, 2006 9:18 pm
Location: Germany
Contact:

Re: Special extensions m4v, ogv, ogm

Postby acmelabs » Sat Sep 05, 2009 9:16 pm

ubitux wrote:The issue is simply that thumbnails are f**ked up: it does not seem to be able to find the original frame, so every preview are made of gray and sometimes I can dicern some colors shapes in the thumbnail... Well, that second one is not a big deal.

As I'm using special extensions, I know I have to expect that kind of behavior. Thought, It may be a good thing to be aware of that...

Have a nice day :)


So I've stopped using the internal thumbnailer, and modified the code for my purposes (MPEG4-AVC aka. AVCHD aka. H.264 ) a bit.
You could just try to add --disable-ffmpeg-thumb in your ./configure switch set, and see if it works for you, too.
This switch uses the old way MMS used to create thumbnails, and this was done simply with mplayer.

Unfortunately AVCHD footage from my camcorder can't be handled correctly by mplayer either (-fps 50 switch is needed badly), so I had to add a quite ugly workaround to mms-1.1.0/plugins/feature/movie/players/mplayer/mplayer.cpp. Here's the diff:

Code: Select all

--- mplayer.cpp.orig    2009-01-23 22:08:16.000000000 +0100
+++ mplayer.cpp 2009-01-24 19:28:10.000000000 +0100
@@ -332,9 +332,16 @@
     scale = "-vf scale=-2:" + conv::itos(height);

   int seeklength = conv::atoi(length)/2;
+
+  string mts_fps_50 = ""; //ugly workaround for .mts streams (AVCHD). For NTSC is must ne adjusted to 60

-  run::external_program(string("mplayer -noconsolecontrols -loop 1 -nojoystick -nolirc -nomouseinput -ao null ") + scale + " -frames 4 -vo jpeg:outdir=" + conf->p_temp_image_loc() + " -ss " + conv::itos(seeklength) + " " + string_format::escape_string(file) + " > /dev/null");
+  // debug
+  std::cout << "Extention: " << file.substr(file.length() - 4, file.length()) << std::endl;
+
+  if ( file.substr(file.length() - 4, file.length()) == ".mts" ) // if file extention is .mts,
+    mts_fps_50 = "-fps 50"; // then append "-fps 50" to mplayer

+    run::external_program(string("mplayer -noconsolecontrols -loop 1 -nojoystick -nolirc -nomouseinput -ao null ") + scale + " -frames 4 -vo jpeg:outdir=" + conf->p_temp_image_loc() + " -ss " + conv::itos(seeklength) + " " + string_format::escape_string(file) + " " + mts_fps_50 + " > /dev/null");

   add_thumbnail("mv", conf->p_temp_image_loc() + "/00000004.jpg");

This patch was against mms version 2121.

btw: this is my complete configure line:

Code: Select all

--use-internal-ffmpeg --enable-debug --enable-tv --enable-game --enable-weather --enable-opengl --enable-notify-area --enable-clock --enable-python --enable-lirc --enable-clock --disable-inotify --enable-alsaplayer --disable-ffmpeg-thumb


Regards,
Andreas

User avatar
ubitux
Posts: 8
Joined: Sun Aug 30, 2009 6:28 pm
Contact:

Re: Special extensions m4v, ogv, ogm

Postby ubitux » Sat Sep 05, 2009 9:34 pm

I've finally found the mplayer old code: plugins/feature/movie/players/mplayer/mplayer.cpp, line 298.

So by using a similar method, I generated a thumb of my ogm files, and it seems good. Here is the command I used:

Code: Select all

mplayer 01.ogm -ao null -vo jpeg -ss '00:10:00' -frames 1


So maybe I'm going to fallback to this method. Also, I don't understand why you don't use third party all-in-one apps like ffmpeg-thumbnailer. It's like the code I've recently patched about the mp4 issue; why don't you use common libs (ffmpeg?) which made all that crapy stuff?

The code of mms gets bigger because of that...

User avatar
acmelabs
Overlord
Posts: 2365
Joined: Mon Feb 20, 2006 9:18 pm
Location: Germany
Contact:

Re: Special extensions m4v, ogv, ogm

Postby acmelabs » Sat Sep 05, 2009 9:42 pm

ubitux wrote:So maybe I'm going to fallback to this method. Also, I don't understand why you don't use third party all-in-one apps like ffmpeg-thumbnailer. It's like the code I've recently patched about the mp4 issue; why don't you use common libs (ffmpeg?) which made all that crapy stuff?

The code of mms gets bigger because of that...

Yeah - This is addressed to Lorenzo and Anders I guess ;-) I'm not into such kind of business

Regards,
Andreas

lorenzodes
master
Posts: 772
Joined: Sun Mar 11, 2007 4:50 pm
Location: move.l 4.w,a6

Re: Special extensions m4v, ogv, ogm

Postby lorenzodes » Tue Sep 08, 2009 7:20 pm

ubitux wrote:I've finally found the mplayer old code: plugins/feature/movie/players/mplayer/mplayer.cpp, line 298.

So by using a similar method, I generated a thumb of my ogm files, and it seems good. Here is the command I used:

Code: Select all

mplayer 01.ogm -ao null -vo jpeg -ss '00:10:00' -frames 1


So maybe I'm going to fallback to this method. Also, I don't understand why you don't use third party all-in-one apps like ffmpeg-thumbnailer. It's like the code I've recently patched about the mp4 issue; why don't you use common libs (ffmpeg?) which made all that crapy stuff?

The code of mms gets bigger because of that...


The thumbnailer is actually based on ffmpeg.

The reason the Movie_info library doesn't use ffmpeg is because, at the time I coded it, ffmpeg was not a required dependency of mms. Basically ffmpeg was only used to display stuff on a Dxr3 card and that was just about it. At that time thumbnailing was performed via mplayer.

If you don't like the ffmpeg thumbnailer, you can easily enable the old mplayer thumbnailer at compilation time... or help improve the ffmpeg thumbnailer :P
"I’m not frightened of dying, anytime will do, I don’t mind. Why should I be frightened of dying? There’s no reason for it, you gotta go sometime"

User avatar
Uatschitchun
Overlord
Posts: 3189
Joined: Tue Dec 06, 2005 6:55 pm
Location: Germany
Contact:

Re: Special extensions m4v, ogv, ogm

Postby Uatschitchun » Wed Sep 09, 2009 6:09 am

Lg

Roman

lorenzodes
master
Posts: 772
Joined: Sun Mar 11, 2007 4:50 pm
Location: move.l 4.w,a6

Re: Special extensions m4v, ogv, ogm

Postby lorenzodes » Wed Sep 09, 2009 9:02 am

Uatschitchun wrote:I guess he was referring to:
http://code.google.com/p/ffmpegthumbnailer/


Oh, right. I think it is newer a project than our thumbnailer.

Why we should use that?
"I’m not frightened of dying, anytime will do, I don’t mind. Why should I be frightened of dying? There’s no reason for it, you gotta go sometime"

User avatar
ubitux
Posts: 8
Joined: Sun Aug 30, 2009 6:28 pm
Contact:

Re: Special extensions m4v, ogv, ogm

Postby ubitux » Wed Sep 09, 2009 1:14 pm

lorenzodes wrote:
Uatschitchun wrote:I guess he was referring to:
http://code.google.com/p/ffmpegthumbnailer/


Oh, right. I think it is newer a project than our thumbnailer.

Why we should use that?


It's been used in other projects (thunar for example) so it can avoid code redondancy between projects, lighten the source code, etc. Also, the svn code has a first implementation of "intelligent" thumb finder (-p option) which can be interested to work on. By using that kind of third-party application, MMS can be improved even without working on the thumbnailer. Of course, it's my opinion.

At the end of the month, I may be able to find time to help on the different part of mms, or ffmpeg-thumbnailer (the project outside mms). As a developper, I think it's more interesting for me to work on a project which can be used on differents applications instead of rewriting it for each sub-project.

lorenzodes
master
Posts: 772
Joined: Sun Mar 11, 2007 4:50 pm
Location: move.l 4.w,a6

Re: Special extensions m4v, ogv, ogm

Postby lorenzodes » Wed Sep 09, 2009 1:41 pm

ubitux wrote:It's been used in other projects (thunar for example) so it can avoid code redondancy between projects, lighten the source code, etc. Also, the svn code has a first implementation of "intelligent" thumb finder (-p option) which can be interested to work on. By using that kind of third-party application, MMS can be improved even without working on the thumbnailer. Of course, it's my opinion.

At the end of the month, I may be able to find time to help on the different part of mms, or ffmpeg-thumbnailer (the project outside mms). As a developper, I think it's more interesting for me to work on a project which can be used on differents applications instead of rewriting it for each sub-project.


I don't want to be an advocate for the internal thumbnailer in MMS, especially because I am biased, but when the mms thumbnailer was first started, probably ffmpeg-thumbnailer didn't even exist. Besides that, what real benefit would there be in using it? The internal thumbnailer too has some "intelligent" thumb finder option (which can be adjusted considering that fast thumbnailing is the priority). Is the intelligent thumb finder option in ffmpeg-thumbnailer any better? Or is it faster? Those are the points we should be interested in.

BTW, so far most problems that we had with the internal thumbnailer turned out to be problems in ffmpeg, but I'd like to look into the ogm problem you have reported here.
"I’m not frightened of dying, anytime will do, I don’t mind. Why should I be frightened of dying? There’s no reason for it, you gotta go sometime"

User avatar
ubitux
Posts: 8
Joined: Sun Aug 30, 2009 6:28 pm
Contact:

Re: Special extensions m4v, ogv, ogm

Postby ubitux » Wed Sep 09, 2009 3:03 pm

lorenzodes wrote:
ubitux wrote:It's been used in other projects (thunar for example) so it can avoid code redondancy between projects, lighten the source code, etc. Also, the svn code has a first implementation of "intelligent" thumb finder (-p option) which can be interested to work on. By using that kind of third-party application, MMS can be improved even without working on the thumbnailer. Of course, it's my opinion.

At the end of the month, I may be able to find time to help on the different part of mms, or ffmpeg-thumbnailer (the project outside mms). As a developper, I think it's more interesting for me to work on a project which can be used on differents applications instead of rewriting it for each sub-project.


I don't want to be an advocate for the internal thumbnailer in MMS, especially because I am biased, but when the mms thumbnailer was first started, probably ffmpeg-thumbnailer didn't even exist. Besides that, what real benefit would there be in using it? The internal thumbnailer too has some "intelligent" thumb finder option (which can be adjusted considering that fast thumbnailing is the priority). Is the intelligent thumb finder option in ffmpeg-thumbnailer any better? Or is it faster? Those are the points we should be interested in.

BTW, so far most problems that we had with the internal thumbnailer turned out to be problems in ffmpeg, but I'd like to look into the ogm problem you have reported here.


Sure, so in fact it would be interesting to "merge" the projects ideas... :)


Return to “general discussion”

Who is online

Users browsing this forum: No registered users and 1 guest