Re: [FFmpeg-user] Mux encoded video data directly into mp4 files

2014-09-17 Thread fernando.takeshi
Ok, will do. Thank you.



--
View this message in context: 
http://ffmpeg-users.933282.n4.nabble.com/Mux-encoded-video-data-directly-into-mp4-files-tp4667372p4667400.html
Sent from the FFmpeg-users mailing list archive at Nabble.com.
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] Mux encoded video data directly into mp4 files

2014-09-17 Thread Carl Eugen Hoyos
fernando.takeshi  seventh.com.br> writes:

> Ok, it seems that a newer build of ffmpeg can understand 
> and mux the mjpeg raw frames file.

It works with older versions if the file has a .mjpeg suffix 
or if you force the file format.

> Still, that doesn't help me much, since I need to do this
> programatically...

Why didn't you sent an email to the relevant mailing list 
yet (as I suggested)?

Carl Eugen

___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] Mux encoded video data directly into mp4 files

2014-09-17 Thread fernando.takeshi
Ok, it seems that a newer build of ffmpeg can understand and mux the mjpeg
raw frames file. Still, that doesn't help me much, since I need to do this
programatically... thank you for your time though!



--
View this message in context: 
http://ffmpeg-users.933282.n4.nabble.com/Mux-encoded-video-data-directly-into-mp4-files-tp4667372p4667397.html
Sent from the FFmpeg-users mailing list archive at Nabble.com.
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] Mux encoded video data directly into mp4 files

2014-09-17 Thread Carl Eugen Hoyos
einguste  gmail.com> writes:

> I try to test.

Thank you!

Carl Eugen

___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] Mux encoded video data directly into mp4 files

2014-09-17 Thread einguste
I try to test.

$ ffmpeg -i mjpeg.hex -vcodec copy mjpeg.mp4
ffmpeg version N-66318-g85f2c01 Copyright (c) 2000-2014 the FFmpeg developers
  built on Sep 18 2014 00:12:17 with gcc 4.9.1 (GCC)
  configuration: --enable-gpl --enable-version3 --enable-avisynth 
--enable-fontconfig --enable-frei0r --enable-gnutls
--enable-ladspa --enable-libass --enable-libbluray --enable-libcaca 
--enable-libcdio --enable-libfreetype
--enable-libgsm --enable-libmodplug --enable-libmp3lame 
--enable-libopencore-amrnb --enable-libopencore-amrwb
--enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsoxr 
--enable-libspeex --enable-libtheora
--enable-libtwolame --enable-libvo-aacenc --enable-libvo-amrwbenc 
--enable-libvorbis --enable-libvpx --enable-libvidstab
--enable-libwavpack --enable-libx264 --enable-libx265 --enable-libxvid 
--enable-libilbc --enable-libxavs --enable-opengl
--enable-libwebp --enable-avresample --enable-w32threads 
--extra-ldflags=-static --extra-cflags='-march=i686
-mtune=generic -mfpmath=sse -msse' --optflags='-O2 -finline-functions'
  libavutil  54.  7.100 / 54.  7.100
  libavcodec 56.  1.100 / 56.  1.100
  libavformat56.  4.102 / 56.  4.102
  libavdevice56.  0.100 / 56.  0.100
  libavfilter 5.  1.101 /  5.  1.101
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale  3.  0.100 /  3.  0.100
  libswresample   1.  1.100 /  1.  1.100
  libpostproc53.  0.100 / 53.  0.100
[mjpeg @ 005372c0] Format mjpeg detected only with low score of 25, misdetection
 possible!
Input #0, mjpeg, from 'mjpeg.hex':
  Duration: N/A, bitrate: N/A
Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg), 1280x720 [SAR 1:1 DAR 16:9
], 25 tbr, 1200k tbn, 25 tbc
Output #0, mp4, to 'mjpeg.mp4':
  Metadata:
encoder : Lavf56.4.102
Stream #0:0: Video: mjpeg (l[0][0][0] / 0x006C), yuvj420p, 1280x720 [SAR 1:1
 DAR 16:9], q=2-31, 1200k tbn, 1200k tbc
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
frame=  163 fps=0.0 q=-1.0 Lsize=   13551kB time=00:00:06.48 bitrate=17130.7kbit
s/s
video:13549kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing
 overhead: 0.010840%


