Re: [FFmpeg-user] stream mapping seems to work, but doesn't

2016-05-23 Thread Moritz Barsnick
On Mon, May 23, 2016 at 09:31:25 -0400, sean darcy wrote:
> I've got a bunch of VOB's I want to concatenate. For most of the VOB's 
> stream 0:0 is video and 0:1 audio, but for one VOB te streams are 
> switched, so concat doesn't work.

The issue was discussed in this thread:
https://ffmpeg.org/pipermail/ffmpeg-user/2014-December/024592.html
but without a resolution.

MPEG program streams, such as VOBs, don't know the concept of "order".
It didn't become quite clear on what grounds ffmpeg chooses the order -
possibly depending on which packet comes first.

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

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] stream mapping seems to work, but doesn't

2016-05-23 Thread Nicolas George
> On Mon, May 23, 2016 at 09:31:25 -0400, sean darcy wrote:
> > I've got a bunch of VOB's I want to concatenate. For most of the VOB's 
> > stream 0:0 is video and 0:1 audio, but for one VOB te streams are 
> > switched, so concat doesn't work.

You need to use the stream id, see the documentation on stream specifiers.

Le quintidi 5 prairial, an CCXXIV, Moritz Barsnick a écrit :
> MPEG program streams, such as VOBs, don't know the concept of "order".
> It didn't become quite clear on what grounds ffmpeg chooses the order -
> possibly depending on which packet comes first.

Exactly.

Regards,

-- 
  Nicolas George


signature.asc
Description: Digital signature
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] stream mapping seems to work, but doesn't

2016-05-24 Thread sean darcy

On 05/23/2016 11:29 AM, Nicolas George wrote:

On Mon, May 23, 2016 at 09:31:25 -0400, sean darcy wrote:

I've got a bunch of VOB's I want to concatenate. For most of the VOB's
stream 0:0 is video and 0:1 audio, but for one VOB te streams are
switched, so concat doesn't work.


You need to use the stream id, see the documentation on stream specifiers.

Le quintidi 5 prairial, an CCXXIV, Moritz Barsnick a écrit :

MPEG program streams, such as VOBs, don't know the concept of "order".
It didn't become quite clear on what grounds ffmpeg chooses the order -
possibly depending on which packet comes first.


Exactly.

Regards,



Tried using stream id's :

ffmpeg  -i out5A.VOB -map i:0x1e0  -map i:0x80 -c copy out5A-x.VOB
...
[mpeg @ 0x23ec120] DTS discontinuity in stream 0: packet 3 with DTS 
50761, packet 4 with DTS 53641

Input #0, mpeg, from 'out5A.VOB':
  Duration: 00:25:50.02, start: 0.50, bitrate: 5516 kb/s
Stream #0:0[0x80]: Audio: ac3, 48000 Hz, stereo, fltp, 224 kb/s
Stream #0:1[0x1e0]: Video: mpeg2video (Main), yuv420p(tv, 
smpte170m), 720x480 [SAR 8:9 DAR 4:3], max. 8500 kb/s, 29.97 fps, 29.97 
tbr, 90k tbn, 59.94 tbc

[svcd @ 0x23f0a80] VBV buffer size not set, using default size of 130KB
If you want the mpeg file to be compliant to some specification
Like DVD, VCD or others, make sure you set the correct buffer size
Output #0, svcd, to 'out5A-x.VOB':
  Metadata:
encoder : Lavf57.29.101
Stream #0:0: Video: mpeg2video, yuv420p, 720x480 [SAR 8:9 DAR 4:3], 
q=2-31, max. 8500 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 29.97 tbc

Stream #0:1: Audio: ac3, 48000 Hz, stereo, 224 kb/s
Stream mapping:
  Stream #0:1 -> #0:0 (copy)
  Stream #0:0 -> #0:1 (copy)
Press [q] to stop, [?] for help
[svcd @ 0x23f0a80] Timestamps are unset in a packet for stream 0. This 
is deprecated and will stop working in the future. Fix your code to set 
the timestamps properly
frame=46435 fps=1900 q=-1.0 Lsize= 1043844kB time=00:25:50.02 
bitrate=5516.8kbits/s speed=63.4x

...

But no joy:

ffprobe -i out5A-x.VOB
..
Input #0, mpeg, from 'out5A-x.VOB':
  Duration: 00:25:50.02, start: 0.50, bitrate: 5516 kb/s
Stream #0:0[0x80]: Audio: ac3, 48000 Hz, stereo, fltp, 224 kb/s
Stream #0:1[0x1e0]: Video: mpeg2video (Main), yuv420p(tv, 
smpte170m), 720x480 [SAR 8:9 DAR 4:3], max. 8500 kb/s, 29.97 fps, 29.97 
tbr, 90k tbn, 59.94 tbc


Thanks for any help.

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

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] stream mapping seems to work, but doesn't

2016-05-24 Thread sean darcy

On 05/24/2016 11:53 AM, sean darcy wrote:

On 05/23/2016 11:29 AM, Nicolas George wrote:

On Mon, May 23, 2016 at 09:31:25 -0400, sean darcy wrote:

I've got a bunch of VOB's I want to concatenate. For most of the VOB's
stream 0:0 is video and 0:1 audio, but for one VOB te streams are
switched, so concat doesn't work.


You need to use the stream id, see the documentation on stream
specifiers.

Le quintidi 5 prairial, an CCXXIV, Moritz Barsnick a écrit :

