Problem converting avi to mp4 with FFConvert

Using applications, configuring, problems
Message
Author
User avatar
edoc
Posts: 4729
Joined: Sun 07 Aug 2005, 20:16
Location: Southeast Georgia, USA
Contact:

Problem converting avi to mp4 with FFConvert

#1 Post by edoc »

I am trying to convert video files for our daughter to view on her mp4 player.

Here are the properties of two .avi files:
Image

This one, converted from a video found online, will not play:
http://kd4e.com/images/test/allgoodthings.avi

This one, sent to me from the mp4 company, will play:
http://kd4e.com/images/test/Matsuura%20Aya.avi

How can I adjust the settings so that I create .avi files like the one that works, please?[/img]

User avatar
edoc
Posts: 4729
Joined: Sun 07 Aug 2005, 20:16
Location: Southeast Georgia, USA
Contact:

#2 Post by edoc »

CORRECTION!

The Subject should read:

"Problem converting avi FOR AN mp4 with FFConvert"
[b]Thanks! David[/b]
[i]Home page: [/i][url]http://nevils-station.com[/url]
[i]Don't google[/i] [b]Search![/b] [url]http://duckduckgo.com[/url]
TahrPup64 & Lighthouse64-b602 & JL64-603

aarf

#3 Post by aarf »

try this allgoodthings.avi.mp4:
made by using kdenlive.sfs in q120 from http://www.murga-linux.com/puppy/viewtopic.php?t=57450
>dragging the avi into the input area, then dragging from there to the time line, then in the "project" tab "rendering" as mpeg4.

User avatar
edoc
Posts: 4729
Joined: Sun 07 Aug 2005, 20:16
Location: Southeast Georgia, USA
Contact:

#4 Post by edoc »

Thanks for your assistance!

However, I am still not communicating effectively.

I need an AVI file but it has to have the same specs as this one:
http://kd4e.com/images/test/Matsuura%20Aya.avi

It is to be played on an inexpensive Chinese mp4 player that does not play mp4's.

Oddly, they market it saying that it will only play AMV files, but it instead plays a very specific format of AVI.

Yeah, I was confused too ...

I understand that MTV created the AMV file format for the cheap Chinese devices and apparently they borrowed most of the code from AVI ... with some mods.

So, the question is if there is a Linux-friendly converter, perhaps ffmpeg or FFConvert (v. 1.0 is about to be released as a PET according to Barry) that can create an AVI with the same settings as the Matsuura%20Aya.avi that I provided?

It would be nice if that converter could do so from the most common video formats out there but I will live with just one source type so long as the output AVI works.

I hope that I have stated the need more clearly this time. :-)
[b]Thanks! David[/b]
[i]Home page: [/i][url]http://nevils-station.com[/url]
[i]Don't google[/i] [b]Search![/b] [url]http://duckduckgo.com[/url]
TahrPup64 & Lighthouse64-b602 & JL64-603

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#5 Post by Flash »

edoc wrote:CORRECTION!

The Subject should read:

"Problem converting avi FOR AN mp4 with FFConvert"
Then change it to what it should be! :) I change subject lines to better reflect the contents of the thread, to attract (knowledgeable) people to the thread. If I get it wrong, feel free to correct me.

User avatar
edoc
Posts: 4729
Joined: Sun 07 Aug 2005, 20:16
Location: Southeast Georgia, USA
Contact:

Using FFConvert to create a mp4-friendly avi

#6 Post by edoc »

I didn't know that I could change it. :-)

Wasn't that disallowed early in the day of this Forum?

How's this one?
[b]Thanks! David[/b]
[i]Home page: [/i][url]http://nevils-station.com[/url]
[i]Don't google[/i] [b]Search![/b] [url]http://duckduckgo.com[/url]
TahrPup64 & Lighthouse64-b602 & JL64-603

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#7 Post by Flash »

You've always been able to edit your own posts, including their subject lines.

If you're satisfied with the way it reads now, then I'm happy. :)

When editing your posts, keep in mind how what you do will affect the rest of the thread. People occasionally delete the contents of a post they made, which can make it difficult for anyone reading the thread later on to figure out what's going on. Obviously, deleting the contents of first post of a thread can make the thread useless. My number one objective as administrator is to make the forum as useful as possible. :D