___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] Mux encoded video data directly into mp4 files

2014-09-17 Thread fernando.takeshi
Hi, thank you for your time and response.

What I meant is, with the linked sample data I supplied previously, I tried
the following:

D:\ffmpeg\bin>ffmpeg -i h264.hex -vcodec copy h264.mp4
ffmpeg version N-61444-gf3d3e3f Copyright (c) 2000-2014 the FFmpeg
developers
  built on Mar 13 2014 22:24:23 with gcc 4.8.2 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-av
isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls
--enab
le-iconv --enable-libass --enable-libbluray --enable-libcaca
--enable-libfreetyp
e --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame
--ena
ble-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg
--enable-l
ibopus --enable-librtmp --enable-libschroedinger --enable-libsoxr
--enable-libsp
eex --enable-libtheora --enable-libtwolame --enable-libvidstab
--enable-libvo-aa
cenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx
--enable-libwavp
ack --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid
--enable
-zlib
  libavutil  52. 66.101 / 52. 66.101
  libavcodec 55. 52.102 / 55. 52.102
  libavformat55. 34.101 / 55. 34.101
  libavdevice55. 11.100 / 55. 11.100
  libavfilter 4.  3.100 /  4.  3.100
  libswscale  2.  5.101 /  2.  5.101
  libswresample   0. 18.100 /  0. 18.100
  libpostproc52.  3.100 / 52.  3.100
Input #0, h264, from 'h264.hex':
  Duration: N/A, bitrate: N/A
Stream #0:0: Video: h264 (Constrained Baseline), yuv420p, 800x592, 25
fps, 2
5 tbr, 1200k tbn, 50 tbc
Output #0, mp4, to 'h264.mp4':
  Metadata:
encoder : Lavf55.34.101
Stream #0:0: Video: h264 ([33][0][0][0] / 0x0021), yuv420p, 800x592,
q=2-31,
 25 fps, 1200k tbn, 1200k tbc
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
frame= 1101 fps=0.0 q=-1.0 Lsize=5950kB time=00:00:44.00
bitrate=1107.9kbits
/s
video:5945kB audio:0kB subtitle:0 data:0 global headers:0kB muxing overhead
0.09
1430%





D:\ffmpeg\bin>ffmpeg -i mpeg.hex -vcodec copy mpeg.mp4
ffmpeg version N-61444-gf3d3e3f Copyright (c) 2000-2014 the FFmpeg
developers
  built on Mar 13 2014 22:24:23 with gcc 4.8.2 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-av
isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls
--enab
le-iconv --enable-libass --enable-libbluray --enable-libcaca
--enable-libfreetyp
e --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame
--ena
ble-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg
--enable-l
ibopus --enable-librtmp --enable-libschroedinger --enable-libsoxr
--enable-libsp
eex --enable-libtheora --enable-libtwolame --enable-libvidstab
--enable-libvo-aa
cenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx
--enable-libwavp
ack --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid
--enable
-zlib
  libavutil  52. 66.101 / 52. 66.101
  libavcodec 55. 52.102 / 55. 52.102
  libavformat55. 34.101 / 55. 34.101
  libavdevice55. 11.100 / 55. 11.100
  libavfilter 4.  3.100 /  4.  3.100
  libswscale  2.  5.101 /  2.  5.101
  libswresample   0. 18.100 /  0. 18.100
  libpostproc52.  3.100 / 52.  3.100
Input #0, m4v, from 'mpeg.hex':
  Duration: N/A, start: 0.33, bitrate: N/A
Stream #0:0: Video: mpeg4, yuv420p, 320x240 [SAR 1:1 DAR 4:3], 12 tbr,
1200k
 tbn, 12 tbc
Output #0, mp4, to 'mpeg.mp4':
  Metadata:
encoder : Lavf55.34.101
Stream #0:0: Video: mpeg4 ( [0][0][0] / 0x0020), yuv420p, 320x240 [SAR
1:1 D
AR 4:3], q=2-31, 1200k tbn, 1200k tbc
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
frame=  827 fps=0.0 q=-1.0 Lsize= 418kB time=00:01:08.83 bitrate= 
49.7kbits
/s
video:415kB audio:0kB subtitle:0 data:0 global headers:0kB muxing overhead
0.730
787%





D:\ffmpeg\bin>ffmpeg -i mjpeg.hex -vcodec copy mjpeg.mp4
ffmpeg version N-61444-gf3d3e3f Copyright (c) 2000-2014 the FFmpeg
developers
  built on Mar 13 2014 22:24:23 with gcc 4.8.2 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-av
isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls
--enab
le-iconv --enable-libass --enable-libbluray --enable-libcaca
--enable-libfreetyp
e --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame
--ena
ble-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg
--enable-l
ibopus --enable-librtmp --enable-libschroedinger --enable-libsoxr
--enable-libsp
eex --enable-libtheora --enable-libtwolame --enable-libvidstab
--enable-libvo-aa
cenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx
--enable-libwavp
ack --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid
--enable
-zlib
  libavutil  52. 66.101 / 52. 66.101
  libavcodec 55. 52.102 / 55. 52.102
  libavformat55. 34.101 / 55. 34.101
  libavdevice55. 11.100 / 55. 11.100
  libavfilter 4.  3.100 /  4.  3.100
  l

Re: [FFmpeg-user] Mux encoded video data directly into mp4 files

2014-09-17 Thread Carl Eugen Hoyos
fernando.takeshi  seventh.com.br> writes:

> I've tested the command line approach and it seems 
> to work for h264 and mpeg files, but not for mjpeg.

Could you elaborate?
How can I reproduce this?

> Right now, I do not have any sample code working - 
> the muxing example generates a divide by zero 
> error on av_write_frame

Seems like a perfect start for a question on the 
libav-user mailing list: 
http://ffmpeg.org/mailman/listinfo/libav-user

Carl Eugen

___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] Mux encoded video data directly into mp4 files

2014-09-17 Thread Francois Visagie
> -Original Message-
> From: ffmpeg-user-boun...@ffmpeg.org [mailto:ffmpeg-user-
> boun...@ffmpeg.org] On Behalf Of fernando.takeshi
> Sent: 17 September 2014 01:39
> To: ffmpeg-user@ffmpeg.org
> Subject: [FFmpeg-user] Mux encoded video data directly into mp4 files
> 
> Hello,
> 
> I've been searching for ways to create .mp4 files directly from saved raw
> video data. The sources of said data can record frames in the h264, mpeg
and
> mjpeg formats; I end up with files that are basically raw frames of these
> formats, one after the other.
> 
> Now, I've tested the command line approach (that I cannot use,
> unfortunately) and it seems to work for h264 and mpeg files, but not for
> mjpeg. I need to do this programmatically; so I've followed ffmpeg's
muxing
> example and many others I found online (stackoverflow, etc) and can't seem
> to find any consistency in how to (or what would be the correct way to)
> accomplish this.
> 
> Right now, I do not have any sample code working - the muxing example
> generates a divide by zero error on av_write_frame (I tried messing with
> DTS/PTS but nothing seems to work). Other examples all yielded different
> results, but none worked.
> 
> So, what I ask is basically: given a file consisting of raw frames (h264,
mpeg or
> mjpeg), how do I go about creating a playable video mp4 file? What would
be
> the correct way? Specifically speaking, which functions should I be
calling and
> in what order as to make the code work for those three formats?

I hope you get the help you need, but failing that, consider making a
(custom) debug build of ffmpeg to trace the sequence in the successful
command line multiplexing you mention.

> 
> Some sample data can be found at
> https://drive.google.com/file/d/0B8XSlN4yAH72T1R0Ti1zaGViNmM/edit?usp
> =sharing
> 
> Thanks in advance!
> 
> 
> 
> --
> View this message in context: http://ffmpeg-
> users.933282.n4.nabble.com/Mux-encoded-video-data-directly-into-mp4-
> files-tp4667372.html
> Sent from the FFmpeg-users mailing list archive at Nabble.com.
> ___
> ffmpeg-user mailing list
> ffmpeg-user@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user

___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user