MPEG program streams, such as VOBs, don't know the concept of "order".
It didn't become quite clear on what grounds ffmpeg chooses the order -
possibly depending on which packet comes first.


Exactly.

Regards,



Tried using stream id's :

ffmpeg  -i out5A.VOB -map i:0x1e0  -map i:0x80 -c copy out5A-x.VOB
...
[mpeg @ 0x23ec120] DTS discontinuity in stream 0: packet 3 with DTS
50761, packet 4 with DTS 53641
Input #0, mpeg, from 'out5A.VOB':
  Duration: 00:25:50.02, start: 0.50, bitrate: 5516 kb/s
Stream #0:0[0x80]: Audio: ac3, 48000 Hz, stereo, fltp, 224 kb/s
Stream #0:1[0x1e0]: Video: mpeg2video (Main), yuv420p(tv,
smpte170m), 720x480 [SAR 8:9 DAR 4:3], max. 8500 kb/s, 29.97 fps, 29.97
tbr, 90k tbn, 59.94 tbc
[svcd @ 0x23f0a80] VBV buffer size not set, using default size of 130KB
If you want the mpeg file to be compliant to some specification
Like DVD, VCD or others, make sure you set the correct buffer size
Output #0, svcd, to 'out5A-x.VOB':
  Metadata:
encoder : Lavf57.29.101
Stream #0:0: Video: mpeg2video, yuv420p, 720x480 [SAR 8:9 DAR 4:3],
q=2-31, max. 8500 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 29.97 tbc
Stream #0:1: Audio: ac3, 48000 Hz, stereo, 224 kb/s
Stream mapping:
  Stream #0:1 -> #0:0 (copy)
  Stream #0:0 -> #0:1 (copy)
Press [q] to stop, [?] for help
[svcd @ 0x23f0a80] Timestamps are unset in a packet for stream 0. This
is deprecated and will stop working in the future. Fix your code to set
the timestamps properly
frame=46435 fps=1900 q=-1.0 Lsize= 1043844kB time=00:25:50.02
bitrate=5516.8kbits/s speed=63.4x
...

But no joy:

ffprobe -i out5A-x.VOB
..
Input #0, mpeg, from 'out5A-x.VOB':
  Duration: 00:25:50.02, start: 0.50, bitrate: 5516 kb/s
Stream #0:0[0x80]: Audio: ac3, 48000 Hz, stereo, fltp, 224 kb/s
Stream #0:1[0x1e0]: Video: mpeg2video (Main), yuv420p(tv,
smpte170m), 720x480 [SAR 8:9 DAR 4:3], max. 8500 kb/s, 29.97 fps, 29.97
tbr, 90k tbn, 59.94 tbc

Thanks for any help.



Or am I going at this all wrong? I have a set of VOB's that have random 
steam orders. I want an mp4.


fmpeg -safe 0 -f concat -i mylist.txt \
 -c:v:0 libx264 -c:a:0 aac  out.mp4

where mylist.txt has the VOB's.

The output of this is correct for the VOB's with a stream order that 
matches the first VOB in the list. But any for VOB with the steam order 
switched there's no video. BTW, the video returns for any VOB whose 
stream order matches the first.


Instead of trying to fix stream order, is there another easier way?

sean


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

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] stream mapping seems to work, but doesn't

2016-05-24 Thread Cley Faye
2016-05-24 18:17 GMT+02:00 sean darcy :

>
> Instead of trying to fix stream order, is there another easier way?


​It might not be the best option, but it should work: you could remux all
your VOBs into ​correctly-arranged mp4 (or any other container that know
better than VOB), then concatenate them. All this using -map 0:v and -map
0:a to avoid potential ordering issue for intermediate VOBs. This option
needs some space to work, but it should be quite fast and scriptable.
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] stream mapping seems to work, but doesn't

2016-05-24 Thread Nicolas George
Le sextidi 6 prairial, an CCXXIV, sean darcy a écrit :
> >But no joy:
> >
> >ffprobe -i out5A-x.VOB
> >..
> >Input #0, mpeg, from 'out5A-x.VOB':
> >  Duration: 00:25:50.02, start: 0.50, bitrate: 5516 kb/s
> >Stream #0:0[0x80]: Audio: ac3, 48000 Hz, stereo, fltp, 224 kb/s
> >Stream #0:1[0x1e0]: Video: mpeg2video (Main), yuv420p(tv,
> >smpte170m), 720x480 [SAR 8:9 DAR 4:3], max. 8500 kb/s, 29.97 fps, 29.97
> >tbr, 90k tbn, 59.94 tbc

There is no order of streams in VOB containers. Not the ones you read, and
not the ones you create.

> Or am I going at this all wrong? I have a set of VOB's that have random
> steam orders. I want an mp4.
> 
> fmpeg -safe 0 -f concat -i mylist.txt \
>  -c:v:0 libx264 -c:a:0 aac  out.mp4
> 
> where mylist.txt has the VOB's.

IIRC, you forgot to tell us you were using the concat demuxer. There is a
stream order in the concat demuxer, it is the order of the streams in all
the files, and it must be the same. Obviously, it does not work for VOB
files, but there is a countermeasure:

https://www.ffmpeg.org/ffmpeg-formats.html#concat

Search "This is especially useful for MPEG-PS (VOB) files, where the order
of the streams is not reliable.".

Regards,

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

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".