User avatar
edoc
Posts: 4729
Joined: Sun 07 Aug 2005, 20:16
Location: Southeast Georgia, USA
Contact:

#8 Post by edoc »

Thanks Flash!

I only get the time to dig back into these geek-projects now and then ... I tend to forget a lot of the details when my opportunities are otherwise badly fragmented.

I have also been thrashing around this same project on the Fatdog64 list as we have that Puppy on our ACER:
http://www.murga-linux.com/puppy/viewto ... 519#440519

In spup 040 I added uvcvideo.ko to the kernel modules to be loaded at boot time and rebooted:

This works (in spup 040) ...

Code: Select all

ffmpeg -f video4linux2 -r 30 -i /dev/video0 test.mpg
This also works (in spup 040) ...

Code: Select all

# gnome-mplayer tv://
So i have made some progress ... ;-)
[b]Thanks! David[/b]
[i]Home page: [/i][url]http://nevils-station.com[/url]
[i]Don't google[/i] [b]Search![/b] [url]http://duckduckgo.com[/url]
TahrPup64 & Lighthouse64-b602 & JL64-603

Mysp
Posts: 47
Joined: Mon 08 Jun 2009, 10:39
Location: Czech Republic

How to make file compatible with your portable player

#9 Post by Mysp »

I am certainly not expert for video conversion, but the key is to know, what are the exact inside parameters of working video (AVI and others files are just containers for many very different formats with many more different settings).
1. Take the video that works in your player and get as much informations of audio and video parameters as you can. In Puppy you can use MediaInfo (see later for more information). MediaInfo has about 4 format of listing, choose the most appropriate for you. If you have dual boot boot PC with Windows, you can also use program G-spot.
2. Compare output from MediaInfo (or G-spot) from "good" video to output for video, that does not work. Maybe the difference will be visible at glance. If not, look for thing like:
a) audio part of video: I think audio should not be the problem, but if "bad" video use MP3 and "good" other format, it may be problem. If both use MP3, but CBR versus VBR (constant x variable bit rate), it can be problem, too.
b) video stream: there are many possibilities, but things known as possible problems for portable players are:
- number of B-frames (if higher in "bad" video).
- options like Qpel, GMC, BVHQ. I do not know what these options exactly mean (GMC is Global Motion Compensation, I think), but these option enable better compression on one side, but can cause problem on the other side.
3. Try to set option in FFConvert to get the same output results (or at least very similar) as in "good" video. If it is not possible, I would recomend Avidemux: in Avidemux you can set very precisely every output option.

PET for MediaInfo can be downloaded from following link in forum (about 0.8 MB). You will need also unicode wxwidgets package (available from the same link). Missing icon in PET does not affect functionality, but can be added manually.
http://www.murga-linux.com/puppy/viewtopic.php?t=43363

PET for Avidemux can be downloaded from
http://murga-linux.com/puppy/viewtopic.php?t=46221

aarf

#10 Post by aarf »

8) from info at Mysp's link http://www.murga-linux.com/puppy/viewtopic.php?t=43363 and without installing anything (i.e. not installing MediaInfo) into puppeee1
# ffmpeg -i Ma*.avi
FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2007 Fabrice Bellard, et al.
configuration: --arch=i486 --enable-libmp3lame --enable-liba52 --enable-libfaac --enable-libfaad --enable-pthreads --enable-small --enable-libogg --enable-libvorbis --enable-gpl --enable-shared --enable-pp --disable-debug --prefix=/usr
libavutil version: 49.5.0
libavcodec version: 51.44.0
libavformat version: 51.14.0
built on Jul 12 2009 11:29:41, gcc: 4.2.2
Input #0, avi, from 'Matsuura Aya.avi':
Duration: 00:04:09.0, start: 0.000000, bitrate: 638 kb/s
Stream #0.0: Video: mpeg4, yuv420p, 320x240, 22.00 fps(r)
Stream #0.1: Audio: mp2, 44100 Hz, stereo, 128 kb/s

Must supply at least one output file
# ffmpeg -i all*.avi
FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2007 Fabrice Bellard, et al.
configuration: --arch=i486 --enable-libmp3lame --enable-liba52 --enable-libfaac --enable-libfaad --enable-pthreads --enable-small --enable-libogg --enable-libvorbis --enable-gpl --enable-shared --enable-pp --disable-debug --prefix=/usr
libavutil version: 49.5.0
libavcodec version: 51.44.0
libavformat version: 51.14.0
built on Jul 12 2009 11:29:41, gcc: 4.2.2
Input #0, avi, from 'allgoodthings.avi':
Duration: 00:00:35.5, start: 0.000000, bitrate: 488 kb/s
Stream #0.0: Video: msmpeg4v1, yuv420p, 320x240, 14.98 fps(r)
Stream #0.1: Audio: adpcm_ima_wav, 22050 Hz, mono, 88 kb/s

Must supply at least one output file
#

aarf

#11 Post by aarf »

will ask this here because people here know things about media files.

lobsters Lucid dream
http://www.youtube.com/watch?v=xb_nUn5OMbs
when using opera you can pull its local temporary file out of /tmp as something like FlashXXXxxx then play it in gnome-player, however it will not play in gxine

Code: Select all

# ffmpeg -i Flash*

(long output disappears from history)

[flv @ 0xb77df58c]Unsupported video codec (7)
[flv @ 0xb77df58c]Unsupported video codec (7)
[flv @ 0xb77df58c]Unsupported video codec (7)
[flv @ 0xb77df58c]Unsupported video codec (7)
[flv @ 0xb77df58c]Unsupported video codec (7)
[flv @ 0xb77df58c]skipping flv packet: type 97, size 7627016, flags 0

Seems stream 0 codec frame rate differs from container frame rate: 1000.00 (1000/1) -> 29.97 (30000/1001)
Input #0, flv, from 'FlashXXXfcgIo':
  Duration: 00:01:14.4, start: 0.000000, bitrate: N/A
  Stream #0.0: Video: 0x0007, 29.97 fps(r)
  Stream #0.1: Audio: 0x000a, 44100 Hz, stereo
Must supply at least one output file
# 
how to get either gxine, or Xfmedia player, to play it because puppeee doesn't include gnome-player. puppeee does have FFconvert. may also need to just add codecs. you2pet keeps breaking.
note the clips from http://www.clipshack.com obtained in the same way will play in gxine.
will look into this further myself but have to go out now. if you have some spare brainpower please have a shot.

User avatar
edoc
Posts: 4729
Joined: Sun 07 Aug 2005, 20:16
Location: Southeast Georgia, USA
Contact:

#12 Post by edoc »

aarf wrote: Input #0, avi, from 'Matsuura Aya.avi':
Duration: 00:04:09.0, start: 0.000000, bitrate: 638 kb/s
Stream #0.0: Video: mpeg4, yuv420p, 320x240, 22.00 fps(r)
Stream #0.1: Audio: mp2, 44100 Hz, stereo, 128 kb/s
Thanks! This essentially confirms, with extra detail, what is displayed in the first post (the side-by-side screen capture).

Now that we have these variables is there a Puppy-friendly conversion app that allows the user to specifify these specific variables?

I looked at FFConvert 0.9 but it did not appear to handle this level of detail -- or at least not all of these specific variables.

Barry announced that he was about to release a new FFConvert PET, version 1.0 I don't know if the latest version will be able to meet the need.

Will that app, or those apps, accept multiple formats at the Input; e.g. avi, mov, mp4, etc?

It does seem that with the flood of these cheap Chinese faux-mp4 players on the market that the need for a matching video converter will increase.
[b]Thanks! David[/b]
[i]Home page: [/i][url]http://nevils-station.com[/url]
[i]Don't google[/i] [b]Search![/b] [url]http://duckduckgo.com[/url]
TahrPup64 & Lighthouse64-b602 & JL64-603

User avatar
chrome307
Posts: 708
Joined: Thu 15 Jan 2009, 11:00

#13 Post by chrome307 »

Whats the media info from your 1st avi ( Goodthings ) file?

Does it contain a mp3 audio stream?

If so, you might have to convert the mp3 stream to mp2.

aarf

#14 Post by aarf »

FFConvert 0.9 in puppeee1
select the "preset" displayed in the image below> load> then change the codecs to suit.
allgoodthings.avi output is at http://www.datafilehost.com/download-cd92dd99.html with parameters as at bottom of the image below.
. you may need to do mp2 for Audio though. (file may be cropped as i closed the output).
Attachments
all.jpg
(61.11 KiB) Downloaded 1408 times

User avatar
chrome307
Posts: 708
Joined: Thu 15 Jan 2009, 11:00

#15 Post by chrome307 »

@ edoc

Can you try this file that I converted to test on the mp4 player?

It's approx 12mb and in avi format - mpeg4 & mp2 audio:

http://www.mediafire.com/?j9wnv3n75md9mp0

If it does work then the ffmpeg command is fairly straightforward to use.

Let me know

aarf

#16 Post by aarf »

aarf wrote:will ask this here because people here know things about media files.

lobsters Lucid dream
http://www.youtube.com/watch?v=xb_nUn5OMbs
when using opera you can pull its local temporary file out of /tmp as something like FlashXXXxxx then play it in gnome-player, however it will not play in gxine

Code: Select all

# ffmpeg -i Flash*

(long output disappears from history)

[flv @ 0xb77df58c]Unsupported video codec (7)
[flv @ 0xb77df58c]Unsupported video codec (7)
[flv @ 0xb77df58c]Unsupported video codec (7)
[flv @ 0xb77df58c]Unsupported video codec (7)
[flv @ 0xb77df58c]Unsupported video codec (7)
[flv @ 0xb77df58c]skipping flv packet: type 97, size 7627016, flags 0

Seems stream 0 codec frame rate differs from container frame rate: 1000.00 (1000/1) -> 29.97 (30000/1001)
Input #0, flv, from 'FlashXXXfcgIo':
  Duration: 00:01:14.4, start: 0.000000, bitrate: N/A
  Stream #0.0: Video: 0x0007, 29.97 fps(r)
  Stream #0.1: Audio: 0x000a, 44100 Hz, stereo
Must supply at least one output file
# 
how to get either gxine, or Xfmedia player, to play it because puppeee doesn't include gnome-player. puppeee does have FFconvert. may also need to just add codecs. you2pet keeps breaking.
note the clips from http://www.clipshack.com obtained in the same way will play in gxine.
will look into this further myself but have to go out now. if you have some spare brainpower please have a shot.
solved briefly:
transcoder with settings video:avi, mpeg2, 1440, same,4.3, auto
audio mp2,128,48000,2
will then play opera sourced youtube in gxine
here if you want to look at it.

aarf

#17 Post by aarf »

have a kdenlive solution to the previous post as well at http://www.murga-linux.com/puppy/viewto ... 366#442366

User avatar
edoc
Posts: 4729
Joined: Sun 07 Aug 2005, 20:16
Location: Southeast Georgia, USA
Contact:

#18 Post by edoc »

aarf wrote:8) from info at Mysp's link http://www.murga-linux.com/puppy/viewtopic.php?t=43363
#
Thanks!

MediaInfo worked fine!

I will post the output for the AVI file that works with our daughter's MP4 player and see what y'all think I need to use to convert other video sources to those same specs.
[b]Thanks! David[/b]
[i]Home page: [/i][url]http://nevils-station.com[/url]
[i]Don't google[/i] [b]Search![/b] [url]http://duckduckgo.com[/url]
TahrPup64 & Lighthouse64-b602 & JL64-603

User avatar
edoc
Posts: 4729
Joined: Sun 07 Aug 2005, 20:16
Location: Southeast Georgia, USA
Contact:

#19 Post by edoc »

Here is the snapshot of the MediInfo output for a music video that works:

Image

How would I get ffmpeg to generate these same specs for a variety of video inputs, please?

BTW: Is there a way for MediaInfo to produce a .jpp or .txt output?
Last edited by edoc on Thu 02 Sep 2010, 22:23, edited 1 time in total.
[b]Thanks! David[/b]
[i]Home page: [/i][url]http://nevils-station.com[/url]
[i]Don't google[/i] [b]Search![/b] [url]http://duckduckgo.com[/url]
TahrPup64 & Lighthouse64-b602 & JL64-603

User avatar
edoc
Posts: 4729
Joined: Sun 07 Aug 2005, 20:16
Location: Southeast Georgia, USA
Contact:

#20 Post by edoc »

Same file format error.

Here is the MediaInfo output for your file:

Image

And here is the MediaInfo output for a video file she created on the camera:

Image
[b]Thanks! David[/b]
[i]Home page: [/i][url]http://nevils-station.com[/url]
[i]Don't google[/i] [b]Search![/b] [url]http://duckduckgo.com[/url]
TahrPup64 & Lighthouse64-b602 & JL64-603

Post Reply